svn commit: r240157 - in stable/9: contrib/file lib/libmagic
Stephen McKay
mckay at FreeBSD.org
Thu Sep 6 06:17:40 UTC 2012
Author: mckay
Date: Thu Sep 6 06:17:39 2012
New Revision: 240157
URL: http://svn.freebsd.org/changeset/base/240157
Log:
MFC r235638,r239348:
- Work around failure to compile on FreeBSD 7.x machines.
- Correct a regression introduced during the import of file(1) 5.11.
PR: bin/170415
Reviewed by: obrien@
Modified:
stable/9/contrib/file/apprentice.c
stable/9/lib/libmagic/Makefile
stable/9/lib/libmagic/config.h
Directory Properties:
stable/9/ (props changed)
stable/9/contrib/file/ (props changed)
stable/9/lib/ (props changed)
Modified: stable/9/contrib/file/apprentice.c
==============================================================================
--- stable/9/contrib/file/apprentice.c Thu Sep 6 03:19:48 2012 (r240156)
+++ stable/9/contrib/file/apprentice.c Thu Sep 6 06:17:39 2012 (r240157)
@@ -648,7 +648,6 @@ set_test_type(struct magic *mstart, stru
break;
case FILE_REGEX:
case FILE_SEARCH:
-#ifndef COMPILE_ONLY
/* Check for override */
if (mstart->str_flags & STRING_BINTEST)
mstart->flag |= BINTEST;
@@ -664,7 +663,6 @@ set_test_type(struct magic *mstart, stru
mstart->flag |= BINTEST;
else
mstart->flag |= TEXTTEST;
-#endif
break;
case FILE_DEFAULT:
/* can't deduce anything; we shouldn't see this at the
Modified: stable/9/lib/libmagic/Makefile
==============================================================================
--- stable/9/lib/libmagic/Makefile Thu Sep 6 03:19:48 2012 (r240156)
+++ stable/9/lib/libmagic/Makefile Thu Sep 6 06:17:39 2012 (r240157)
@@ -40,8 +40,9 @@ magic.mgc: mkmagic magic
CLEANFILES+= mkmagic
build-tools: mkmagic
-mkmagic: apprentice.c funcs.c magic.c print.c
- ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
+mkmagic: apprentice.c encoding.c funcs.c getline.c magic.c print.c
+ ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \
+ -o ${.TARGET} ${.ALLSRC}
FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \
${.CURDIR}/config.h
Modified: stable/9/lib/libmagic/config.h
==============================================================================
--- stable/9/lib/libmagic/config.h Thu Sep 6 03:19:48 2012 (r240156)
+++ stable/9/lib/libmagic/config.h Thu Sep 6 06:17:39 2012 (r240157)
@@ -39,7 +39,9 @@
#define HAVE_FSEEKO 1
/* Define to 1 if you have the `getline' function. */
+#ifndef HOSTPROG
#define HAVE_GETLINE 1
+#endif
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
More information about the svn-src-stable-9
mailing list