#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: file.c,v 1.147 2012/10/31 14:01:28 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.148 2012/11/21 16:27:39 christos Exp $")
#endif /* lint */
#include "magic.h"
if (e)
return e;
+ if (MAGIC_VERSION != magic_version())
+ (void)fprintf(stderr, "%s: compiled magic version [%d] "
+ "does not match with shared library magic version [%d]\n",
+ progname, MAGIC_VERSION, magic_version());
+
switch(action) {
case FILE_CHECK:
case FILE_COMPILE:
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: magic.c,v 1.76 2012/10/30 23:11:51 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.77 2012/10/31 17:20:06 christos Exp $")
#endif /* lint */
#include "magic.h"
ms->flags = flags;
return 0;
}
+
+public int
+magic_version(void)
+{
+ return MAGIC_VERSION;
+}