Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip #112

Open
wants to merge 2,915 commits into
base: master
Choose a base branch
from
Open

wip #112

wants to merge 2,915 commits into from

Conversation

nielsdos
Copy link
Owner

No description provided.

kamil-tekiela and others added 30 commits August 9, 2024 15:47
PHP_GD_CHECK_FORMAT macro 2nd argument is changed from automatic
AC_DEFINE_UNQUOTED to manual action for easier usage.
This adds missing help texts for preprocessor macros defined in
mysqli and pdo_mysql extensions.

[skip ci]
NET-SNMP has pkg-config support since 5.8.1

This optionally finds the NET-SNMP library using pkg-config or falls
back to find library on the system with net-snmp-config. The configure
option argument (--with-snmp=DIR) works like before (path to the
net-snmp-config).

When explicitly using the DIR argument, the pkg-config check is silently
skipped.

When not using DIR argument, the SNMP_CFLAGS and SNMP_LIBS can be also
used to find the NET-SNMP library:

    ./configure --with-snmp \
        SNMP_CFLAGS=-I/path/to/net-snmp/include \
        SNMP_LIBS="-L/path/to/net-snmp -lnetsnmp"

Co-authored-by: Calvin Buckley <[email protected]>
See https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
For x64, either _M_X64 or _M_AMD64 would work but I'm going with what's
already used in php-src.

Closes phpGH-15301.
* PHP-8.3:
  Fix uninitialized value watchpoint_hit
* PHP-8.3:
  Add necessary SKIPIFs to new phpdbg tests
This is a follow-up of phpGH-15242
(0b25e26)

because the usmHMAC192SHA256AuthProtocol and usmHMAC384SHA512AuthProtocol
are not functions but arrays. The AC_CHECK_DECL might be more
appropriate and portable way to find these.
- AS_* macros used
- s/UNIX/Unix
- The --with-mysql result value moved into the check when extension is
  enabled
- List of source files normalized with m4_normalize
- Redundant variables omitted
- CS synced
These use a mixed style of block and line comments, and clang warns
about this (`-Wcomment`), so we fix that.
The definition of the class entries in the internal header file is not
correct, since that file is included several times, and even the
comment above the definition hints at com_extension.c where the actual
definition is.  We fix this by declaring these variables as `extern`.
The logic was very weird as it just should check whether the boolean is
true or not. And in fact the code is equivalent because zval_get_long()
will only return 0/1 because the type is a bool, and ZEND_NORMALIZE_BOOL
won't change that value.
* PHP-8.3:
  [ci skip] NEWS for phpGH-15275
  [ci skip] NEWS for phpGH-15275
  Fix crash during GC of suspended generator delegate (php#15275)
YIELD and YIELD_FROM increment opline before returning, but in most places
we need the opline to point to the YIELD and YIELD_FROM.

Here I change YIELD / YIELD_FROM to not increment opline. This simplifies the
code and fixes phpGH-15275 in a better way.

Closes phpGH-15328
While clang is picky about these, MSVC doesn't seem to care and would
only report the calls to undeclared functions as errors during link
time.  Still, obviously, MSVC is fine with having the declarations
during compile time.
When this function has been added to our bundled GD[1], it had been
overlooked to also declare it in gd.h, like it's done in libgd.  While
MSVC doesn't have any issues with this, clang reports an error.

[1] <php@03bd433>
Bug in libxml, amend test to accept both outputs.
Prior to clang 10.0.0, `clang-cl -v` apparently always appended some
fine grained version information in parentheses[1]; this is no longer
the case, so the build fails early because the compiler version could
not be detected.  Since we never used this fine grained version info,
we no longer check for it.

As of clang 13.0.0, the `/fallback` command option has been removed[2],
so we only set the flag for older clang versions.

[1] <php#11313 (comment)>
[2] <https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html#removed-compiler-flags>
Girgias and others added 27 commits August 21, 2024 13:06
* PHP-8.3:
  Fix phpGH-15515: Configure error grep illegal option q (php#15516)
* PHP-8.3:
  Fix bug phpGH-15514 (Configure error: genif.sh: syntax error)

Autotools: Refactor main/internal_functions commands

This wraps generation of main/internal_functions* files into a separate
AC_CONFIG_COMMANDS and uses a SHELL variable instead of sh command.
Autoconf sets the SHELL variable to a suitable current shell the
configure is running in.

Instead of putting the commands into the 2nd argument the 3rd
initialization argument is used like before because it is easier to read
and work with variables (AWK, EXT_STATIC and EXT_CLI_STATIC), which
would need to be assigned again for the 2nd argument.

This simplifies the configure usage on Solaris 10 C shell and KornShell
without issuing errors when executing genif.sh script.
It not being empty is already checked by PHP_GETTEXT_DOMAIN_LENGTH_CHECK()
On Solaris 10 and GCC 4.9 check failed with error in config.log:
error: missing binary operator before token "("

The __has_builtin must be checked in its own `#ifdef/defined` line
above the `#if __has_builtin(....` usage.
"Since limited support for `/arch:AVX512` was added in Visual Studio
2017, and expanded in Visual Studio 2019"[1], we can safely offer this
option, since PHP 8.4 is supposed to build with Visual Studio 2022, and
it is unlikely that someone tries to build PHP 8.4 with Visual Studio,
requesting AVX-512 support.

[1] <https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170>
It is likely that more functions should have their return type changed to `enum_func_status` and have the return value checked against `PASS`/`FAIL` rather than assuming the inverse of boolean logic.
* main/network: Use more appropriate types

And check directly against 0 for success for functions not returning a zend_result

* Remove redundant declaration in file.h

Not sure why it even is here
`PHP7DLLTS_EXPORTS` is not used throughout php-src, and it's unlikely
that it is used by any extension, especially since it still refers to
PHP 7.  The symbol had been introduced in 2014[1], but is not even used
in latest PHP-7.4; probably it was just supposed to be used, or part of
phpng.

[1] <php@fc734cf>

Since CI already ran for the PR, we can now [skip ci].
Instead of creating Zend/zend_config.h header file in an initialization
argument of "default" commands, this creates it in its own wrapper
when config.status is called.
This syncs the abs_srcdir and abs_builddir variables assignments between
the php-src build and phpize. The `&&` was picked over `;` as it is more
rigorous - the pwd command would fail if cd fails for some reason.
This makes a bit simpler to use this macro by optionally passing the
required minimum PHP version. If version is not passed it falls back
to 7.4 as before. Minimum version also added to configure.ac.
The libproc.h header file was added on Solaris as of 11.4.

* Also add guard check to the entire function
* When libproc.h isn't available also sys/procfs.h is redundant
* Move the <sys/lwp.h> out of the guard
* Exclude more stuff from Solaris 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.