summaryrefslogtreecommitdiffstats
path: root/contrib/file/apprentice.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2009-01-02 03:31:45 +0000
committerobrien <obrien@FreeBSD.org>2009-01-02 03:31:45 +0000
commit69f0422a25898425fe392e13242a29b850055c73 (patch)
tree63b53c2ce1446ccbc8631c32c2de6b589083bc88 /contrib/file/apprentice.c
parent729acffa050ba99227c27884a5760fdd3d6959b2 (diff)
downloadFreeBSD-src-69f0422a25898425fe392e13242a29b850055c73.zip
FreeBSD-src-69f0422a25898425fe392e13242a29b850055c73.tar.gz
Add an additional COMPILE_ONLY check.
Diffstat (limited to 'contrib/file/apprentice.c')
-rw-r--r--contrib/file/apprentice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/file/apprentice.c b/contrib/file/apprentice.c
index a29825c..714c86c 100644
--- a/contrib/file/apprentice.c
+++ b/contrib/file/apprentice.c
@@ -588,9 +588,11 @@ set_test_type(struct magic *mstart, struct magic *m)
break;
case FILE_REGEX:
case FILE_SEARCH:
+#ifndef COMPILE_ONLY
/* binary test if pattern is not text */
if (file_looks_utf8(m->value.us, m->vallen, NULL, NULL) <= 0)
mstart->flag |= BINTEST;
+#endif
break;
case FILE_DEFAULT:
/* can't deduce anything; we shouldn't see this at the
OpenPOWER on IntegriCloud