Commit Graph

561 Commits

Author SHA1 Message Date
Peter Kokot
5fc68d8bab
Update preprocessor macros help texts for enchant and snmp extensions (#15255)
[skip ci]
2024-08-06 23:22:28 +02:00
Peter Kokot
dcdcb3cbfe
Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209)
This replaces the AC_MSG_ERROR with AC_MSG_FAILURE, where appropriate.

The AC_MSG_ERROR outputs given message and exits the configure step. The
AC_MSG_FAILURE does the same but also automatically outputs additional
message "See 'config.log' for more details." which might help directing
the user where to look further.

The AC_MSG_ERROR is used for errors where current test step isn't logged
in the config.log and wouldn't make sense, and AC_MSG_FAILURE is mostly
used in cases of library checks, compilation tests, headers checked with
AC_CHECK_HEADER* and similar tests that are also logged in the
config.log.

AC_MSG_ERROR([Sanity check failed.]) output:

```
configure: error: Sanity check failed.
```

AC_MSG_FAILURE([Sanity check failed.]) output:

```
configure: error: in '/path/to/php-src':
configure: error: Sanity check failed.
See 'config.log' for more details
```
2024-08-04 07:36:37 +02:00
Peter Kokot
f66feaec0f
Sync HAVE_<extension> help texts (#15167)
This syncs all help texts of extension preprocessor macros to the same
style "Define to 1 if the PHP extension '<ext>' is available.".
[skip ci]
2024-08-02 01:41:47 +02:00
Peter Kokot
1ceadaed52
Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144)
This adds Autoconf quote characters to all PHP_NEW_EXTENSION arguments
and syncs the CS across the php-src Autotools build system.
2024-07-29 00:14:59 +02:00
Peter Kokot
2b97c84d4c
Autotools: Quote PHP_CHECK_LIBRARY arguments (#15136)
This syncs the quotes across the PHP_CHECK_LIBRARY macro arguments.
2024-07-28 18:39:14 +02:00
Peter Kokot
68ae477796
Autotools: Quote M4 arguments (#15033)
- PHP_ADD_INCLUDE
- PHP_EVAL_INCLINE
- PHP_EVAL_LIBLINE
2024-07-20 07:21:44 +02:00
Christoph M. Becker
f590b34530
Drop support for OpenSSL < 1.1.0 on Windows
PR #13498 bumped the required OpenSSL version to 1.1.1, but apparently
only for non Windows system.  We catch up somewhat by dropping support
for OpenSSL < 1.1.0 on Windows; besides completely removing detection
of old OpenSSL versions in `SETUP_OPENSSL`, we also ensure that all
bundled extension using this function do no longer accept OpenSSL <
1.1.0, to avoid to still be able to build these extensions with older
`phpize` scripts.

We do not cater to `--phar-native-ssl` yet; that might better be
addressed by #14578.

Closes GH-14973.
2024-07-17 12:22:59 +02:00
Peter Kokot
bee84c0468
Autotools: Quote PHP_SUBST arguments in extensions (#14748) 2024-07-02 06:56:18 +02:00
Arnaud Le Blanc
11accb5cdf
Preferably include from build dir (#13516)
* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

    -I$(top_builddir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/main
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM
    -I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

    -I$(top_builddir)/main
    -I$(top_builddir)
    -I$(top_srcdir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.
2024-06-26 00:26:43 +02:00
Niels Dossche
429f91d80d snmp: change uses of sprintf into snprintf 2024-06-14 08:12:03 -07:00
Máté Kocsis
f093015a6c
Fix class constant and property ID generation for the manual (#14249)
Related to https://github.com/php/doc-en/pull/3367
2024-05-17 20:30:16 +02:00
Máté Kocsis
f2e199e878
Implement "support doc comments for internal classes and functions" (#13266)
Fixes #13130
2024-02-25 08:41:31 +01:00
Máté Kocsis
10957e498c
Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
David CARLIER
931a8b0739
inet_ntop requirement check at configure time instead (#12700) 2023-11-17 16:01:46 +00:00
David Carlier
44f9c226aa following-up on GH-12551: removing inet_ntoa usage
Close GH-12554
2023-11-06 12:05:56 +00:00
Ilija Tovilo
ba1d9d0ab2
[skip ci] Avoid running asan tests that timeout
This just adds to the test time for no reason.
2023-10-02 16:57:50 +02:00
Máté Kocsis
67ab2b7d87
Align the return type of snmp_set_oid_numeric_print() to its aliased funtion 2023-08-14 12:43:33 +02:00
Máté Kocsis
1dcac9619c Declare type for ext/snmp internal class constants 2023-07-18 13:51:33 +02:00
Ilija Tovilo
7b355e8d34
Revert "Merge branch 'PHP-8.2'"
This reverts commit 45a3f178dc, reversing
changes made to b2a54bc6af.
2023-07-04 09:18:49 +02:00
Máté Kocsis
45a3f178dc
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs

Closes GH-10170
2023-07-03 11:17:08 +02:00
Máté Kocsis
85338569de Narrow bool return types to true when possible 2023-05-07 19:34:09 +02:00
Ilija Tovilo
be4db6b550
Suppress snmp lib memory leak, xfail ASAN tests
I don't know enough about this library to fix those :(
2023-03-27 16:38:44 +02:00
Max Kellermann
d3abcae4a2
ext/snmp: use memcpy() instead of memmove() (#10498)
memcpy() may be faster because it does not have to consider
overlapping buffers.
2023-02-05 15:10:01 +00:00
Max Kellermann
d3facbe283
Mark globals as const (#10303)
This moves them from ``.data`` to ``.rodata`` and allows more compiler optimizations.

* ext/opcache/zend_accelerator_hash: make prime_numbers const

* Zend/zend_signal: make zend_sigs const

* ext/dba: make dba_handler pointers const

* ext/exif: make php_tiff_bytes_per_format and other globals const

* ext/intl/grapheme: make grapheme_extract_iters const

* ext/mstring: make rare_codepoint_bitvec const

* ext/snmp: make objid_mib const

* ext/opcache: make all zend_shared_memory_handlers const
2023-01-23 13:46:58 +00:00
Máté Kocsis
7a9726d651
Merge branch 'PHP-8.2'
- PHP-8.2:
  Customize the link of some constants in the manual
2023-01-19 09:06:39 +01:00
Máté Kocsis
148ac364e9 Customize the link of some constants in the manual
These changes are necessary because the links which are generated by default are already taken.
2023-01-19 09:05:32 +01:00
Bob Weinand
a01dd9feda Revert "Port all internally used classes to use default_object_handlers"
This reverts commit 94ee4f9834.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.
2022-09-14 11:13:23 +02:00
Bob Weinand
94ee4f9834 Port all internally used classes to use default_object_handlers
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-31 16:45:27 +02:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Máté Kocsis
2fd5e82e19
Declare ext/snmp constants in stubs (#9113) 2022-07-26 14:48:16 +02:00
George Peter Banyard
9f06bb3bb6
Drop remaining usage of u_char in favour of standard C99 uint8_t (#8611)
Plus minor drive-by fixes
2022-05-23 21:57:31 +01:00
Christoph M. Becker
97ea6ad0e6
Test snmp on Windows CI
We use the snmpd which is now bundled with the net-snmp dependency, and
the MIBS which are also shipped with it.

We also fix the tests/snmpd.conf, and mark two failing tests as XFAIL.

Closes GH-8503.
2022-05-11 13:24:23 +02:00
George Peter Banyard
62ab9293ae Fix [-Wundef] warnings in SNMP extension 2022-04-01 15:45:44 +01:00
Nikita Popov
e32642c541 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default
2021-12-05 21:04:10 +01:00
Nikita Popov
26e424465c Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default
Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the default
locale to C.UTF-8 instead (if it is available). This makes libedit
work and I believe it shouldn't affect behavior of single-byte
locale-dependent functions that PHP otherwise uses.

Closes GH-7635.
2021-12-05 21:03:27 +01:00
Nikita Popov
902d64390e Deprecate implicit dynamic properties
Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/__set().

RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
2021-11-26 14:10:11 +01:00
Dmitry Stogov
90b7bde615 Use more compact representation for packed arrays.
- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
  instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
  familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
  (ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
  (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
  ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
    - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
    - zend_hash_sort_ex() may require converting packed arrays to hash.
2021-11-03 15:18:26 +03:00
Kamil Tekiela
10f102d790
Fix 'can not' in error messages 2021-10-05 09:51:58 +01:00
Remi Collet
718e91343f
add SHA256 and SHA512 for security protocol 2021-08-11 13:02:18 +02:00
Nikita Popov
c289f5241d Fix snmp test for ipv6
Just check that the port is present, not the exact form of the
IP address.
2021-07-20 15:01:51 +02:00
Nikita Popov
a4db74364d Remove THREAD_LS
This sounds like it will give you a thread local storage, but in
truth ... it does absolutely nothing.
2021-07-19 16:15:31 +02:00
Nikita Popov
b5a14e6c04 Port skipif.inc files to EXTENSIONS 2021-06-11 16:27:50 +02:00
Máté Kocsis
dd83ced6bd
Declare tentative return types for ext/snmp
Closes GH-7064
2021-05-28 12:45:33 +02:00
Máté Kocsis
5e8bdafae4
Merge branch 'PHP-8.0'
* Fix the return types in ext/snmp (#7068)
2021-05-28 12:44:15 +02:00
Máté Kocsis
15ec7404f1
Fix the return types in ext/snmp (#7068) 2021-05-28 12:34:46 +02:00
Nikita Popov
92dfd97315 Use early return in snmp
This avoids the odd dangling elses.
2021-05-27 15:03:59 +02:00
Remi Collet
2237102b74
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix snmp build without DES
2021-05-27 14:59:51 +02:00
Remi Collet
f9fd3595ec
Fix snmp build without DES 2021-05-27 14:58:07 +02:00
Máté Kocsis
87e4970ebc
Declare SNMP properties
Additionally, convert them to typed properties.

Closes GH-6742
2021-05-14 17:03:05 +02:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00