Commit Graph

624 Commits

Author SHA1 Message Date
Arnaud Le Blanc
c639614346
Do not remove -O0 in the middle of a flag
Fixes GH-15826
Closes GH-15828

Co-authored-by: Peter Kokot <petk@php.net>
2024-09-12 13:08:54 +02:00
Ryan Carsten Schmidt
b43378d830
Fix incompatible function pointer types
Closes #14549
2024-06-13 12:24:52 +02:00
Valentin Udaltsov
583ac15cd6
Fix gen_stub.php errors (#14335) 2024-05-27 22:46:50 +02:00
Peter Kokot
9e226b2881
Fix incompatible pointer type warnings
This fixes the incompatible pointer type warnings when checking for
reentrant functions declaractions (-Wincompatible-pointer-types) in
config.log. These were not declared on some obsolete systems if
_REENTRANT was not defined. The check is for now left in the code base
but can be transitioned to newer code without checking for missing
declarations or using these otherwise in the future.

Closes GH-14315.
2024-05-24 20:57:52 +02:00
Calvin Buckley
4e21a26db2
Fix check for newer versions of ICU (#14186)
* Fix check for newer versions of ICU

The previous test would always trigger, even if the version of ICU
installed didn't require C++17. This was because it incorrectly used
the `test` program, which broke the build on systems without a C++17
compiler.

Tested with macOS 14 and i 7.2.

* Fix broken ICU version check for definition

Same as the previous fix for C++17.

---------

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-05-10 14:20:17 -03:00
Peter Kokot
44775b7617
Fix GH-13727: Building with -Werror=strict-prototypes (#14029)
This is addon to the GH-13727 bug fix. When configuring the build with:

  ./configure CFLAGS=-Werror=strict-prototypes

libtool check for parsing nm command would fail:

  checking command to parse /usr/bin/nm -B output from cc object... failed

Upstream libtool has this specific check already fixed. Note that this
works only with Autoconf version 2.72 and later and is preparation for
future compilers that might have this error enabled by default.
2024-04-22 21:21:40 +02:00
Peter Kokot
7d3d8de1f3
Fix erroneous dnl appended in configure (#14013)
This is a backport of commit 03f15534a1 to
PHP-8.2 due to GH-14002 and fixes the PHP_CXX_COMPILE_STDCXX check in
ext/intl whether the specified C++ standard is mandatory or optional.

The `dnl` (Discard to Next Line) M4 macro in this combination of `m4_if`
macros and arguments isn't properly replaced and a literal `dnl` string
is appended in the configure script. The `[]dnl` works ok.
2024-04-21 17:23:22 +02:00
Remi Collet
09a36812c1
Fix AX_GCC_FUNC_ATTRIBUTE failure 2024-03-22 11:29:45 +01:00
David Carlier
868257a3de Fix GH-13727: macro generating invalid call test prototypes fixes.
autoconf/libtool generating code to test features missed `void` for
C calls prototypes w/o arguments.
Note that specific changes related to libtool have to be upstreamed.

Co-authored-by: Peter Kokot <petk@php.net>

close GH-13732
2024-03-18 06:53:39 +00:00
Jan Palus
d57a7767a2 Set libtool tag per command instead of global one
Global --tag=CC defined in configure.ac is not correct in all cases. For example
linking objects that were compiled from C++ sources needs to be done with C++
compiler, however for link mode libtool will prefer compiler indicated with
--tag.

Fixes GH-12349
2024-01-10 09:09:45 +01:00
Máté Kocsis
d4e40dc0e1
Fix GH-12558 Escape \N in generated stubs (#12562) 2023-10-31 10:06:56 +01:00
David Carlier
5df291e835 Merge branch 'PHP-8.1' into PHP-8.2 2023-09-24 08:04:30 +01:00
Thomas Hurst
d93800ec0f Fix GH-12273 - configure __builtin_cpu_init() check
__builtin_cpu_init() is documented as having a void return type.  It happens to
return int on gcc, but is void on clang.

Close GH-122274
2023-09-24 08:04:02 +01:00
Ben Ramsey
097b08cbbe
Merge branch 'PHP-8.1' into PHP-8.2 2023-07-10 09:26:17 -05:00
Peter Kokot
41a3573fcc
Fix GH-9483: Autoconf warnings for newer Autoconf versions
Co-authored-by: Levi Morrison <morrison.levi@gmail.com>
2023-07-10 09:25:58 -05:00
Ilija Tovilo
ef4f08832c
Revert "Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs"
This reverts commit d7ab0ff0c8.
2023-07-04 09:11:14 +02:00
Máté Kocsis
d7ab0ff0c8
Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs 2023-07-03 08:32:58 +02:00
Niels Dossche
ac60c5c70c Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11522: PHP version check fails with '-' separator
2023-06-27 18:29:09 +02:00
SVGAnimate
3483229199 Fix GH-11522: PHP version check fails with '-' separator
Remove php version suffix from '-' separator.

Closes GH-11524.
2023-06-27 18:28:04 +02:00
Derick Rethans
a45bef0ac6 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-09 13:37:19 +00:00
Derick Rethans
717335ec63 Fixed macro generation for variadics, which don't have a default value 2023-03-09 11:39:22 +00:00
SATO Kentaro
7fccdf72a4
Add support for generating namespaced constant
Closes GH-10552
2023-02-23 10:05:30 +01:00
Kévin Dunglas
c4c861b01a make clean: remove ext/opcache/minilua
Closes GH-10656.
2023-02-21 21:24:16 +00:00
Máté Kocsis
7b08fe9f2d Do not list private constructors as inherited 2023-01-01 10:47:16 +01:00
Máté Kocsis
38e138798d Do not display non-existent constructors 2023-01-01 10:47:16 +01:00
Máté Kocsis
eebf3bc0ba Better document constructors
Until https://github.com/php/php-src/pull/10098 default constructors were sometimes documented, sometimes omitted. The above PR made adding documentation for constructor of all non-abstract classes required. However, this is not desired when such a class inherits a constructor from its parent. The current PR fixes the behavior the following way:
- documents inherited constructors (along with destructors)
- makes it possible to generate/replace the methodsynopsis of implicit default constructors which don't have a stub counterpart
2023-01-01 10:47:16 +01:00
Máté Kocsis
d832125b8e
Only include the default constructor for non-abstract class synopses 2022-12-16 17:02:35 +01:00
Máté Kocsis
6aa5e58414 Backport methodsynopsis role attributes changes from master
Commits 93605f286d and d6651426f4
2022-12-16 13:18:12 +01:00
Máté Kocsis
0fc60fab72 Always include the constructor on the class manual pages 2022-12-16 13:18:12 +01:00
Máté Kocsis
b4df038cee Remove the superfluous closing parentheses from class synopsis page includes 2022-12-16 13:18:12 +01:00
Máté Kocsis
60cf9fbee0 Replace another root XML element format to the "canonical" one 2022-12-16 13:18:12 +01:00
Máté Kocsis
721e604a69
Do not display the value of UNKNOWN constants in the manual (#9843) 2022-10-30 14:58:16 +01:00
Máté Kocsis
69ef3247fd
Generate constant declarations with the CONST_CS flag for PHP 7.x 2022-10-10 11:12:20 +02:00
Máté Kocsis
e4f2376919
Improve string class constant code generation (#9577)
Using strlen() will make sure that non-constant values can also be used.
2022-09-26 23:12:34 +02:00
Máté Kocsis
8b632749d7
Use PHP 7.4 syntax in gen_stub.php 2022-09-11 07:51:28 +02:00
Máté Kocsis
4af695e908
Require PHP 7.4 at least for running the build system (#9519) 2022-09-10 18:31:43 +02:00
Máté Kocsis
e0422979f6
Validate if the refpurpose and the description is in sync (#9510) 2022-09-09 11:54:38 +02:00
Máté Kocsis
ce058273ba
Add support for validation of missing method synopses (#9491) 2022-09-07 17:40:36 +02:00
Máté Kocsis
05aa3b3e0a
Upgrade PHP parser to 4.15.1
It contains some useful fixes
2022-09-06 14:09:47 +02:00
Máté Kocsis
c547fc183c
Add support for validation of missing class synopses (#9472) 2022-09-05 14:21:15 +02:00
Andreas Braun
f7d42f646b
Update gen_stub to avoid compile errors on duplicate function names
Closes GH-9406
2022-08-30 11:33:45 +02:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Remi Collet
aa702c5459
add compat stuff for function attributes 2022-08-18 13:46:55 +02:00
Máté Kocsis
98b858e756
Fix GH-9183 Get rid of unnecessary PHPDoc param and return type checks (#9203) 2022-07-30 15:37:53 +02:00
Máté Kocsis
b56492be9c
Do not add inherited interface methods to the class synopsis page
These are not displayed currently in the manual so gen_stub.php should be adapted to this behavior.
2022-07-28 15:14:00 +02:00
Andreas Braun
3c016467c7
Escape \U and \u in generated stubs
This fixes an issue where a namespaced class beginning with "U" or "u"
would yield an invalid arginfo file due to the occurrence of a unicode
escape sequence, causing a compile error.

Co-authored-by: Guilliam Xavier <guilliamxavier@users.noreply.github.com>

Closes GH-9154.
2022-07-28 14:30:11 +02:00
Michael Voříšek
b0c0a2cfb4
Use -1 "precision" in gen_stub.php
Closes GH-8734.
2022-07-23 12:09:37 +02:00
George Peter Banyard
4457dba1fb
Add support for stubs to declare intersection type class properties (#8751) 2022-07-22 13:04:49 +01:00
Ilija Tovilo
41a5b46e7d
Fix RC debug of stub attribute (#9082) 2022-07-21 15:06:04 +02:00
Máté Kocsis
e328c68305
Rename @cname to @cvalue in stubs (#9043)
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00