This enables outputting additional debugging messages when running
phpdbg for developing and troubleshooting phpdbg itself. Option was
already added in Autotools and this adds it also to Windows build
system.
Because additional info is printed when running tests, the
--enable-phpdbg-debug option is excluded when building with
--enable-snapshot-build if not provided explicitly.
This syncs the HAVE_GRP_H definition on Windows (manually defined) and
Autotools (checked with AC_CHECK_HEADERS):
HAVE_GRP_H is is either undefined or defined to value 1.
The PHP_SBINDIR symbol was defined on *nix systems but never used. This
adds the constant similar to PHP_BINDIR also to PHP. On Windows it is
the value of prefix configuration when PHP was built (same value as
PHP_BINDIR).
The memmove() function is C99 standard function [1] and check was left for
the PCRE2 bundled library. It can be simplified by passing the compile
option instead of checking always available function on current systems.
External PCRE2 library on the system doesn't need this.
[1]: https://port70.net/~nsz/c/c99/n1256.html#7.21.2.2
- CONFIGURATION_FILE_PATH
Removed via 2cf1b8d345.
- DISCARD_PATH
Used for the --enable-discard-path CGI configure option and converted
to INI configuration. Removed via
06f43b30c1.
- HAVE_ERRMSG_H
Removed via fd1578c196.
- HAVE_REGCOMP
Used for regcomp function.
- HAVE_RINT
Used for rint function.
- NEED_ISBLANK
Windows ctype.h once didn't have C99 isblank() function. Cannot be
found on current Windows systems anymore, neither was used in PHP at
least since PHP 4.0.
- PHP_URL_FOPEN
Removed via cae27179ce.
- REGEX
Not used in current code.
- HSREGEX
Not used in current code.
- USE_CONFIG_FILE
Symbol was once defined by the --with-config-file-path configure
option.
On some systems (Haiku) the math library is part of the C library and it
doesn't need to be explicitly prepended to LIBS. The redundant HAVE_LIBM
symbol defined by the AC_CHECK_LIB has been removed.
On *nix installation there is zend_dfg.h installed as part of the bug
fix#81136, but it wasn't synced with Windows yet. This now syncs Zend
headers on both builds.
This was cleaned in 4cbffd89d9 and
patching the Zend/zend_language_parser.h file to include zend.h is not
needed anymore.
Autotools build system part has been similarly cleaned via
32cdd330f3
like zend_ini_parser.h, list zend_ini_scanner_defs.h and
zend_language_scanner_defs.h.
Add all these files to generated_files so they don't get missed.
`.nFileIndexHigh` is a unsigned 32bit number. Casting that to `__int64`
and shifting left by 32bits triggers undefined behavior if the most
significant bit of `.nFileIndexHigh` is set. We could avoid that by
casting to `(__uint64)`, but in that case the whole clause doesn't have
an effect anymore, so we drop it altogether.
Closes GH-9958.
Automatically generating and using test INI files is supported for
in-tree build (`buildconf`) for a long time, and this can make sense
for phpize builds too, especially when the build extension is a zend
extension, so it can be properly loaded.
Thus we make `--enable-test-ini` and `--with-test-ini-ext-exclude`
available for phpize, but default to false for full BC.
Closes GH-8787.
Nothing new but to refactor usage b/w hash and password
extensions but using volatile pointers to be a bit safer,
allowing to expand its usage eventually.
On Windows, the contents of the CREDITS files are passed to rc.exe via
the command line. To avoid undesired behavior, we need to escape some
characters, most notably `<` (which is sometimes used in CREDITS to
enclose mail addresses), which otherwise is interpreted as redirection
operator, resulting in the hard to understand "The system cannot find
the file specified."
Even more dangerous is not properly escaping percent signs, which makes
it possible for a malicious CREDITS file to inject the values of
environment variables of the build system into the generated binaries.
This is particularly bad, because as of Windows Vista, the comments can
no longer be inspected via explorer.exe, although the binaries still
contain these comments.
We also cater to double-quotes, which need to be escaped as `\"\"` in
this context.
Closes GH-8767.
This is done by adding a new zend_atomic_bool type. The type
definition is only available for compiler alignment and size info; it
should be treated as opaque and only the zend_atomic_bool_* family of
functions should be used.
Note that directly using atomic_bool is complicated. All C++ compilers
stdlibs that I checked typedef atomic_bool to std::atomic<bool>, which
can't be used in an extern "C" section, and there's at least one usage
of this in core, and probably more outside of it.
So, instead use platform specific functions, preferring compiler
intrinsics.
Because the UID= and PWD= values are appended to the SQLDriverConnect
case when credentials are passed, we have to append them to the string
in case users are relying on this behaviour. However, they must be
quoted, or the arguments will be invalid (or possibly more injected).
This means users had to quote arguments or append credentials to the raw
connection string themselves.
It seems that ODBC quoting rules are consistent enough (and that
Microsoft trusts them enough to encode into the .NET BCL) that we can
actually check if the string is already quoted (in case a user is
already quoting because of this not being fixed), and if not, apply the
appropriate ODBC quoting rules.
This is because the code exists in main/, and are shared between
both ODBC extensions, so it doesn't make sense for it to only exist
in one or the other. There may be a better spot for it.
Closes GH-8307.