Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Sep 2012 00:20:46 +0000 (UTC)
From:      Stephen McKay <mckay@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r240179 - in releng/9.1: contrib/file lib/libmagic
Message-ID:  <201209070020.q870KkoD007985@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckay
Date: Fri Sep  7 00:20:46 2012
New Revision: 240179
URL: http://svn.freebsd.org/changeset/base/240179

Log:
  MFS r240157 (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:		170415
  Reviewed by:	obrien
  Approved by:	re (kib)

Modified:
  releng/9.1/contrib/file/apprentice.c
  releng/9.1/lib/libmagic/Makefile
  releng/9.1/lib/libmagic/config.h
Directory Properties:
  releng/9.1/   (props changed)
  releng/9.1/contrib/file/   (props changed)
  releng/9.1/lib/   (props changed)

Modified: releng/9.1/contrib/file/apprentice.c
==============================================================================
--- releng/9.1/contrib/file/apprentice.c	Thu Sep  6 20:59:49 2012	(r240178)
+++ releng/9.1/contrib/file/apprentice.c	Fri Sep  7 00:20:46 2012	(r240179)
@@ -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: releng/9.1/lib/libmagic/Makefile
==============================================================================
--- releng/9.1/lib/libmagic/Makefile	Thu Sep  6 20:59:49 2012	(r240178)
+++ releng/9.1/lib/libmagic/Makefile	Fri Sep  7 00:20:46 2012	(r240179)
@@ -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: releng/9.1/lib/libmagic/config.h
==============================================================================
--- releng/9.1/lib/libmagic/config.h	Thu Sep  6 20:59:49 2012	(r240178)
+++ releng/9.1/lib/libmagic/config.h	Fri Sep  7 00:20:46 2012	(r240179)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209070020.q870KkoD007985>