From 62ab590e892a2daa9a6809a29e1f7120206d3f1d Mon Sep 17 00:00:00 2001 From: Jeroen Ruigrok/asmodai Date: Sat, 18 Dec 2004 17:18:43 +0000 Subject: [PATCH] First stab at file's libmagic. --- lib/libmagic/Makefile | 19 ++++ lib/libmagic/config.h | 195 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 lib/libmagic/Makefile create mode 100644 lib/libmagic/config.h diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile new file mode 100644 index 0000000000..ab0ea49824 --- /dev/null +++ b/lib/libmagic/Makefile @@ -0,0 +1,19 @@ +# $DragonFly: src/lib/libmagic/Makefile,v 1.1 2004/12/18 17:18:43 asmodai Exp $ + +FILEVER= 4.12 +SOURCEDIR= ${.CURDIR}/../../contrib/file-${FILEVER}/src +.PATH: ${SOURCEDIR} + +MAGIC= /usr/share/misc/magic + +LIB= magic +SHLIB_MAJOR= 1 + +SRCS= apprentice.c apptype.c ascmagic.c compress.c fsmagic.c funcs.c\ + is_tar.c magic.c print.c readelf.c softmagic.c +INCS= magic.h + +CFLAGS+= -DHAVE_CONFIG_H -DMAGIC=\"${MAGIC}\" +CFLAGS+= -I${.CURDIR} -I${SOURCEDIR} + +.include diff --git a/lib/libmagic/config.h b/lib/libmagic/config.h new file mode 100644 index 0000000000..bc7386a8f2 --- /dev/null +++ b/lib/libmagic/config.h @@ -0,0 +1,195 @@ +/* $DragonFly: src/lib/libmagic/config.h,v 1.1 2004/12/18 17:18:43 asmodai Exp $ */ +/* config.h. Generated by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Use the builtin ELF recognition code */ +#define BUILTIN_ELF 1 + +/* Recognize ELF core files */ +#define ELFCORE 1 + +/* */ +/* #undef HAVE_DAYLIGHT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `z' library (-lz). */ +#define HAVE_LIBZ 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* */ +#define HAVE_LONG_LONG 1 + +/* Define to 1 if you have the `mbrtowc' function. */ +/* #undef HAVE_MBRTOWC */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_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 to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the 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 header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the 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 header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_UTIME_H */ + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* */ +#define HAVE_TM_ISDST 1 + +/* HAVE_TM_ZONE */ +#define HAVE_TM_ZONE 1 + +/* HAVE_TZNAME */ +#define HAVE_TZNAME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 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 header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the `wcwidth' function. */ +/* #undef HAVE_WCWIDTH */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in . + */ +/* #undef MAJOR_IN_MKDEV */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in + . */ +/* #undef MAJOR_IN_SYSMACROS */ + +/* Name of package */ +#define PACKAGE "file" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* 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 SIZEOF_UINT16_T 2 + +/* */ +#define SIZEOF_UINT32_T 4 + +/* */ +#define SIZEOF_UINT64_T 8 + +/* */ +#define SIZEOF_UINT8_T 1 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Version number of package */ +#define VERSION "4.12" + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* */ +/* #undef int32_t */ + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* Define to `long' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned' if does not define. */ +/* #undef size_t */ + +/* */ +/* #undef uint16_t */ + +/* */ +/* #undef uint32_t */ + +/* */ +/* #undef uint64_t */ + +/* */ +/* #undef uint8_t */ -- 2.41.0