Obsolete backticks can be replaced with the recommended $(...) (on
shells where the "newer" style still doesn't work, for example, on
Solaris 10 default shell, Autoconf takes care of that by re-executing
the script itself).
* Remove php_win32_init_gettimeofday declaration
Follow-up of GH-15400 (25afbdb09e).
* Remove unused header include
* Include php.h before win32/ioutil.h
When the target system is Darwin, the SAPI_SHARED is already set to
libs/libphp.so (instead of libs/libphp.dylib) in configure.ac and in
php.m4 via PHP_SHLIB_SUFFIX_NAMES.
Follow up on 13483
As previously reported in https://github.com/php/php-src/pull/13483#discussion_r1718546927:
> The parameter names seem to be incorrect.
>
> It should be `$status`, not `$code`.
>
> The RFC explicitly uses that parameter name in the proposal: https://wiki.php.net/rfc/exit-as-function#proposal
>
> It is also the name already used in the [manual](https://www.php.net/exit).
>
> Lastly, the parameter name `$status` better covers what can be passed: either a status _message_ or a status _code_.
> While `$code` would read pretty weird when passing a message:
> ```php
> exit(code: 'message');
> ```
This commit attempts to fix this.
Includes adding a test for exit/die using a named argument.
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
- AS_* macros used
- Indentation level synced
- Obsolete backticks replaced with recommended $(...) (on shells where
the "newer" style still doesn't work, for example on Solaris 10
default shell, Autoconf takes care of that by re-executing the script
itself)
The libtool bundled with PHP is outdated and deletes *.gcno files used by
gcov during the build process.
While this issue has already been resolved upstream [1], incorporating the
fix at this point may not be practical. Therefore, we attempt to apply a
fix to the current version.
This change will enable proper coverage output for third-party PHP
extensions.
[1]: https://github.com/autotools-mirror/libtool/blob/master/NEWS#L605
* Explicitly drop support for old clang versions on Windows
This ensures compatibility with the typedef redefinitions we use, and
makes it clear during the `configure` stage that old compiler versions
are not supported.
See <https://releases.llvm.org/> regarding the release history of clang.
We also remove support for two number versions of clang, since as of
LLVM 4.0.0 the project uses a three number versioning scheme; see
<https://blog.llvm.org/2016/12/llvms-new-versioning-scheme.html>.
This is a follow-up of f6dcca00bc as
Autoconf always seems to do a variable substitution, even when called
conditionally. When passing argument other than shared or static to
--enable-embed=ARGUMENT this now puts an empty string inside generated
php-config script.
- AS_VAR_IF macro used
- redundant quotes removed
- PHP_FUZZER_TARGET macro body synced with the rest of the macros in
php-src
- PHP_FUZZER_TARGET arguments quoted
This is mostly about minor glitches (signedness or length confusion),
but also fixes two occasions where `zend_string`s still have been
regarded as `char *`.
We also add a regression test case for failing property name lookup,
since that is the most relevant issue we're fixing here.
The function always returned 0, and the return values was never used,
so we declare it to return void.
While we're at it, we also fix the space indentation of the comment.
* GetSystemTimePreciseAsFileTime() is now always available
As of PHP 8.3.0, we require Windows Server 2012 or Windows 8 as bare
minimum. Since GetSystemTimePreciseAsFileTime() is always available on
these Windows versions[1], there is no more need for the workaround
described in dllmain.c; we just can call the function directly.
[1] <https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime>
Windows 2008 and Vista are no longer supported as of PHP 7.2.0, and
Windows 2008 R2 and Windows 7 are no longer supported as of PHP 8.3.0.
Therefore we remove the respective detection code, and assert that
these versions can no longer be used.