Permalink
Browse files

Backported the fix for bug #63248 from 5.4+

  • Loading branch information...
1 parent 1702024 commit 8a84b1b5d9ccb78cff61f386a6a92737ac091ee2 @weltling weltling committed Nov 23, 2012
Showing with 144 additions and 114 deletions.
  1. +3 −0 NEWS
  2. +10 −16 ext/fileinfo/config.w32
  3. +107 −85 ext/fileinfo/libmagic.patch
  4. +24 −13 ext/fileinfo/libmagic/apprentice.c
View
3 NEWS
@@ -12,6 +12,9 @@ PHP NEWS
shared objects are not created). (kemcline at au1 dot ibm dot com)
- Apache2 Handler SAPI:
. Enabled Apache 2.4 configure option for Windows (Pierre, Anatoliy)
+- Fileinfo:
+ . Fixed bug #63248 (Load multiple magic files from a directory under Windows).
+ (Anatoliy)
22 Nov 2012, PHP 5.3.19
View
@@ -4,22 +4,16 @@
ARG_ENABLE("fileinfo", "fileinfo support", "no");
if (PHP_FILEINFO != 'no') {
- if (CHECK_HEADER_ADD_INCLUDE("dirent.h", "CFLAGS_FILEINFO") &&
- CHECK_LIB("dirent_a.lib", "fileinfo", PHP_FILEINFO)) {
- LIBMAGIC_SOURCES=" apprentice.c apptype.c ascmagic.c \
- cdf.c cdf_time.c compress.c \
- encoding.c fsmagic.c funcs.c \
- is_tar.c magic.c print.c \
- readcdf.c readelf.c softmagic.c";
+ LIBMAGIC_SOURCES=" apprentice.c apptype.c ascmagic.c \
+ cdf.c cdf_time.c compress.c \
+ encoding.c fsmagic.c funcs.c \
+ is_tar.c magic.c print.c \
+ readcdf.c readelf.c softmagic.c";
- if (VCVERS < 1500) {
- ADD_FLAG('CFLAGS', '/Zm1000');
- }
+ if (VCVERS < 1500) {
+ ADD_FLAG('CFLAGS', '/Zm1000');
+ }
- EXTENSION('fileinfo', 'fileinfo.c', true, "/I" + configure_module_dirname + "/libmagic /I" + configure_module_dirname);
- ADD_SOURCES(configure_module_dirname + '\\libmagic', LIBMAGIC_SOURCES, "fileinfo");
- } else {
- WARNING("fileinfo not enabled; libraries and headers not found");
- PHP_FILEINFO = "no";
- }
+ EXTENSION('fileinfo', 'fileinfo.c', true, "/I" + configure_module_dirname + "/libmagic /I" + configure_module_dirname);
+ ADD_SOURCES(configure_module_dirname + '\\libmagic', LIBMAGIC_SOURCES, "fileinfo");
}
Oops, something went wrong.

0 comments on commit 8a84b1b

Please sign in to comment.