diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/file/Makefile | 44 | ||||
-rw-r--r-- | usr.bin/file/config.h | 191 |
2 files changed, 139 insertions, 96 deletions
diff --git a/usr.bin/file/Makefile b/usr.bin/file/Makefile index d84d1a8..3892d5d 100644 --- a/usr.bin/file/Makefile +++ b/usr.bin/file/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ # Makefile for file(1) cmd. +# Copyright (c) David E. O'Brien, 2000-2004 # Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE. # # This software is not subject to any license of the American Telephone @@ -19,49 +20,18 @@ # ever read sources, credits must appear in the documentation. # 4. This notice may not be removed or altered. -SRCDIR= ${.CURDIR}/../../contrib/file +#SRCDIR= ${.CURDIR}/../../contrib/file +SRCDIR= ${.CURDIR}/../file-4.10/src .PATH: ${SRCDIR} PROG= file -MAN= file.1 magic.5 -SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \ - compress.c is_tar.c readelf.c print.c -# compress.c is_tar.c readelf.c internat.c print.c -MAGICPATH= /usr/share/misc +MAGICPATH?= ${DESTDIR}/usr/share/misc -CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DBUILTIN_ELF -DELFCORE -DHAVE_CONFIG_H +CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H CFLAGS+= -I${.CURDIR} -I${SRCDIR} -LDADD= -lz -DPADD= ${LIBZ} - -CLEANFILES+= magic magic.mgc magic.mime.mgc magic.mime.PITA - -FILES= magic magic.mgc ${SRCDIR}/magic.mime magic.mime.mgc -FILESDIR= ${MAGICPATH} - -MAGFILES= ${SRCDIR}/Header\ - ${SRCDIR}/Localstuff\ - ${SRCDIR}/Magdir/[a-z]* - -all: ${PROG} magic.mgc magic.mime.mgc - -magic: ${MAGFILES} - cat ${.ALLSRC} > ${.TARGET} - -magic.mgc: mkmagic magic - ./mkmagic magic - -magic.mime.mgc: mkmagic magic.mime - ln -sf ${SRCDIR}/magic.mime magic.mime.PITA - ./mkmagic magic.mime.PITA - mv magic.mime.PITA.mgc magic.mime.mgc - -CLEANFILES+= mkmagic -build-tools: mkmagic -mkmagic: apprentice.c print.c - ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \ - -I${.CURDIR} -I${SRCDIR} -o ${.TARGET} ${.ALLSRC} +DPADD= ${LIBMAGIC} ${LIBZ} +LDADD= -lmagic -lz .include <bsd.prog.mk> diff --git a/usr.bin/file/config.h b/usr.bin/file/config.h index 20fbe70..ad2b5d6 100644 --- a/usr.bin/file/config.h +++ b/usr.bin/file/config.h @@ -2,35 +2,13 @@ #include <osreldate.h> -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if your struct stat has st_rdev. */ -#define HAVE_ST_RDEV 1 - -/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define if major, minor, and makedev are declared in <mkdev.h>. */ -/* #undef MAJOR_IN_MKDEV */ - -/* Define if major, minor, and makedev are declared in <sysmacros.h>. */ -/* #undef MAJOR_IN_SYSMACROS */ - -/* Define to `long' if <sys/types.h> doesn't define. */ -/* #undef off_t */ - -/* Define to `unsigned' if <sys/types.h> doesn't define. */ -/* #undef size_t */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 +/* config.h. Generated by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ +/* Autoheader needs me */ +#define PACKAGE "file" -/* Define if your <sys/time.h> declares struct tm. */ -/* #undef TM_IN_SYS_TIME */ +/* Autoheader needs me */ +#define VERSION "4.10" /* Define if builtin ELF support is enabled. */ #define BUILTIN_ELF 1 @@ -41,12 +19,21 @@ /* Define if the `long long' type works. */ #define HAVE_LONG_LONG 1 +/* Define if we have "tm_zone" in "struct tm". */ +#define HAVE_TM_ZONE 1 + +/* Define if we have a global "char * []" "tzname" variable. */ +#define HAVE_TZNAME 1 + /* Define if we have "tm_isdst" in "struct tm". */ #define HAVE_TM_ISDST 1 /* Define if we have a global "int" variable "daylight". */ /* #undef HAVE_DAYLIGHT */ +/* Define if we have a mkstemp */ +#define HAVE_MKSTEMP 1 + /* Define to `unsigned char' if standard headers don't define. */ /* #undef uint8_t */ @@ -63,6 +50,9 @@ /* Define to `int' if standard headers don't define. */ /* #undef int32_t */ +/* FIXME: These have to be added manually because autoheader doesn't know + about AC_CHECK_SIZEOF_INCLUDES. */ + /* The number of bytes in a uint8_t. */ #define SIZEOF_UINT8_T 1 @@ -75,64 +65,136 @@ /* The number of bytes in a uint64_t. */ #define SIZEOF_UINT64_T 8 -/* Define if you have the getopt_long function. */ -#define HAVE_GETOPT_LONG 1 +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 -/* Define if you have the mkstemp function. */ -#define HAVE_MKSTEMP 1 +/* Define to 1 if you have the <getopt.h> header file. */ +#define HAVE_GETOPT_H 1 -/* Define if you have the mmap function. */ -#define HAVE_MMAP 1 +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 -/* Define if you have the strtoul function. */ -#define HAVE_STRTOUL 1 +/* Define to 1 if you have the `z' library (-lz). */ +#define HAVE_LIBZ 1 -/* Define if you have the <fcntl.h> header file. */ -#define HAVE_FCNTL_H 1 +/* Define to 1 if you have the <locale.h> header file. */ +#define HAVE_LOCALE_H 1 -/* Define if you have the <getopt.h> header file. */ -#define HAVE_GETOPT_H 1 +/* Define to 1 if you have the `mbrtowc' function. */ +#define HAVE_MBRTOWC 1 -/* Define if you have the <inttypes.h> header file. */ -#define HAVE_INTTYPES_H 1 +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 -/* Define if you have the <locale.h> header file. */ -#define HAVE_LOCALE_H 1 +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 -/* Define if you have the <stdint.h> header file. */ +/* Define to 1 if you have the <stdint.h> header file. */ #if __FreeBSD_version >= 500019 #define HAVE_STDINT_H 1 #endif -/* Define if you have the <sys/mman.h> header file. */ +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if `st_rdev' is member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_RDEV 1 + +/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use + `HAVE_STRUCT_STAT_ST_RDEV' instead. */ +#define HAVE_ST_RDEV 1 + +/* Define to 1 if you have the <sys/mman.h> header file. */ #define HAVE_SYS_MMAN_H 1 -/* Define if you have the <sys/stat.h> header file. */ +/* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 -/* Define if you have the <sys/types.h> header file. */ +/* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 -/* Define if you have the <unistd.h> header file. */ +/* Define to 1 if you have the <sys/utime.h> header file. */ +/* #undef HAVE_SYS_UTIME_H */ + +/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* HAVE_TM_ZONE */ +#define HAVE_TM_ZONE 1 + +/* HAVE_TZNAME */ +#define HAVE_TZNAME 1 + +/* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the z library (-lz). */ -#define HAVE_LIBZ 1 +/* Define to 1 if you have the `utime' function. */ +#define HAVE_UTIME 1 + +/* Define to 1 if you have the `utimes' function. */ +#define HAVE_UTIMES 1 + +/* Define to 1 if you have the <utime.h> header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the <wchar.h> header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the `wcwidth' function. */ +#define HAVE_WCWIDTH 1 + +/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>. + */ +/* #undef MAJOR_IN_MKDEV */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in + <sysmacros.h>. */ +/* #undef MAJOR_IN_SYSMACROS */ /* Name of package */ #define PACKAGE "file" -/* Version number of package */ -#define VERSION "3.41" +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" -/* HAVE_TM_ZONE */ -#define HAVE_TM_ZONE 1 +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" -/* HAVE_TZNAME */ -#define HAVE_TZNAME 1 +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your <sys/time.h> declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Version number of package */ +#define VERSION "4.10" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -140,3 +202,14 @@ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to a type if <wchar.h> does not define. */ +/* #undef mbstate_t */ + +/* Define to `long' if <sys/types.h> does not define. */ +/* #undef off_t */ + +/* Define to `unsigned' if <sys/types.h> does not define. */ +/* #undef size_t */ |