Commit Graph

582 Commits

Author SHA1 Message Date
Anatol Belski
3082600326 Update libmagic.patch [ci skip] 2018-08-06 14:28:32 +02:00
Anatol Belski
e1af7a794a Fix possible stack buffer overflow 2018-08-04 16:56:08 +02:00
Peter Kokot
f2e4de8b56 Fix AC_RUN_IFELSE calls when cross-compiling
AC_RUN_IFELSE program can't be run when cross-compiling. This fix removes
warnings given by autotools scripts.
2018-07-30 06:38:59 +02:00
Peter Kokot
4371945b8b Replace obsolete AC_TRY_FOO with AC_FOO_IFELSE
Autoconf 2.50 released in 2001 made several macros obsolete including
the AC_TRY_RUN, AC_TRY_COMPILE and AC_TRY_LINK:
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2

These macros should be replaced with the current AC_FOO_IFELSE instead:
- AC_TRY_RUN with AC_RUN_IFELSE and AC_LANG_SOURCE
- AC_TRY_LINK with AC_LINK_IFELSE and AC_LANG_PROGRAM
- AC_TRY_COMPILE with AC_COMPILE_IFELSE and AC_LANG_PROGRAM

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version therefore systems
should be well supported by now.

This patch was created with the help of autoupdate script:
autoupdate <file>

Reference docs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
2018-07-30 02:36:38 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Gabriel Caruso
c93aba042f
Give a reason why the test was skipped
This will help us debug why a test was skipped in GCOV
(http://gcov.php.net/viewer.php?version=PHP_HEAD&func=skip), and maybe
put them to run again
2018-07-22 16:41:41 -03:00
Peter Kokot
d6ccaef3e6 Bump fileinfo extension version to PHP release version
To sync core extensions and their versioning more the fileinfo extension
can be versioned same way as PHP releases.
2018-06-15 00:28:28 +02:00
Anatol Belski
01b9975639 [ci skip] Update libmagic.patch 2018-06-03 14:06:11 +02:00
Anatol Belski
6f24d75b56 Remove unnecessary decls, php.h is included 2018-06-03 12:45:37 +02:00
Anatol Belski
4363588f2f Align the ported place with libmagic 2018-06-03 12:14:42 +02:00
Dmitry Stogov
f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
dbea6e154d Update libmagic.patch 2018-04-30 14:29:55 +02:00
Anatol Belski
94699d2ade Use suitable datatypes 2018-04-30 14:27:11 +02:00
Anatol Belski
f603ab57fc Reuse the struct timespec based pieces in libmagic 2018-04-30 12:02:47 +02:00
Anatol Belski
cf45479a19 Reuse strcasestr implementation from libmagic 2018-04-29 19:39:57 +02:00
Anatol Belski
09db1ae4b7 Fix C89 compat 2018-04-29 16:18:59 +02:00
Anatol Belski
e2182a1ba7 Port libmagic 5.33 2018-04-29 16:02:08 +02:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Gabriel Caruso
fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
c6c9e71a5b Add missing SKIPIF sections 2018-02-03 13:54:34 +01:00
Gabriel Caruso
2238403892 Trailing whitespaces on ext/*
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-04 02:38:32 -02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Anatol Belski
259085f201 Update libmagic.patch, also reflecting PCRE2 changes 2017-12-21 15:47:07 +01:00
Anatol Belski
aa978538ca Merge branch 'PHP-7.2'
* PHP-7.2:
  fileinfo: fix misleading indentation in libmagic
2017-12-21 15:42:16 +01:00
Riccardo Magliocchetti
e313daa598 fileinfo: fix misleading indentation in libmagic 2017-12-21 15:39:00 +01:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Anatol Belski
20d930d8f3 Fix remaining signedness warnings 2017-11-14 17:07:09 +01:00
Anatol Belski
a5bc5aed71 Patch core for PCRE2 support
RFC https://wiki.php.net/rfc/pcre2-migration
2017-11-13 19:37:38 +01:00
Anatol Belski
c51bc3814a Merge branch 'PHP-7.2'
* PHP-7.2:
  Update libmagic.patch
2017-10-23 19:18:57 +02:00
Anatol Belski
b4db9e9acc Update libmagic.patch 2017-10-23 19:18:25 +02:00
Anatol Belski
bcad693468 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fail hard when re2c is not found or the version requirement not met
  Fix mismatching alloc
2017-10-23 19:15:43 +02:00
Anatol Belski
fb0be397d0 Fix mismatching alloc 2017-10-23 18:49:17 +02:00
Anatol Belski
cc8a28fb18 Merge branch 'PHP-7.2'
* PHP-7.2:
  It looks like i should've taken joint response on ext/fileinfo long ago
2017-10-11 22:26:09 +02:00
Anatol Belski
81473829d4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  It looks like i should've taken joint response on ext/fileinfo long ago
2017-10-11 22:25:27 +02:00
Anatol Belski
677cd85cb7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  It looks like i should've taken joint response on ext/fileinfo long ago
2017-10-11 22:24:52 +02:00
Anatol Belski
23e97b0222 It looks like i should've taken joint response on ext/fileinfo long ago 2017-10-11 22:21:34 +02:00
Anatol Belski
bfe19cb355 Merge branch 'PHP-7.2'
* PHP-7.2:
  Cleanup irrelevant info
2017-10-11 19:00:41 +02:00
Anatol Belski
747f70ba82 Cleanup irrelevant info 2017-10-11 18:40:16 +02:00
Anatol Belski
b7a5d52e98 Merge branch 'PHP-7.2'
* PHP-7.2:
  Upgrade bundled libmagic to 5.31
2017-10-11 18:24:29 +02:00
Anatol Belski
08d8623dec Upgrade bundled libmagic to 5.31 2017-10-11 18:18:55 +02:00
Peter Kokot
5cf017a132 Remove EXPERIMENTAL files from fileinfo and pdo_odbc stable extensions 2017-09-30 01:58:08 +02:00
Kalle Sommer Nielsen
c34ba92782 Get rid of all these old package[2].xml files, most of these had no had a release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl
OCI, PDO_OCI and zip are left as they are actively developed and released there
2017-08-17 22:09:29 +02:00
Anatol Belski
03383119d2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  remove dup of the binary file, rely on a test runtime copy instead
2017-07-30 17:52:36 +02:00
Anatol Belski
eab66f9068 remove dup of the binary file, rely on a test runtime copy instead 2017-07-30 17:51:27 +02:00
Dmitry Stogov
71daef93bc preg_replace() optimization 2017-06-07 13:50:16 +03:00