php-src/ext/fileinfo
Arnaud Le Blanc 11accb5cdf
Preferably include from build dir (#13516)
* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

    -I$(top_builddir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/main
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM
    -I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

    -I$(top_builddir)/main
    -I$(top_builddir)
    -I$(top_srcdir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.
2024-06-26 00:26:43 +02:00
..
libmagic Define HAVE_VISIBILITY for fileinfo extension (#14618) 2024-06-21 16:18:28 +02:00
tests Merge branch 'PHP-8.3' 2024-04-11 15:58:25 +02:00
config.m4 Define HAVE_VISIBILITY for fileinfo extension (#14618) 2024-06-21 16:18:28 +02:00
config.w32 Update libmagic to 5.45 (#13369) 2024-02-13 21:11:57 +01:00
create_data_file.php Fix bug #65106: PHP fails to compile ext/fileinfo 2024-03-22 15:00:15 +01:00
CREDITS It looks like i should've taken joint response on ext/fileinfo long ago 2017-10-11 22:21:34 +02:00
data_file.c Fix bug #65106: PHP fails to compile ext/fileinfo 2024-03-22 15:00:15 +01:00
fileinfo_arginfo.h Declare the missing true return types (#13709) 2024-03-16 07:26:37 +01:00
fileinfo.c Preferably include from build dir (#13516) 2024-06-26 00:26:43 +02:00
fileinfo.stub.php Declare the missing true return types (#13709) 2024-03-16 07:26:37 +01:00
generate_patch.sh Update libmagic to 5.45 (#13369) 2024-02-13 21:11:57 +01:00
libmagic.patch Sync PHP_FILEINFO_UNCOMPRESS #if/ifdef/defined (#14525) 2024-06-10 08:11:25 +02:00
magicdata.patch Update libmagic to 5.45 (#13369) 2024-02-13 21:11:57 +01:00
Makefile.frag Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
php_fileinfo.h fileinfo: Introduce php_libmagic.* to simplify patch 2022-10-02 03:02:47 +02:00
php_libmagic.c ext/fileinfo: Fix [-Wsign-compare] warnings 2024-06-06 16:18:23 +01:00
php_libmagic.h Remove redundant win32/unistd.h includes (#14533) 2024-06-11 09:47:23 +02:00