Commit Graph

505 Commits

Author SHA1 Message Date
Derick Rethans
973be68c63 Prepare for 7.4.10 2020-07-21 09:23:51 +01:00
Christoph M. Becker
2c0a6977dd 7.3 is now 7.3.22-dev 2020-07-21 09:18:07 +02:00
Remi Collet
4884f1be85 define COMPILER and ARCHITECTURE from environment 2020-07-13 11:14:02 +02:00
Remi Collet
ad0d2e438f display info about system used to build and its provider 2020-07-06 10:54:43 +02:00
Nikita Popov
6838ebb1a8 Remove unnecessary ieeefp.h include
This was needed when php_config.h also declare compatibility
shims for isinf() and friends. These are no longer present in
master, so drop this include.
2020-06-30 15:54:47 +02:00
Eddie Kohler
ff69a8a789 Move __alignof__ support check into main configure.ac. 2020-06-30 14:26:48 +02:00
David Carlier
1cbb62e82d Haiku proc_open build fix, *pty api resides on the BSD library
Closes GH-5770.
2020-06-26 12:06:21 +02:00
Nikita Popov
7d05bc8630 Fix crypt_r detection
And force use of our own php_crypt_r implementation to keep
previous behavior despite that.
2020-06-24 12:09:49 +02:00
Alex Dowad
7a9f0cc3d0 Simplify _crypt_extended_init_r, and fix redundant initialization on Win32/Solaris
Looking at the history of this function, the original implementation had a bug where
it would return from the middle of the function without unlocking the mutex first.
The author attempted to fix this by incrementing the `initialized` flag atomically,
which is not necessary, since the section which modifies the flag is protected by a
mutex.

Coincidentally, at the same time that all this unnecessary 'atomic' machinery was
introduced, the code was also changed so that it didn't return without unlocking the
mutex. So it looks like the bug was fixed by accident.

It's not necessary to declare the flag as `volatile` either, since it is protected
by a mutex.

Further, the 'fixed' implementation was also wrong in another respect: on Windows
and Solaris, the `initialized` flag was not even declared as `static`!! So the
initialization of the static tables for S-boxes, P-boxes, etc. was repeated on
each call to `php_crypt`, completely defeating the purpose of this function.
2020-06-23 16:10:54 +02:00
Christoph M. Becker
91982bad63 7.3 is now 7.3.21-dev 2020-06-23 10:29:42 +02:00
Derick Rethans
13f9f874a7 PHP-7.4 is now 7.4.9-dev 2020-06-23 08:46:37 +01:00
Alex Dowad
7e2147be23 Clean up some unused code (and fix some comments) in build scripts
- Fix typo in build/php.m4

- Nothing uses HAVE_INTTYPES_H; so remove check for header file

- Nothing defines ZEND_ACCONFIG_H_NO_C_PROTOS; so remove #ifndef

- `format_money` was removed in 2019, so <monetary.h> no longer needed

- Nothing uses HAVE_NETDB_H; so remove check for header file

- Nothing checks HAVE_TERMIOS_H; so remove check for header file

    (This was actually added when Wez Furlong was adding the original implementation of
    PTY support in `proc_open`, since replaced.)

- Nothing checks HAVE_SYS_AUXV_H; so remove check for header file

- PHP_BUILD_DATE variable is not used for anything, so remove it

    This variable was added to the Makefile, but from there, was not used for anything.
    The comments suggest it was intended to allow 'reproducible builds'. Presumably,
    this means that if a bug is found in a PHP binary somewhere, one could look at the
    Makefile which it was built from, see the date, and then could check the same
    code version out from source control. But... there can easily be multiple commits
    to the repo in the same day. Also, what makes us think that the Makefile which a
    binary was built from will be easily available?

    Besides, ext/standard/info.c already embeds the build date and time in each binary...
    but it does it using `__DATE__` and `__TIME__` (see `php_print_info`).

- Nothing checks HAVE_FINITE; so don't check for function

- Grammar fix to comment in build/php.m4

- Nothing sets $php_ldflags_add_usr_lib variable in configure, so remove conditional

    This was added in 2002, when Rasmus was having difficulty building PHP on some
    host and needed to have /usr/lib in the rpath. It was never documented and
    probably has never been used by anyone else.
2020-06-19 22:04:52 +02:00
David Carlier
bb61346580 Fix Haiku build
getrusage supports only two fields. The network api sits in the network lib.

Closes GH-5732.
2020-06-19 17:21:55 +02:00
Alex Dowad
3a19726bce Remove unneeded --disable-inline-optimization build parameter
In 1999, inline optimization was turned off by default. The commit log indicates this was
done because GCC was running out of memory on some hosts when building the Zend executor.
In 2003, inline optimization was re-enabled by default, but a build option was added to
turn it off if one runs out of memory when building.

Computing hardware has come a long way since 2003 and I doubt that anyone is running out
of memory when building PHP now.

Interestingly, this code set an unused variable called `INLINE_CFLAGS`. It actually
disabled inline optimization by adding -O0 to the build command, not using `INLINE_CFLAGS`.

Just to see how much memory GCC/Make are using when building PHP, I tried building with
successively higher values of `ulimit -v` until it succeeded. Interestingly, while most
of the codebase can be built with about 400MB of memory, ext/fileinfo/libmagic/apprentice.c
requires 1.2GB, doubtless because it includes ext/fileinfo/data_file.c, which is more
than 350,000 lines long. That is with GCC 7.5.0.

Most users get PHP as a binary package anyways, so the question is, are *packagers*
of PHP trying to build on machines with just 1GB RAM? And would they want to package
a PHP interpreter built with *no optimizations*? I can't imagine either being true.
2020-06-17 19:31:35 +02:00
Nikita Popov
1d8233877c Merge branch 'PHP-7.4'
* PHP-7.4:
  Allow defining of uname value for reproducible builds
2020-06-07 10:38:50 +02:00
Jelle van der Waa
d21b1c5679 Allow defining of uname value for reproducible builds
Extend configure.ac to accept PHP_UNAME as env variable to set the value of the
PHP_UNAME define in a reproducible manner. This allows distributions to set a
fixed value for php_uname and keep the default behaviour if PHP_UNAME is not
set.

Motivation: https://reproducible-builds.org/

Closes GH-5671.
2020-06-07 10:38:43 +02:00
Benjamin Eberlei
a7908c2d11 Add Attributes
Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
2020-06-04 18:19:49 +02:00
Christoph M. Becker
c249f593ef 7.3.20 will be next 2020-05-26 10:53:22 +02:00
Nikita Popov
e852944f63 Add --enable-memory-sanitizer flag
This flag enabled msan late in the pipeline, so that it does
not affect configure checks.

Otherwise we get a false positive report for openpty availability
without -lutil, which will then result in infinite recursion if
actually called.

This also sets origin tracking to 2, so bump the timeout to 90
minutes.
2020-05-20 16:46:28 +02:00
Christoph M. Becker
c4badcbec4 Bump version
Seems that has been forgotten.
2020-05-19 17:24:18 +02:00
Alex Dowad
a84cd96e86 Add PTY support to proc_open (again after 16 long years)
Back in 2004, a feature was added to proc_open which allowed it to open a PTY,
connecting specific FDs in the child process to the slave end of the PTY and returning
the master end of the PTY (wrapped as a PHP stream) in the `$pipes` array. However,
this feature was disabled just about a month later. Little information is available
about why this was done, but from talking to the original implementer, it seems there
were portability problems with some rare flavors of Unix.

Re-enable this feature with a simplified implementation which uses openpty(). No
attempt is made to support PTYs if the platform does not have openpty(). The configure
script checks if linking with -lutil is necessary to use openpty(), but if anything
else is required, like including some special header or linking with some other library,
PTY support will be disabled.

The original PTY support for proc_open automatically daemonized the child process
(disassociating it from the TTY session and process group of the parent). However,
I don't think this is a good idea. Just because a user opens a child process in a
PTY, it doesn't mean they want it to continue running even when the parent process
is killed. Of course, if the child process is some kind of server, it will likely
daemonize itself; but we have no reason to preempt that decision.

It turns out that since 2015, there has been one test case for PTY support in
proc_open() in the test suite. This test was added in GitHub PR #1588
(https://github.com/php/php-src/pull/1588). That PR mentioned that the PHP
binary in the Debian/Ubuntu repositories is patched to *enable* PTY support. Checking
the Debian PHP repository (https://salsa.debian.org/php-team/php.git) shows that this
is still true. Debian's patch does not modify the implementation from 2004 in any
way; it just removes the #if 0 line which disables it.

Naturally, the test case is skipped if PTY support is not enabled. This means that ever
since it was added, every test run against the 'vanilla' PHP codebase has skipped it.

Interestingly, the test case which was added in 2015 fails on my Linux Mint PC... both
with this simplified implementation *and* when enabling the original implementation.
Investigation reveals the reason: when the child process using the slave end of the
PTY exits and its FDs are all closed, and all buffered data is read from the master
end of the PTY, any further attempt to read from the master end fails with EIO. The
test case seems to expect that reading from the master end will always return an
empty string if no data is available.

Likely this is because PHP's fread() was updated to report errors from the underlying
system calls only recently.

One way out of this dilemma: IF at least one FD referring to the slave end of the PTY is
kept open *in the parent process*, the failure with EIO will not occur even after the child
process exits. However, that would raise another issue: we would need a way to ensure the FD
will be closed eventually in long-running programs.

Another discovery made while testing this code is that fread() does not always return
all the data written to the slave end of the PTY in a single call, even if the data was
written with a single syscall and it is only a few bytes long.

Specifically, when the child process in the test case writes "foo\n" to the PTY, the parent
sometimes receives "foo" (3 bytes) and sometimes "foo\r\n" (5 bytes). (The "\r" is from the
TTY line discipline converting "\n" to "\r\n".) A second call to fread() does return the
remaining bytes, though sometimes all the data is read in the first call, and by the time
the second call is made, the child process has already exited. It seems that liberal use
of the @ operator is needed when using fread() on pipes.

Thanks to Nikita Popov for suggesting that we should just use openpty() rather than
grantpt(), unlockpt(), etc.
2020-05-14 10:25:37 +02:00
Nikita Popov
ae5ca5459f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix lcov genhtml: ERROR: cannot read [file]
  Properly detect CRC32 APIs on aarch64 from configure
2020-05-14 09:39:03 +02:00
Ondřej Surý
d4bebc874b Properly detect CRC32 APIs on aarch64 from configure
The CRC32 APIs are optional for armv8-a. They became mandatory since
armv8.1-a.

Closes GH-5564.
2020-05-14 09:38:05 +02:00
Nikita Popov
5dc9418a97 Reapply "Remove configure checks for supported instruction sets"
I reverted this previously for 7.4 because of bug #78769. Relanding
it now for master, because I still believe that this change is
right, and if it causes complications, those indicate a bug elsewhere.

---

These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.

This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.
2020-05-11 12:22:28 +02:00
Christoph M. Becker
6998cc5029 Bump version 2020-04-28 09:10:50 +02:00
Alex Dowad
77ee4e63a6
Nothing in codebase cares whether platform has fpclass()
Therefore, don't bother checking for it in 'configure' script.

Closes GH-5453
2020-04-24 21:39:55 +02:00
Derick Rethans
01634f8410 The 7.4 branch is now for 7.4.6 2020-03-31 14:57:12 +01:00
Christoph M. Becker
33226c3a17 Next is 7.3.18 2020-03-31 10:22:55 +02:00
George Peter Banyard
457380cae7 Drop wchar header check as always defined since C95 2020-03-31 00:14:56 +02:00
Nikita Popov
e8e09b60b4 Remove rand_r implementation
We already use our own mt13397 implementation nowadays, so we no
longer need this shim.
2020-03-26 11:49:27 +01:00
Nikita Popov
97cb81ead5 Remove HAVE_REALPATH checks
We do not actually use realpath(), but a custom implementation.
Make sure the realpath() function is always available.

Closes GH-5290.
2020-03-26 11:46:00 +01:00
Nikita Popov
f0f2493208 Merge branch 'PHP-7.4'
* PHP-7.4:
  Check for sys/auxv.h before using it.
2020-03-10 16:54:17 +01:00
Peter Seiderer
f73528f0e0 Check for sys/auxv.h before using it.
Fixes aarch64 compile with uclibc-ng (does not provide
sys/auxv.h header file).

Closes GH-5248.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
2020-03-10 16:53:57 +01:00
Derick Rethans
dc3e3e64f2 PHP-7.4 is now 7.4.5-dev 2020-03-03 11:29:10 +00:00
Christoph M. Becker
9dda3b9eb2 Next is 7.3.17 2020-03-03 10:19:31 +01:00
Nikita Popov
84854a72c7 Remove mergesort implementation
php_mergesort() isn't being used for anything, and hasn't been for
a long time. Even if we wanted to use a stable sort, this isn't
the implementation we'd use...
2020-02-27 10:36:01 +01:00
Nikita Popov
172010a08d Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't use VLA in mysqlnd auth
2020-02-18 16:18:50 +01:00
Nikita Popov
9d31a42a30 Don't use VLA in mysqlnd auth
We use alloca instead of VLA. This should also allow building
this code on Windows.
2020-02-18 16:17:56 +01:00
Christoph M. Becker
e3632fdc0d Next is 7.3.16 2020-02-04 11:38:29 +01:00
Dmitry Stogov
8bdce8edab Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79092 (Building with clang+lld-9 results in a broken PHP binary)
2020-01-29 12:15:34 +03:00
Dmitry Stogov
ce44cd3b3c Fixed bug #79092 (Building with clang+lld-9 results in a broken PHP binary) 2020-01-29 12:15:03 +03:00
Christoph M. Becker
d684f5fdc0 Fix #79086: Bump version not applied
We must not forget to update the version in configure.ac as well.
2020-01-09 09:25:52 +01:00
Christoph M. Becker
38c0a53b60 Bump version 2020-01-07 11:03:19 +01:00
Derick Rethans
2badeb511b PHP-7.4 is now 7.4.2-dev 2019-12-10 16:56:33 +00:00
George Peter Banyard
1c4ad17cc1 Move isinf, isnan, and isfinite to zend_portability.h
Closes GH-4966
2019-12-05 14:27:51 +01:00
Máté Kocsis
144b41ce88
Remove money_format() function 2019-12-05 13:15:54 +01:00
George Peter Banyard
92d5a2e48c Remove obsolete configure checks for isinf, isnan, and isfinite 2019-12-04 15:17:57 +01:00
Christoph M. Becker
65bbc67063 Next is 7.3.14 2019-12-03 12:04:17 +01:00
Derick Rethans
e99406f4d1 PHP-7.4 is now 7.4.1-dev 2019-11-15 14:22:14 +00:00
Christoph M. Becker
34dda406bd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78788: ./configure generates invalid php_version.h
2019-11-07 10:01:43 +01:00
max
0988f69634 Fix #78788: ./configure generates invalid php_version.h
Change $SED to "${SED}" such that the IFS is not used to split the
output of that variable.
2019-11-07 10:01:02 +01:00
Christoph M. Becker
4c9ba3e042 7.3.13 is next 2019-11-05 18:20:56 +01:00
Nikita Popov
b509d67554 Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Remove configure checks for supported instruction sets"
2019-11-04 11:34:02 +01:00
Nikita Popov
451314111b Revert "Remove configure checks for supported instruction sets"
This reverts commit edccf32f7f.

This was reported to cause issues for as yet unknown reasons in
bug #78769. As this was intended as code cleanup, revert this from
7.4 at least. May reapply it to master later.
2019-11-04 11:32:46 +01:00
Nikita Popov
1517bc4426 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove configure checks for supported instruction sets
2019-10-31 11:34:15 +01:00
Nikita Popov
edccf32f7f Remove configure checks for supported instruction sets
These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.

This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.
2019-10-31 11:27:53 +01:00
Nikita Popov
ad53bacf38 Fix bug #78681 by renaming libphp8.so to libphp.so
The major version number is no longer included.
2019-10-29 16:06:09 +01:00
Nikita Popov
393aa057d3 Merge branch 'PHP-7.4' 2019-10-11 16:51:50 +02:00
Nikita Popov
3718a95526 Remove configure checks for ltp when using --enable-gcov
gcov builds can also be used with other tools like gcovr, so remove
the hard dependency on LTP.
2019-10-11 16:51:03 +02:00
Dmitry Stogov
33958ccb36 Revert "Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI"
This reverts commit db094b4b2e.
2019-10-10 16:28:59 +03:00
Christoph M. Becker
26f45cb4bb 7.3.12 is next 2019-10-08 12:04:25 +02:00
Dmitry Stogov
50527aa49b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI
2019-09-17 15:44:40 +03:00
Dmitry Stogov
db094b4b2e Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI 2019-09-17 15:43:00 +03:00
Nikita Popov
c4e2ca607f Various improvements to fuzzer SAPIs 2019-09-16 16:04:10 +02:00
Christoph M. Becker
cf31210f29 PHP 7.3.10RC1 has been tagged 2019-09-10 15:11:54 +02:00
Florian Weimer
aeaab8ee3e Port various autoconf bits to C99 compilers
C99 no longer has implicit function declarations and implicit ints.
Current GCC versions enable them as an extension, but this will
change in a future GCC version.
2019-09-10 12:32:14 +02:00
Peter Kokot
9bd0cce819 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update NEWS
  Fix #78460: PEAR installation failure
2019-08-30 04:32:30 +02:00
Peter Kokot
18a2f0849f Fix #78460: PEAR installation failure
When building PHP outside of the source tree:

  mkdir custom-build-dir
  cd custom-build-dir
  ../path/to/php-src/configure

The directories need to be manually created including the pear directory
so the pear installation PHAR file doesn't need to be downloaded from
the remote location.

Closes GH-4639
2019-08-30 04:26:05 +02:00
Christoph M. Becker
5536105b67 Next will be 7.3.10 2019-08-13 23:57:48 +02:00
Christoph M. Becker
fe7997912d Bump version numbers
This should have been done four weeks ago already.
2019-08-13 23:23:43 +02:00
Peter Kokot
452356af2a Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove outdated Libtool hack for macs
2019-07-24 21:43:26 +02:00
Peter Kokot
793dfa91bb Remove outdated Libtool hack for macs
This was once relevant for older versions of macs and autoconf 2.13.

Closes GH-4435
2019-07-24 21:40:21 +02:00
Peter Kokot
605386e394 Remove HAVE_LOCALE_H and locale.h check
This was a left over for supporting old code in PHP extensions out there.
Check is not needed anymore since this is part of C89+ standard.

Closes GH-4445
2019-07-21 00:37:47 +02:00
Peter Kokot
f33d12096d Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove duplicate socklen_t check
2019-07-18 12:11:45 +02:00
Peter Kokot
bbdbc2658c Remove duplicate socklen_t check
- Use Autoconf's default AC_CHECK_TYPES

Closes GH-4418
2019-07-18 12:11:19 +02:00
Peter Kokot
b40be8751a Merge branch 'PHP-7.4'
* PHP-7.4:
  Update changelog
  Remove unused build checks
2019-07-16 22:47:02 +02:00
Peter Kokot
63d6a2b697 Remove unused build checks
- yp_get_default_domain was part of ext/yp
- functions checks produce HAVE_function_name symbols. These checks are
  currently not used in php-src neither in the extensions out there.
- Removed symbols because they are not used in the code:
  - HAVE_GCVT
  - HAVE_PUTENV
  - HAVE_PUTENV
  - HAVE_SETVBUF
  - HAVE_TEMPNAM
  - HAVE_SIN (sin is also defined in C89 standard)
  - HAVE_SETSOCKOPT
  - HAVE_LOCKF
  - HAVE_ISASCII
  - HAVE_YP_GET_DEFAULT_DOMAIN (and other yp extension related unused checks)
  - HAVE_LINK
- HAVE_USLEEP is already defined in Windows configuration header
- HAVE_LIBBIND has not been used in php-src for a while anymore
- HAVE_GETHOSTNAME is duplicated in Windows configuration header

Closes GH-4417
2019-07-16 22:39:09 +02:00
Peter Kokot
5284645fc3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove usage of PHP_AIX_LDFLAGS
2019-07-14 23:45:13 +02:00
Peter Kokot
93b3d2f6ee Remove usage of PHP_AIX_LDFLAGS
These are currently not defined since their usage has been removed via
51ca2dba53
and
53349d69dd
2019-07-14 23:44:01 +02:00
Peter Kokot
5ca149d192 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove duplicate PTHREADS template define
2019-07-14 14:46:55 +02:00
Peter Kokot
66c02cc0a1 Remove duplicate PTHREADS template define
The undef PTHREADS converts to define if thread safety is configured.
This step is already done by pthreads m4 macros from TSRM so this now
removes duplicated PTHREADS defines from php_config.h.
2019-07-14 14:45:27 +02:00
Peter Kokot
567b602bcf Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_MYSQL variable
2019-07-14 13:49:18 +02:00
Peter Kokot
7a6d737de7 Remove PHP_MYSQL variable
PHP_MYSQL variable was once defined by the ext/mysql (--with-mysql).

Closes GH-4399
2019-07-14 13:48:44 +02:00
Peter Kokot
16e64cb5e3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove php_multiple_shlib_versions_ok
2019-07-13 15:06:53 +02:00
Peter Kokot
4e0af6d862 Remove php_multiple_shlib_versions_ok
Variable usage was removed via
913cec6551
2019-07-13 15:06:35 +02:00
Peter Kokot
71bd212d0e Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove WARNING_LEVEL fix for QNX
2019-07-13 14:40:17 +02:00
Peter Kokot
499f2ac132 Remove WARNING_LEVEL fix for QNX
Fix is no longer relevant since the environment variable WARNING_LEVEL
is no longer used to define the value of the -w option for cc.

Closes GH-4398
2019-07-13 14:39:29 +02:00
Nikita Popov
98495f7f30 Merge branch 'PHP-7.4' 2019-07-12 13:14:38 +02:00
Nikita Popov
709897c2a5 Remove unused tsrm_strtok_r() function
There is also a php_strtok_r() function, which is actually used,
but nothing uses the tsrm_strtok_r() variant...
2019-07-12 13:14:24 +02:00
Peter Kokot
1a935e2662 Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor undefining PACKAGE_* symbols
2019-07-11 02:02:01 +02:00
Peter Kokot
a6daded1a4 Refactor undefining PACKAGE_* symbols
Instead of patching configuration headers template generated by
the given tools - autoheader, this moves patching these symbols to
the configure step before creating and invoking the config.status
and before the configuration header file is generated from the
patched template.

Closes GH-4374
2019-07-11 02:00:51 +02:00
Nikita Popov
d63b91db60 Merge branch 'PHP-7.4' 2019-07-10 15:19:43 +02:00
Cyril Pascal
6791107319 Align segments on huge page boundary only for x86
Closes GH-4387.
2019-07-10 15:19:24 +02:00
Peter Kokot
e676aef56a Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove APACHE symbol
2019-07-08 15:06:54 +02:00
Peter Kokot
4b864c2ebb Remove APACHE symbol
The APACHE symbol was used in very early PHP versions to indicate the
Apache module usage. Since PHP 4 this is no longer used in the code.
2019-07-08 15:05:54 +02:00
Peter Kokot
61809b19f7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor genif.sh
2019-07-08 14:59:40 +02:00
Peter Kokot
900de30b0f Refactor genif.sh
Changes:
- Coding style fixes
- ${1+"$@"} replaced with "$@" [1]
- EXTRA_MODULE_PTRS variable is not used anymore
- awk tool defined via environment variable
- srcdir determined automatically from the genif.sh location

[1] https://www.in-ulm.de/~mascheck/various/bourne_args/

Closes GH-4372
2019-07-08 14:58:26 +02:00
Peter Kokot
da54b1c20e Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove C89 checks for signal.h and strerror
2019-07-08 12:47:35 +02:00
Peter Kokot
550c2aa89b Remove C89 checks for signal.h and strerror
These are part of the C89 and on today's systems not needed to be
checked anymore. This removes symbols HAVE_SIGNAL and HAVE_STRERROR.

- http://port70.net/~nsz/c/c89/c89-draft.html
- locale.h is also part of C89 but will be removed per request in PHP 8
2019-07-08 12:46:51 +02:00
Peter Kokot
c752b74665 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove some unused variables
2019-07-08 10:20:14 +02:00
Peter Kokot
5ba69ab3ad Remove some unused variables
- Variables php_abs_top_srcdir php_abs_top_builddir are no longer used.
- ZEND_EXT_TYPE is always zend_extension and variable is no longer used.

Closes GH-4378
2019-07-08 10:18:17 +02:00
Peter Kokot
04f9a523eb Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_DEBUG_MACRO
2019-07-07 12:16:14 +02:00
Peter Kokot
3bde4838f4 Remove PHP_DEBUG_MACRO
The macro is no longer used. The warning at the end of the configure
script therefore is also no longer used.
2019-07-07 12:15:36 +02:00
Peter Kokot
35709b56e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove some more Apache 1 left overs
2019-07-07 12:10:59 +02:00
Peter Kokot
49cc2a63b3 Remove some more Apache 1 left overs
- warning in configure.ac is relevant for the sapi/apache
- errors output redirected to /dev/null when checking Apache version
2019-07-07 12:09:19 +02:00
Peter Kokot
0707caf163 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move footer to the end of configure output
2019-07-06 04:55:42 +02:00
Peter Kokot
539b577827 Move footer to the end of configure output 2019-07-06 01:00:24 +02:00
Peter Kokot
b36b6c5fdf Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PTHREADS_ASSIGN_VARS
2019-07-05 23:30:51 +02:00
Peter Kokot
1c9e8e8f6a Remove PTHREADS_ASSIGN_VARS
This simplifies TSRM build steps a bit and avoids doing unnecessary
steps:
- The `PTHREADS_CHECK_COMPILE` can called inside the for loops only
  since this is only where the `$pthreads_checked` variable is used.
- Assigning variables can be then done only in the configure.ac
  once.
- use `m4_include()` instead of the `sinclude()` in the middle of
  the build steps.
- The `$threads_result` variable is not used in the code or in
  extensions.
2019-07-05 23:26:20 +02:00
Peter Kokot
d9630aee79 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_CHECK_CONFIGURE_OPTIONS
2019-07-02 22:22:07 +02:00
Peter Kokot
16df718251 Remove PHP_CHECK_CONFIGURE_OPTIONS
Instead of building a custom macro for checking configure options,
Autoconf 2.62+ already outputs a warning at the beginning and the end
of the output of configure script. It automatically detects correct
and wrong options better.

This is related also to bug #55634.

So now instead a better way is the default Autoconf approach:

This outputs a warning at the beginning and end of the configure output:

    ./configure --with-non-existing

This results in fatal error:

    ./configure --non-existing

    configure: error: unrecognized option: `--non-existing'
    Try `./configure --help' for more information

The `--enable-option-checking=fatal` results in fatal error for all non
existing options:

    ./configure --with-non-existing --enable-option-checking=fatal

    configure: error: unrecognized options: --with-non-existing

Closes GH-4348
2019-07-02 22:15:24 +02:00
Peter Kokot
e7c028f00c Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove some old BeOS artefacts
2019-07-02 22:10:24 +02:00
Peter Kokot
b1ef50091d Remove some old BeOS artefacts
- checking for beos systems is no longer relevant in configure.ac
- usage of undefined constant BETHREADS removed.

Closes GH-4346
2019-07-02 22:08:54 +02:00
Peter Kokot
0ae28558bc Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove check for ApplicationServices/ApplicationServices.h
2019-07-02 22:05:41 +02:00
Peter Kokot
534351c014 Remove check for ApplicationServices/ApplicationServices.h
The symbol HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H is not used
and check not needed.

Closes GH-4336
2019-07-02 22:05:00 +02:00
Peter Kokot
b757d49cb5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove TSRM_BASIC_CHECKS
2019-07-01 13:26:17 +02:00
Peter Kokot
30c1c53164 Remove TSRM_BASIC_CHECKS
This macro is not needed anymore. The AC_PROG_CC is done in the main
configure.ac file and the ranlib check is done by the bundled libtool
macros.

Closes GH-4339
2019-07-01 13:23:41 +02:00
Peter Kokot
fa21fda6ab Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove not needed checks for functions
2019-07-01 13:21:44 +02:00
Peter Kokot
e558ee7999 Remove not needed checks for functions
The following functions don't need to be checked anymore since the
they are not used across the code or the symbols aren't used anymore:
- cuserid (not used)
- lrand48 (not used and removed via
  6d6ef7aacc)
- random (check is not used)
- srand48 (not used)
- srandom (not used)
- strdup (check is not used)

and the unused check symbols:
- HAVE_CUSERID
- HAVE_LRAND48
- HAVE_RANDOM
- HAVE_SRAND48
- HAVE_SRANDOM
- HAVE_STRDUP

Closes GH-4338
2019-07-01 13:21:28 +02:00
Peter Kokot
98d0892dd8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Sync functions checks
2019-06-30 23:59:47 +02:00
Peter Kokot
9a3c8e51e3 Sync functions checks
Removed unused checks:
- mbsinit check removed, HAVE_MBSINIT removed (not used in php-src)
- mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since
  560ed89bfb which uses PHP's own implementation)
- strpncpy check removed, added via a8c9e893b6 and
  not used.
- setpgid check removed since HAVE_SETPGID is not used

Moved to a central configure.ac:
- fpclass
- mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src)
- sigprocmask
- getcwd
- getwd
- glob
- strfmon
- nice

Duplicated checks removed:
- gethostname
- getlogin
- getpwuid_r
- socketpair

- mprotect check simplified
2019-06-30 23:57:54 +02:00
Peter Kokot
7ad82d47d3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_LIMITS_H check
2019-06-30 23:46:02 +02:00
Peter Kokot
6c1c66befe Remove HAVE_LIMITS_H check
The limits.h header is part of the C89 and is today available
everywhere. There is no need to check for presence of this header
anymore.

The timelib has already been patched upstream via
aae5907cb7

PHP extensions out there shouldn't rely on symbols defined during the
build anyway and neither they do on this particular symbol anymore.
2019-06-30 23:44:45 +02:00
Peter Kokot
7f994990ea Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_STRCOLL check
2019-06-28 00:13:25 +02:00
Peter Kokot
638c21765c Remove HAVE_STRCOLL check
The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3

- Remove also SKIPIF strcoll check in test
2019-06-28 00:05:55 +02:00
Peter Kokot
6bfa6bff0b Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean headers checks
2019-06-27 02:45:31 +02:00
Peter Kokot
2079b09854 Clean headers checks
Some headers were checked multiple times in the main configure.ac file
and in the bundled extensions or SAPIs themselves. Also many of these
checks are then used accross other extensions or SAPIs so a central
configure.ac makes most sense for these checks.
2019-06-27 02:45:09 +02:00
Nikita Popov
6aaab9adf7 Merge branch 'PHP-7.4' 2019-06-20 16:24:31 +02:00
Nikita Popov
6165c23475 Check for dlsym as well
For some reason, when using GCC with address sanitizer, dlopen
is available without -ldl, but dlsym still needs it. Explicitly check
dlsym so we add the library.
2019-06-20 16:23:04 +02:00
Christoph M. Becker
bcf20963c1 Next is 7.3.8 2019-06-11 13:31:30 +02:00
Anatol Belski
8f85961326 Merge branch 'PHP-7.4'
* PHP-7.4:
  Ported limagic 5.37
2019-05-30 02:23:20 +02:00
Anatol Belski
622b10f06e Ported limagic 5.37 2019-05-30 02:22:40 +02:00
Dmitry Stogov
b22cd2284d Merge branch 'PHP-7.4'
* PHP-7.4:
  Align .text segment for better huge pages usage
2019-05-27 13:38:07 +03:00
Dmitry Stogov
62ded6efbc Align .text segment for better huge pages usage 2019-05-27 13:37:19 +03:00
Joe Watkins
f8d53099c9
Merge branch 'PHP-7.4'
* PHP-7.4:
  Use PKG_CHECK_MODULES to detect valgrind, and share build config with pcre
2019-05-25 09:04:37 +02:00
Hugh McMaster
ef34e00df3
Use PKG_CHECK_MODULES to detect valgrind, and share build config with pcre 2019-05-25 09:04:22 +02:00
Christoph M. Becker
2d93cce03a Prepare 7.3.7-dev 2019-05-14 11:44:58 +02:00
Peter Kokot
2cf90bb2f0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
1e0a4ac10e Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove dead code from configure.ac
2019-05-10 00:44:51 +02:00
Peter Kokot
f7b62b115e Remove dead code from configure.ac
SAPI apache has been removed and now there is apache2handler so this
warning hasn't been used for a while.
2019-05-10 00:44:09 +02:00
Dmitry Stogov
b27f97d858 Merge branch 'PHP-7.4'
* PHP-7.4:
  speed up add and sub operators with overflow detection
2019-05-07 15:38:27 +03:00
Sebastian Pop
adc3b72076 speed up add and sub operators with overflow detection
On A72, google-benchmark measure before and after the patch:
--------------------------------------------------------
Benchmark              Time             CPU   Iterations
--------------------------------------------------------
BM_add_before       13.3 ns         13.3 ns     52626058
BM_sub_before       8.72 ns         8.72 ns     80259343
BM_add_after        4.80 ns         4.80 ns    145926004
BM_sub_after        4.80 ns         4.80 ns    145936496

Before the patch:
fast_long_add_function:
	ldr	x1, [x1]
	ldr	x2, [x2]
	add	x3, x1, x2
	eor	x4, x1, x2
	tbz	x4, #63, .L5
.L2:
	mov	w1, 4
	str	x3, [x0]
	str	w1, [x0, 8]
	ret
	.p2align 2
.L5:
	eor	x4, x1, x3
	tbz	x4, #63, .L2
	scvtf	d0, x1
	scvtf	d1, x2
	mov	w1, 5
	str	w1, [x0, 8]
	fadd	d0, d0, d1
	str	d0, [x0]
	ret

With the patch:
fast_long_add_function:
	ldr    x5, [x1]
	ldr    x6, [x2]
	adds	x5, x5, x6
	bvs	.L2
	mov	w6, 4
	str	x5, [x0]
	str	w6, [x0, 8]
	ret
.L2:
	ldr	x1, [x1]
	mov	w3, 5
	ldr	x2, [x2]
	str	w3, [x0, 8]
	scvtf	d0, x1
	scvtf	d1, x2
	fadd	d0, d0, d1
	str	d0, [x0]
	ret

    php$ ./sapi/cli/php Zend/bench.php

Base:                         Patch:
simple             0.091      simple             0.091
simplecall         0.014      simplecall         0.014
simpleucall        0.041      simpleucall        0.041
simpleudcall       0.045      simpleudcall       0.045
mandel             0.193      mandel             0.193
mandel2            0.229      mandel2            0.229
ackermann(7)       0.044      ackermann(7)       0.044
ary(50000)         0.010      ary(50000)         0.010
ary2(50000)        0.008      ary2(50000)        0.008
ary3(2000)         0.096      ary3(2000)         0.095
fibo(30)           0.149      fibo(30)           0.148
hash1(50000)       0.016      hash1(50000)       0.016
hash2(500)         0.020      hash2(500)         0.020
heapsort(20000)    0.055      heapsort(20000)    0.054
matrix(20)         0.057      matrix(20)         0.057
nestedloop(12)     0.091      nestedloop(12)     0.091
sieve(30)          0.032      sieve(30)          0.032
strcat(200000)     0.010      strcat(200000)     0.010
------------------------      ------------------------
Total              1.199      Total              1.197

    php$ ./sapi/cli/php Zend/micro_bench.php

Base:                                      Patch:
empty_loop         0.051                   empty_loop         0.051
func()             0.181    0.130          func()             0.181    0.130
undef_func()       0.186    0.135          undef_func()       0.186    0.135
int_func()         0.116    0.064          int_func()         0.116    0.064
$x = self::$x      0.235    0.183          $x = self::$x      0.233    0.182
self::$x = 0       0.198    0.147          self::$x = 0       0.198    0.147
isset(self::$x)    0.229    0.178          isset(self::$x)    0.229    0.178
empty(self::$x)    0.231    0.180          empty(self::$x)    0.231    0.180
$x = Foo::$x       0.144    0.093          $x = Foo::$x       0.144    0.093
Foo::$x = 0        0.107    0.056          Foo::$x = 0        0.107    0.056
isset(Foo::$x)     0.140    0.088          isset(Foo::$x)     0.140    0.088
empty(Foo::$x)     0.148    0.097          empty(Foo::$x)     0.148    0.097
self::f()          0.238    0.187          self::f()          0.238    0.187
Foo::f()           0.209    0.158          Foo::f()           0.209    0.158
$x = $this->x      0.123    0.072          $x = $this->x      0.123    0.072
$this->x = 0       0.124    0.073          $this->x = 0       0.124    0.073
$this->x += 2      0.151    0.099          $this->x += 2      0.153    0.101
++$this->x         0.137    0.086          ++$this->x         0.138    0.086
--$this->x         0.137    0.086          --$this->x         0.138    0.086
$this->x++         0.170    0.119          $this->x++         0.172    0.121
$this->x--         0.171    0.119          $this->x--         0.172    0.121
isset($this->x)    0.170    0.119          isset($this->x)    0.170    0.119
empty($this->x)    0.179    0.128          empty($this->x)    0.179    0.128
$this->f()         0.194    0.143          $this->f()         0.194    0.143
$x = Foo::TEST     0.188    0.137          $x = Foo::TEST     0.188    0.136
new Foo()          0.482    0.431          new Foo()          0.479    0.427
$x = TEST          0.109    0.058          $x = TEST          0.109    0.058
$x = $_GET         0.190    0.138          $x = $_GET         0.190    0.139
$x = $GLOBALS['v'] 0.242    0.191          $x = $GLOBALS['v'] 0.242    0.191
$x = $hash['v']    0.196    0.145          $x = $hash['v']    0.196    0.145
$x = $str[0]       0.146    0.094          $x = $str[0]       0.145    0.094
$x = $a ?: null    0.144    0.093          $x = $a ?: null    0.144    0.093
$x = $f ?: tmp     0.174    0.123          $x = $f ?: tmp     0.174    0.123
$x = $f ? $f : $a  0.153    0.101          $x = $f ? $f : $a  0.153    0.101
$x = $f ? $f : tmp 0.148    0.097          $x = $f ? $f : tmp 0.148    0.097
------------------------                   ------------------------
Total              6.143                   Total              6.143
2019-05-07 15:38:17 +03:00
Peter Kokot
465c82b1af Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove TSRM configuration header
2019-04-29 22:35:24 +02:00
Peter Kokot
ce65d2354c Remove TSRM configuration header
TSRM configuration header file was once created by separate autoconf
build system for TSRM and is with the current code not directly needed
like this anymore.
2019-04-29 22:34:43 +02:00
Nikita Popov
4c485586b4 Merge branch 'PHP-7.4' 2019-04-26 09:57:52 +02:00
Nikita Popov
33e8a7b368 Enable -Werror in CI
Add --enable-werror configure option and use it on Travis. It's not
possible to directly use CFLAGS, because it also affects configure
checks which often throw warnings.

We can't enable something similar for Windows builds at this time,
because they throw a lot more warnings.
2019-04-26 09:56:16 +02:00
Peter Kokot
d2e6c1aff1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move Autoconf Archive macros to a common m4 dir
2019-04-23 20:38:57 +02:00
Peter Kokot
beb58ca128 Move Autoconf Archive macros to a common m4 dir
In PHP the build dir is used as a directory for external macros
including Autoconf Archive macros.
2019-04-23 20:37:31 +02:00
Peter Kokot
028ffddf69 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move acinclude.m4 to build/php.m4
2019-04-23 20:32:03 +02:00
Peter Kokot
4e7064d173 Move acinclude.m4 to build/php.m4
The acinclude.m4 file is in a usual Autotools build processed with
Automake's aclocal tool. Since PHP currently doesn't use Automake and
aclocal this file can be moved into the build directory. PHP build
system currently generates a combined aclocal.m4 file that Autoconf
can processes automatically.

However, a newer practice is writing all local macros in separate
dedicated files prefixed with package name, in PHP's case PHP_MACRO_NAME
and putting them in a common `m4` directory. PHP uses currently `build`
directory for this purpose.

Name `php.m4` probably most resembles such file for PHP's case.

PHP manually created the aclocal.m4 file from acinclude.m4 and
build/libtool.m4. Which is also not a particularly good practice [1], so
this patch also removes the generated alocal.m4 usage and uses
m4_include() calls manually in the configure.ac and phpize.m4 files
manually.

- sort order is not important but can be alphabetical
- list of *.m4 files prerequisites for configure script generation
  updated
- Moving m4_include() before AC_INIT also removes all comments starting
  with hash character (`#`) in the included files.

[1] https://autotools.io/autoconf/macros.html
2019-04-23 20:28:45 +02:00
Peter Kokot
7eb8913e04 Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor Zend/acinclude.m4 local macro
2019-04-21 15:53:44 +02:00
Peter Kokot
b1d3509e8c Refactor Zend/acinclude.m4 local macro
There is now only a single M4 macro in the legacy acinclude.m4 file. A
separate acinclude file was once used with a standalone Zend engine
building but with current build system this can be simplified a bit.
2019-04-21 15:53:19 +02:00
Christoph M. Becker
5ae49c43dc Prepare main branch for PHP 7.3.6 2019-04-16 11:56:03 +02:00
Peter Kokot
57cfd706e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_READDIR_R_TYPE
2019-04-13 04:51:03 +02:00
Peter Kokot
769db42341 Remove PHP_READDIR_R_TYPE
The PHP_READDIR_R_TYPE m4 macro has been removed via
2b28f71891.

HAVE_POSIX_READDIR_R in windows header file is also not needed anymore.
2019-04-13 04:50:05 +02:00
Peter Kokot
8afb3e6856 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove duplicated substitude for Makefile
2019-04-09 02:11:57 +02:00
Peter Kokot
8021d52fb6 Remove duplicated substitude for Makefile
The substitution is already done in the CLI's config.m4 file. Current
SAPIs only provide one PHP_EXECUTABLE variable, i.e. PHP CLI so the one
in the configure.ac can be removed.
2019-04-09 02:09:42 +02:00
Peter Kokot
e6f86fb17c Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove checks for locale.h, setlocale, localeconv
2019-04-07 18:34:02 +02:00
Peter Kokot
e06836a1a3 Remove checks for locale.h, setlocale, localeconv
The `<loccale.h>` header file, setlocale, and localeconv are part of the
standard C89 [1] and on current systems can be used unconditionally.

Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`,
`HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in
configure.ac [2] can be ommitted and simplifed.

The bundled libmagic (file) has also been patched already in version
5.35 and up in upstream location so when it will be patched also in
php-src the check for locale.h header is still left in the configure.ac
and in windows headers definition file.

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

Omit the bundled libmagic files
2019-04-07 18:32:54 +02:00
Peter Kokot
06fc66ed7c Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor AC_INIT in configure.ac and PHP versions
2019-04-07 05:54:12 +02:00
Peter Kokot
afd52f9d99 Refactor AC_INIT in configure.ac and PHP versions
Since Autoconf 2.53 the AC_INIT call with only a single argument has
been made obsolete and now includes several other optional arguments to
make installation experience a bit better by providing program version
and links to the project in the `./configure -h` output. This patch also
updates win build version. The phpize.m4 AC_INIT has been updated with
the call without arguments.
2019-04-07 05:52:14 +02:00
Dmitry Stogov
9a06876072 Added JIT compiler for x86 and x86_64 2019-04-01 10:27:11 +03:00
Peter Kokot
d31a40dbcd Merge branch 'PHP-7.4'
* PHP-7.4:
  Join README.GIT-RULES and CONTRIBUTING.md
2019-03-30 16:01:53 +01:00
Peter Kokot
a8e879c53f Join README.GIT-RULES and CONTRIBUTING.md
This patch joins two very much related pieces of docs together in a
single file dedicated to all sorts of contributing info.

Some more changes:
- Branches info copied from the current master branch
- LXR and bonsai info removed
- Duplicated info reduced a bit
- Security branch updated to 7.1
- Refactor intro for Git commit rules
- Updated README.GIT-RULES file usage in win32/build/confutils.js
- Refactored configure.ac
2019-03-30 15:58:23 +01:00
Peter Kokot
b49022b3dc Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor PHP_PROG_BISON and PHP_PROG_RE2C
2019-03-30 02:02:14 +01:00
Peter Kokot
3207741df0 Refactor PHP_PROG_BISON and PHP_PROG_RE2C
This patch refactors these macros to also checks for the required given
versions of bison and re2c.

- PHP_PROG_RE2C and PHP_PROG_BISON take optional args - minmimum version
  required, and bison also excluded versions.
- Instead of caching values this uses manual checking and messaging
  outputs.
- It looks like the minimum version of RE2C 0.13.4 is working ok so far.

The genfiles script improvements:
- Add make override in genfiles
- Move checkings from makedist to genfiles
- Refactored output messages
- Various minor enhancements
2019-03-30 02:01:02 +01:00
Peter Kokot
011c935ae3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove php7.spec.in file
2019-03-28 17:45:02 +01:00
Peter Kokot
5e16f5b8d8 Remove php7.spec.in file
RPM specification file was introduced via
7c2f1384d4 for PHP to include official
RPM packages long time agon. With removal of the makerpm script via
3d51d4c90c and Linux repositories to
manage such updated and customized info in their repositories this file
is most likely not needed anymore.
2019-03-28 17:42:11 +01:00
Joe Watkins
f43ce705fe
remove last enable-maintainer-zts mention from source 2019-03-26 18:28:18 +01:00
Joe Watkins
bd73607b9e
TSRM cleanup for PHP8 2019-03-25 08:00:17 +01:00
Joe Watkins
161adfff3f
For consistency with Windows, and because ZTS is not experimental or a "maintainer" feature, this commits renames --enable-maintainer-zts to --enable-zts in the autotools build, and related documentation 2019-03-23 07:34:54 +01:00
Christoph M. Becker
a2de42041c Prepare main branch for PHP 7.3.5 2019-03-19 16:20:55 +01:00
Peter Kokot
347128a12b Merge branch 'PHP-7.4'
* PHP-7.4:
  Sync AC_CHECK_SIZEOF m4 macro calls
2019-03-18 02:13:12 +01:00
Peter Kokot
ccc29473ec Sync AC_CHECK_SIZEOF m4 macro calls
- AC_CHECK_SIZEOF is now called mostly only in PHP_CHECK_STDINT_TYPES()
  macro except for some parts checking for the 32 or 64 bit architecture.
- SIZEOF_CHAR removed since it is always 1
- ZEND_BIN_ID is now of a more logical pattern `BIN_48888` on 64bit
  architectures and `BIN_44444` on 32bit instead of literal string
  `BIN_SIZEOF_CHAR48888` on 64bit and `BIN_SIZEOF_CHAR44444` on 32bit.
  The unneeded SIZEOF_CHAR part has been removed.
- XMLRPC_TYPE_CHECKS removed
- The `long long int` is the same as `long long` and redundant checks
  removed accordingly.
- Removed PHP_CHECK_64BIT macro. Checking if current platform is 64bit
  or not can be also done simply by using a check of the long type on
  place. This removes redundant m4 macro PHP_CHECK_64BIT.
2019-03-18 02:11:23 +01:00
Peter Kokot
160f3636db Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean build system
2019-03-14 20:21:30 +01:00
Peter Kokot
97d25c87d2 Clean build system
Changes:
- AC_TYPE_SIZE_T called on only one place (configure.ac)
- AC_FUNC_ALLOCA called on only one place (configure.ac)
- AC_TYPE_UID_T called on only one place (configure.ac)
- HAVE_STRSTR removed since strstr is part of C89 standard [1]
- Remove checks for strtol and strpbrk
- Checking for the presence of perror function is not needed anymore
  since it is part of C89 standard and PHP calls it unconditionally.
- Checking for functions strdup, setenv, strerror, and memmove done only
  on one place (configure.ac)
- outdated check for snprintf removed

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 20:20:12 +01:00
Peter Kokot
4b3da12363 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_STRFTIME
2019-03-14 19:43:45 +01:00
Peter Kokot
3a857852a8 Remove HAVE_STRFTIME
Function strftime is part of the C89 standard [1] and current systems
don't need to check for its presence anymore.

Additionally, checks for strftime function in tests have been removed
since the PHP strftime function is now always available.

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 19:42:29 +01:00
Remi Collet
f9f422659c Merge branch 'PHP-7.4'
* PHP-7.4:
  add --enable-rtld-now in upgrade info
  use DL_LOAD in litespeed
  add --enable-rtld-now build option to change dlopen behavior
2019-03-12 08:26:36 +01:00
Remi Collet
d633cbac1c add --enable-rtld-now build option to change dlopen behavior 2019-03-12 08:23:06 +01:00
Joe Watkins
99230784f5
Merge branch 'PHP-7.4'
* PHP-7.4:
  zend_weakrefs
2019-03-12 00:37:28 +01:00
Joe Watkins
6529d7acd9
zend_weakrefs 2019-03-12 00:35:35 +01:00
Peter Kokot
80bebdd0e1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean *nix build system
2019-03-07 21:00:36 +01:00
Peter Kokot
f5fa9ddbd5 Clean *nix build system
- remove some outdated and not used macro calls
- remove some unused variables
- Remove not needed comment from tokenizer config.m4
- Remove not needed comment
- remove not needed local variables for editors and syntax highlighting
2019-03-07 20:58:14 +01:00
Peter Kokot
d0fd9fe977 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add AS_HELP_STRING to *nix build configure options
2019-03-07 20:38:04 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
2968a1d7f2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove legacy AC_CHECK_TYPE calls for uint and ulong
2019-03-06 22:50:46 +01:00
Peter Kokot
bebcdcc745 Remove legacy AC_CHECK_TYPE calls for uint and ulong
The AC_CHECK_TYPE was refactored in more recent versions of Autoconf
and the call with two arguments is obsolete and not recommended anymore.

This patch also refactors some leftovers of using ulong and uint which
are not standard nor common usages of types in C.

The ulong can be used as zend_ulong and uint usage is actually
`unsigned int`.

The usage of HAVE_ULONG removed since it is not used in current code
base.

Legacy edgecase for some legacy HPUX systems removed:
- sys/stream.h header is not checked and the HAVE_SYS_STREAM_H is
  not defined with current build system.

- flags are unsigned int
- max_allowed_packet changed to unsigned int
2019-03-06 22:49:16 +01:00
Peter Kokot
e624c596a5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move Makefile.global and Makefile.gcov to build directory
2019-03-04 12:32:39 +01:00
Peter Kokot
2957651c5c Move Makefile.global and Makefile.gcov to build directory
These files can be stored in the build directory instead of bloating the
project root directory.
2019-03-04 12:30:42 +01:00
Peter Kokot
f3fad10d33 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
2019-03-04 12:13:22 +01:00
Peter Kokot
a8c3e22d23 Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes:
- PHP_TM_GMTOFF removed
- HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF
- HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE
- HAVE_TZNAME removed

The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS
that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the
HAVE_TM_ZONE.

The HAVE_TZNAME symbol is not used in current code. The obsolete
HAVE_TM_ZONE symbol has been replaced with more proper
HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE
macro.
2019-03-04 12:13:12 +01:00
Peter Kokot
b68c6db7ee Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove AC_PROG_CC_C_O
2019-03-03 14:49:10 +01:00
Peter Kokot
6bb657fc34 Remove AC_PROG_CC_C_O
The AC_PROG_CC_C_O macro checks if compiler can use both -c and -o
options together and if not it defines the NO_MINUS_C_MINUS_O symbol.
It is not used in current codebase and therefore removed.
2019-03-03 14:47:49 +01:00
Peter Kokot
ac6b9b0b7f Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove obsolescent AC_HEADER_STDC and memcpy check
2019-03-01 19:24:06 +01:00
Peter Kokot
a700451706 Remove obsolescent AC_HEADER_STDC and memcpy check
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_STDC`.

This macro checks if given system has C89 compliant header files such
as `<string.h>`, `<stdlib.h>`, `<stdarg.h>`, `<float.h>`,... and defines
the `STDC_HEADERS` symbol [2]. Case is that current systems should be
well supported with at least C89 standard headers [3].

Given headers are still additionally checked with the `AC_PROG_CC`
macro, yet not needed anyway.

Additionally, the HAVE_MEMCPY check has been removed. The memcpy
function is standardized by C89 and later.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
[3] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
2019-03-01 19:22:44 +01:00
Peter Kokot
f1b8c30174 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_DECLARED_TIMEZONE and HAVE_DECLARED_TIMEZONE
2019-02-28 21:18:06 +01:00
Peter Kokot
f64ae64f52 Remove PHP_DECLARED_TIMEZONE and HAVE_DECLARED_TIMEZONE
The HAVE_DECLARED_TIMEZONE symbol usage has been introduced in
2fd8cbff2a
and then removed via
667a9b9bce.
2019-02-28 21:17:49 +01:00
Peter Kokot
8035e84881 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused PHP_AC_BROKEN_SNPRINTF m4 macro
2019-02-27 21:20:49 +01:00
Peter Kokot
5cf570c914 Remove unused PHP_AC_BROKEN_SNPRINTF m4 macro
The snprintf function is part of the C99 standard and newer systems in
most cases all support it as defined in the standard. However, some old
Windows and HP-UX systems the function behaves differently. These checks
were also removed and PHP now uses a replacement for the snprintf
function. With gradual transition to C99 usage as a minimum requirement,
it will also be able to be replaced to system's snprintf function
directly.

Additionally in this context the unused HAVE_VSNPRINTF and check for
vsnprintf have been removed. PHP uses its own vsnprintf implementation
for now until more reliable C99 compliant function can be used from the
C libraries.
2019-02-27 21:20:30 +01:00
Peter Kokot
20addf88e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused PHP_AC_BROKEN_SPRINTF and AC_ZEND_BROKEN_SPRINTF
2019-02-23 22:29:16 +01:00
Peter Kokot
b33fa18eab Remove unused PHP_AC_BROKEN_SPRINTF and AC_ZEND_BROKEN_SPRINTF
The sprintf function has been normalized to php_sprintf via
61364b5bb1.

This patch removes the checks to make a custom sprintf function

The ZEND_BROKEN_SPRINTF has been removed and the
hardcoded #define zend_sprintf sprintf is used.

The php_sprintf and zend_sprintf are now symbols to sprintf.

This patch now removes the custom PHP definitions of the php_sprintf and
zend_sprintf functions in favor of the C99 sprintf which is also
standardized in C89 already. Once, on some systems sprintf didn't behave
in same way.
2019-02-23 22:26:47 +01:00
Christoph M. Becker
2ec59b3ef3 Prepare main branch for PHP 7.3.4 2019-02-19 13:06:40 +01:00
Nikita Popov
bd13c209ab Merge branch 'PHP-7.4' 2019-02-14 11:50:06 +01:00
Nikita Popov
96daef0458 Make ABI of SIMD optimized functions independent of compiler flags
Always export these as normal functions and only use function pointers
internally if necessary.
2019-02-14 11:49:21 +01:00
Nikita Popov
ad37821e6c Merge branch 'PHP-7.4' 2019-02-14 10:03:08 +01:00
Nikita Popov
3ece2640ea Merge branch 'PHP-7.3' into PHP-7.4 2019-02-14 10:02:58 +01:00
Nikita Popov
7bc162f928 Work around compiler flag dependent ABI 2019-02-14 09:59:10 +01:00
Nikita Popov
b51a99ae35 Enable C99 in autoconf
This is essentially a no-op, because any current compiler already
defaults to C99 or C11.

When using language features from C99 or C11, please don't forget
that header files also need to be compatible with C++.
2019-02-11 14:32:30 +01:00
Nikita Popov
f56895f9e6 Merge branch 'PHP-7.4' 2019-02-11 11:10:58 +01:00
Nikita Popov
e93d6d97aa Disable PEAR by default
Installation of PEAR can be enabled using --with-pear, but will
through a deprecation warning during ./configure.
2019-02-11 11:10:13 +01:00
Nikita Popov
6e3600f41b Remove major version from apache module 2019-02-05 14:57:35 +01:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Joe Watkins
faf03e47d2
bump versions of all the things 2019-01-28 15:54:55 +01:00
Christoph M. Becker
19a9a6ba24 Prepare main branch for PHP 7.3.3 2019-01-22 14:04:03 +01:00
Nikita Popov
acd3bae001 Merge branch 'PHP-7.3' 2019-01-02 13:00:29 +01:00
Nikita Popov
291589114a Disable ifuncs on FreeBSD
Intended as at least a preliminary fix for bug #77284. If/when we
figure out what exactly the issue is, we can relax this.
2019-01-02 12:59:22 +01:00
Christoph M. Becker
a65133a17a Prepare main branch for 7.3.2 2018-12-18 12:15:25 +01:00
Peter Kokot
7e445ef3b1 Set AC_CONFIG_AUX_DIR to build directory
The Autoconf macro AC_CONFIG_AUX_DIR can set the location of the
auxiliary build tools such as config.guess, config.sub, and bundled
libtool scripts and moves these bundled files from the root directory
to the build subdirectory.

Additionally some changes in this context or as a part of obsoletion:
- The LT_TARGETS variable in build/build2.mk file was once used as a part
  of the Automake step. It's not used anymore and has been refactored to
  separate makedist script directly.
- ltconfig is not used anymore since libtool 1.4+
  cf8d1563c2
- phpize file locations for the config.guess, config.sub, and ltmain.sh
  has been refactored accordingly.
2018-12-10 08:11:44 +01:00
Derick Rethans
77b1f5baa3 Back to -dev
This should have been done as soon as PHP-7.3.0 was branched.
2018-12-09 16:23:31 +00:00
Peter Kokot
bde96f293a Remove support for Rhapsody code name
The Rhapsody code name was once used for computers with operating system
by Apple and was mostly replaced with a newer code name Darwin:
- https://en.wikipedia.org/wiki/Rhapsody_(operating_system)
- https://en.wikipedia.org/wiki/Darwin_(operating_system)

This patch removes obsolete checks from the *nix build script files.
2018-12-02 11:41:57 +01:00
Eli Schwartz
2d03197749 ext/gd: Use pkg-config to detect the availability of freetype2
The latest version of freetype2 does not install freetype-config by
default, but pkg-config support has been there for approximately 15
years. In order to reliably detect freetype2, pkg-config *must* be used.

See:
https://savannah.nongnu.org/bugs/?53093
https://bugs.php.net/bug.php?id=76324
2018-11-07 13:05:47 +01:00
Peter Kokot
8217cd20f1 Defragment two Zend related Makefile fragments together
The two are more logically connected together in the Zend directory.
2018-10-21 15:59:16 +02:00
Peter Kokot
f8fb45facf [ci skip] Remove automake and aclocal in comments
The Automake and aclocal were part of the previous PHP build system
where Automake created Makefile from the Makefile.in templates and
aclocal was used to produce the aclocal.m4. They were removed as
dependencies via 9d9d39a0de and
e715fb00f8.
2018-10-21 13:06:58 +02:00
Anatol Belski
251bd9c253 Use C++ symbols with C++11, take 2 2018-10-20 10:56:02 +02:00
Peter Kokot
00db0e7a04 Remove outdated PEAR artefacts
The `pear/scripts`, `pear/php-config`, `pear/phpize`, and
`pear/run-tests` used to be part of the PEAR installation. Now, the
pear installation PHAR file is directly downloaded from pear.php.net
instead.
2018-10-18 23:43:13 +02:00
Anatol Belski
f5bc049136 Revert "Use C++ symbols, when C++11 or upper is compiled"
This reverts commit 322b97a19a.

GCC 5 vs. 8 seems to be a big deal in this regard. The approach needs
further consideration.
2018-10-18 23:36:46 +02:00
Anatol Belski
322b97a19a Use C++ symbols, when C++11 or upper is compiled 2018-10-18 23:17:48 +02:00
Peter Kokot
9bbf9967bd Modernize the AC_PRESERVE_HELP_ORDER macro call
The Autoconf AC_PRESERVE_HELP_ORDER macro has been available since
Autoconf 2.59c [1] and in PHP it has been called conditionally on two places
to support older Autoconf versions. With recent updates and the macro
can be called unconditionally.

[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
2018-10-11 12:58:41 +02:00
Peter Kokot
77c85b3119 Merge branch 'PHP-7.3'
* PHP-7.3:
  [ci skip] Update UPGRADING about Autoconf version
  Bump minimum Autoconf requirement to 2.68
2018-10-09 21:17:19 +02:00
Peter Kokot
0b0d4b5f0d Bump minimum Autoconf requirement to 2.68
This patch syncs and bumps the minimum required version of Autoconf for
the `phpize.m4` script and the main `configure.ac` from previously mixed
2.64 and 2.59 to 2.68.

At the time of this writing Autoconf 2.63 is still the version on
Centos 6, however by the PHP 7.3 release current systems out there
should all have pretty much updated Autoconf versions to 2.64+ at
least. Centos 7 already has Autoconf 2.69, for example.

This provides more options to update and get current with the *nix
build system and also avoids broken builds in certain cases as pointed
out in the relevant discussion [1].

Additionally, phpize also already provides the `AX_CHECK_COMPILE_FLAG`
Autoconf Archive m4 file that has Autoconf 2.64 minimum requirement.

Autoconf 2.68 was released in 2010, 8 years ago, relative to this patch.

[1] https://github.com/php/php-src/pull/3562
2018-10-09 21:06:10 +02:00
Peter Kokot
b189c2432a Remove HAVE_STDARG_H
The C89 standard and later defines the `<stdarg.h>` header as part of
the standard headers [1]. On current systems it is always present and
can be included unconditionally.

Checking for presence and functionality of the `<stdarg.h>` header and
variadic function is not relevant anymore on current systems since this
is always available.

Also Autoconf suggests relying on at least C89 or above [2] and [3].

The following files were regenerated with re2c 1.0.3:
- Zend/zend_language_scanner.c
- Zend/zend_language_scanner_defs.h

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-18 05:44:56 +02:00
Peter Kokot
d3ca28f569 Remove HAVE_STRING_H
The C89 standard and later defines the `<string.h>` header as part of
the standard headers [1] and on current systems it is always present.

Code included also `<strings.h>` header as an alterinative in some
files. This kind of check was relevant on some older systems where the
`<strings.h>` file included definitions for the C89 compliant
`<string.h>`. Today such alternative check is not required anymore. The
`<strings.h>` file is part of the POSIX definition these days.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

This patch also cleans few unused `<strings.h>` inclusions in the libmbfl.

[1]: https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-18 05:32:08 +02:00
Nikita Popov
415cb20dc1 Remove unused HAVE_BROKEN_GLIBC_FOPEN_APPEND
This has not been used since PHP 5.0.
2018-09-17 20:59:16 +02:00
Peter Kokot
7dd62811ce Remove HAVE_STDLIB_H
The C89 and later standard defines the `<stdlib.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STDLIB_H` symbol can be removed.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-16 20:53:53 +02:00
Peter Kokot
dcc529aff4 Remove HAVE_SYS_VARARGS_H
Outdated systems used to provide the `<varargs.h>` and in case of PHP
`<sys/varargs.h>`. [1]

Current systems have `<stdarg.h>` which is also a C89 standard header
and systems have it always present. [2]

[1] https://en.wikipedia.org/wiki/Stdarg.h#varargs.h
[2] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
2018-09-16 20:50:20 +02:00
Richard Fussenegger
a25171b96d Silence ar warning 2018-09-15 20:42:25 +02:00
Christoph M. Becker
aaae9c66db Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #76510: file_exists() stopped working for phar://
2018-09-11 12:23:50 +02:00
Christoph M. Becker
b117feeb2b Fix #76510: file_exists() stopped working for phar://
We work around a strlen() optimization bug in GCC 8[1] by checking
whether the used GCC exhibits the broken behavior, and if so by
disabling `optimize-strlen`.

[1] <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86914>
2018-09-11 12:23:20 +02:00
Peter Kokot
77118fc925 Remove HAVE_ASSERT_H
The `<assert.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.

Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H`
symbol defined by Autoconf in configure.ac can be both removed [2].

This patch also removes unused <assert.h> includes where c files don't
use the `assert()` macro.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-09 09:43:03 +02:00
Peter Kokot
29dc0470c8
Remove AC_FUNC_UTIME_NULL
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the AC_FUNC_UTIME_NULL.

This macro checks if `utime(file, NULL)` sets file's timestamp to the
current time and defines the `HAVE_UTIME_NULL` symbol. This check was
relevant on very old systems (for example, 4.3BSD released in 1986) and
today can be omitted for systems with utime since it should be well
supported by now. [2]

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-04 12:03:34 +02:00
Peter Kokot
eff22dc511
Remove AC_HEADER_DIRENT
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_DIRENT`.

This macro checks which header defines the `DIR` type. If `<dirent.h>`
is available it defines the `HAVE_DIRENT_H` symbol. Since the `<dirent.h>`
header is already checked in the `configure.ac`, this check is not needed
anymore. This macro also additionally checks for SCO Xenix (discontinued,
latest release 1989) dir and x libraries. [2]

Commit 6ed790685f introduced also
`<sys/dir.h>`. This header exists from times of UNIX System V and
provided definition of DIR type on these systems such as 4.3BSD.
Today `<sys/dir.h>` is kept for backwards compatibility and includes
the `<dirent.h>` on current systems. With `dirent.h>` present this
include is no longer required.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html

Remove unused dirent.h includes
2018-09-04 12:01:24 +02:00
Peter Kokot
ef12e96215 Remove AC_FUNC_VPRINTF
Autoconf 2.59d (released in 2006) 1 started promoting several macros
as not relevant for newer systems anymore, including the AC_FUNC_VPRINTF.

This macro checks for presence of the vprint function otherwise checks
for presence of the _doprnt function. This check was relevant on very
old systems and today can be omitted since it should be well supported
by now. [2]

Also PHP doesn't use the HAVE_VPRINTF or HAVE_DOPRNT symbols.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-08-29 21:31:55 +02:00
Peter Kokot
cbc785dc8c Remove AC_STRUCT_TM macro
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_STRUCT_TM`.

This macro checks if `struct tm` is defined in either `<sys/time.h>` or
`<time.h>` and defines the `TM_IN_SYS_TIME` symbol accordingly. This
check was relevant in times before the C89 for some embedded systems,
microcontrollers or very old systems. For newer systems it can be
avoided and the `<time.h>` should be included instead since current
systems should be well supported by now. [2]

Since PHP requires at least C89, this patch removes the obsolescent call
and time.h checks.

Refs:

- [1]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
- [2]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Structures.html
2018-08-29 21:22:47 +02:00
Peter Kokot
3748d8070f Implement #64517: Add AC_ARG_PROGRAM macro
The AC_ARG_PROGRAM Autoconf macro provides program name transformations
when installing. This patch implements #64517 and prepares the
implementation for the request #60518.

In ./configure --help it additionally outputs --program-prefix=PREFIX,
--program-suffix=SUFFIX and the upcoming --program-transform-name=PROGRAM
option.

Macro AC_ARG_PROGRAM is available since Autoconf 2.0 and needs to be
called after the AC_CANONICAL_TARGET macro.

Refs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Transforming-Names.html
2018-08-29 02:04:48 +02:00
Peter Kokot
a0970bbbab Merge branch 'PHP-7.3'
* PHP-7.3:
  Remove outdated comment with PEAR xmlrpc dependency
2018-08-04 18:23:25 +02:00
Peter Kokot
99020cc085 Remove outdated comment with PEAR xmlrpc dependency
The xmlrpc extension is not required to install PEAR anymore.
2018-08-04 18:22:08 +02:00
Christoph M. Becker
a63c99ba62 Prepare for PHP 7.4 2018-07-31 13:56:24 +02:00