Skip to content

Commit d6a75e1

Browse files
authored
Sync preprocessor macros help texts (#15218)
This partially syncs help texts a bit further for: - ext/ffi - ext/ldap - ext/opcache - ext/pcre - ext/pdo_mysql - ext/readline - ext/standard
1 parent f16ab75 commit d6a75e1

File tree

11 files changed

+43
-35
lines changed

11 files changed

+43
-35
lines changed

Zend/Zend.m4

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,11 @@ dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
118118
dnl
119119
AC_DEFUN([ZEND_DLSYM_CHECK], [dnl
120120
AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names])
121-
_LT_AC_TRY_DLOPEN_SELF([
122-
AC_MSG_RESULT([no])
123-
], [
121+
_LT_AC_TRY_DLOPEN_SELF([AC_MSG_RESULT([no])], [
124122
AC_MSG_RESULT([yes])
125-
AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, 1, [Define if dlsym() requires a leading underscore in symbol names. ])
126-
], [
127-
AC_MSG_RESULT([no])
128-
], [])
123+
AC_DEFINE([DLSYM_NEEDS_UNDERSCORE], [1],
124+
[Define to 1 if 'dlsym()' requires a leading underscore in symbol names.])
125+
], [AC_MSG_RESULT([no])], [])
129126
])
130127

131128
dnl

ext/ffi/config.w32

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ if (PHP_FFI != 'no') {
66
AC_DEFINE('HAVE_FFI', 1, "Define to 1 if the PHP extension 'ffi' is available.");
77

88
if (!X64) {
9-
AC_DEFINE('HAVE_FFI_FASTCALL', 1 ,'libffi supports fastcall calling convention');
10-
AC_DEFINE('HAVE_FFI_THISCALL', 1 ,'libffi supports thiscall calling convention');
11-
AC_DEFINE('HAVE_FFI_STDCALL', 1 ,'libffi supports stdcall calling convention');
12-
AC_DEFINE('HAVE_FFI_MS_CDECL', 1 ,'libffi supports ms_cdecl calling convention');
13-
AC_DEFINE('HAVE_FFI_SYSV', 1 ,'libffi supports sysv calling convention');
9+
AC_DEFINE('HAVE_FFI_FASTCALL', 1, 'Define to 1 if libffi supports the fastcall calling convention.');
10+
AC_DEFINE('HAVE_FFI_THISCALL', 1, 'Define to 1 if libffi supports the thiscall calling convention.');
11+
AC_DEFINE('HAVE_FFI_STDCALL', 1, 'Define to 1 if libffi supports the stdcall calling convention.');
12+
AC_DEFINE('HAVE_FFI_MS_CDECL', 1, 'Define to 1 if libffi supports the ms_cdecl calling convention.');
13+
AC_DEFINE('HAVE_FFI_SYSV', 1, 'Define to 1 if libffi supports the sysv calling convention.');
1414
}
1515
// Available in https://github.com/winlibs/libffi.
1616
if (GREP_HEADER("ffitarget.h", "FFI_VECTORCALL_PARTIAL", PHP_PHP_BUILD + "\\include")) {
17-
AC_DEFINE('HAVE_FFI_VECTORCALL_PARTIAL', 1 ,'libffi partially supports vectorcall calling convention');
17+
AC_DEFINE('HAVE_FFI_VECTORCALL_PARTIAL', 1, 'Define to 1 if libffi partially supports the vectorcall calling convention.');
1818
}
1919

2020
EXTENSION('ffi', 'ffi.c ffi_parser.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');

ext/ldap/config.m4

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ AC_DEFUN([PHP_LDAP_CHECKS], [
88
LDAP_INCDIR=$1/ldap/public
99
LDAP_LIBDIR=$1/$PHP_LIBDIR
1010
else
11+
dnl Note that Oracle Instant Client lacks LDAP features implemented in PHP
12+
dnl ldap extension and cannot be built. Use OpenLDAP on Solaris.
13+
dnl See: https://github.com/php/php-src/issues/15051
1114
1215
dnl Find Oracle Instant Client RPM header location corresponding to the
1316
dnl given lib path e.g. for --with-ldap=/usr/lib/oracle/12.1/client64/lib
@@ -71,6 +74,9 @@ if test "$PHP_LDAP" != "no"; then
7174
dnl -pc removal is a hack for clang
7275
MACHINE_INCLUDES=$($CC -dumpmachine | $SED 's/-pc//')
7376

77+
AH_TEMPLATE([HAVE_ORALDAP],
78+
[Define to 1 if the ldap extension uses the Oracle Instant Client.])
79+
7480
if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then
7581
PHP_ADD_LIBRARY_WITH_PATH([lber], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
7682
PHP_ADD_LIBRARY_WITH_PATH([ldap], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
@@ -80,15 +86,15 @@ if test "$PHP_LDAP" != "no"; then
8086

8187
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.12.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.12.1; then
8288
PHP_ADD_LIBRARY_WITH_PATH([clntsh], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
83-
AC_DEFINE(HAVE_ORALDAP,1,[ ])
89+
AC_DEFINE([HAVE_ORALDAP], [1])
8490

8591
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then
8692
PHP_ADD_LIBRARY_WITH_PATH([clntsh], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
87-
AC_DEFINE(HAVE_ORALDAP,1,[ ])
93+
AC_DEFINE([HAVE_ORALDAP], [1])
8894

8995
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME; then
9096
PHP_ADD_LIBRARY_WITH_PATH([clntsh], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD])
91-
AC_DEFINE(HAVE_ORALDAP,1,[ ])
97+
AC_DEFINE([HAVE_ORALDAP], [1])
9298

9399
else
94100
AC_MSG_ERROR([Cannot find ldap libraries in $LDAP_LIBDIR.])
@@ -132,14 +138,13 @@ if test "$PHP_LDAP" != "no"; then
132138
]))
133139

134140
dnl SASL check
135-
if test "$PHP_LDAP_SASL" != "no"; then
141+
AS_VAR_IF([PHP_LDAP_SASL], [no],, [
136142
PKG_CHECK_MODULES([SASL], [libsasl2])
137-
138143
PHP_EVAL_INCLINE([$SASL_CFLAGS])
139144
PHP_EVAL_LIBLINE([$SASL_LIBS], [LDAP_SHARED_LIBADD])
140-
141-
AC_DEFINE(HAVE_LDAP_SASL, 1, [LDAP SASL support])
142-
fi
145+
AC_DEFINE([HAVE_LDAP_SASL], [1],
146+
[Define to 1 if the ldap extension has SASL support enabled.])
147+
])
143148

144149
dnl Sanity check
145150
AC_CHECK_FUNC([ldap_sasl_bind_s],,

ext/ldap/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (PHP_LDAP != "no") {
1616
AC_DEFINE('HAVE_LDAP_PARSE_REFERENCE', 1);
1717
AC_DEFINE('HAVE_LDAP_START_TLS_S', 1);
1818
AC_DEFINE('HAVE_LDAP', 1, "Define to 1 if the PHP extension 'ldap' is available.");
19-
AC_DEFINE('HAVE_LDAP_SASL', 1);
19+
AC_DEFINE('HAVE_LDAP_SASL', 1, 'Define to 1 if the ldap extension has SASL support enabled.');
2020
AC_DEFINE('HAVE_LDAP_CONTROL_FIND', 1);
2121
AC_DEFINE('HAVE_LDAP_PARSE_EXTENDED_RESULT', 1);
2222
AC_DEFINE('HAVE_LDAP_EXTENDED_OPERATION_S', 1);

ext/opcache/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ int main(void) {
325325
AS_VAR_IF([ac_cv_search_shm_open], ["none required"],,
326326
[OPCACHE_SHARED_LIBADD="$OPCACHE_SHARED_LIBADD $ac_cv_search_shm_open"])
327327
AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1],
328-
[Define if you have POSIX mmap() SHM support])
328+
[Define to 1 if you have the POSIX mmap() SHM support.])
329329
fi
330330
])
331331
LIBS="$LIBS_save"

ext/pcre/config.w32

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ EXTENSION("pcre", "php_pcre.c", false /* never shared */,
55
ADD_SOURCES("ext/pcre/pcre2lib", "pcre2_auto_possess.c pcre2_chartables.c pcre2_compile.c pcre2_config.c pcre2_context.c pcre2_chkdint.c pcre2_dfa_match.c pcre2_error.c pcre2_jit_compile.c pcre2_maketables.c pcre2_match.c pcre2_match_data.c pcre2_newline.c pcre2_ord2utf.c pcre2_pattern_info.c pcre2_serialize.c pcre2_string_utils.c pcre2_study.c pcre2_substitute.c pcre2_substring.c pcre2_tables.c pcre2_ucd.c pcre2_valid_utf.c pcre2_xclass.c pcre2_find_bracket.c pcre2_convert.c pcre2_extuni.c pcre2_script_run.c", "pcre");
66
ADD_DEF_FILE("ext\\pcre\\php_pcre.def");
77

8-
AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library');
9-
AC_DEFINE('PCRE2_CODE_UNIT_WIDTH', 8, 'Have PCRE library');
10-
AC_DEFINE("PCRE2_STATIC", 1, "");
8+
AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Define to 1 if PHP uses the bundled PCRE library.');
9+
AC_DEFINE('PCRE2_CODE_UNIT_WIDTH', 8, 'Number of bits in non-UTF mode for PCRE library.');
10+
AC_DEFINE("PCRE2_STATIC", 1, "Define to 1 if PCRE library is built statically.");
1111
PHP_PCRE="yes";
1212
PHP_INSTALL_HEADERS("ext/pcre", "php_pcre.h pcre2lib/");
1313
ADD_FLAG("CFLAGS_PCRE", " /D HAVE_CONFIG_H /D HAVE_MEMMOVE");
1414

1515
ARG_WITH("pcre-jit", "Enable PCRE JIT support", "yes");
1616
if (PHP_PCRE_JIT != "no") {
17-
AC_DEFINE('HAVE_PCRE_JIT_SUPPORT', 1, 'PCRE library');
17+
AC_DEFINE('HAVE_PCRE_JIT_SUPPORT', 1, 'Define to 1 if PCRE JIT is enabled and supported.');
1818
}

ext/pcre/config0.m4

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ PHP_ARG_WITH([pcre-jit],
1313
[yes],
1414
[no])
1515

16+
AH_TEMPLATE([PCRE2_CODE_UNIT_WIDTH],
17+
[Number of bits in non-UTF mode for PCRE library.])
1618
AH_TEMPLATE([HAVE_PCRE_JIT_SUPPORT],
1719
[Define to 1 if PCRE JIT is enabled and supported.])
1820

@@ -21,7 +23,7 @@ if test "$PHP_EXTERNAL_PCRE" != "no"; then
2123

2224
PHP_EVAL_INCLINE([$PCRE2_CFLAGS])
2325
PHP_EVAL_LIBLINE([$PCRE2_LIBS])
24-
AC_DEFINE(PCRE2_CODE_UNIT_WIDTH, 8, [ ])
26+
AC_DEFINE([PCRE2_CODE_UNIT_WIDTH], [8])
2527

2628
AS_VAR_IF([PHP_PCRE_JIT], [no],,
2729
[AC_CACHE_CHECK([whether external PCRE2 library has JIT supported],
@@ -89,8 +91,9 @@ else
8991
[-Werror])
9092

9193
PHP_PCRE_CFLAGS="$PHP_PCRE_CFLAGS -DHAVE_CONFIG_H -I@ext_srcdir@/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
92-
AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
93-
AC_DEFINE(PCRE2_CODE_UNIT_WIDTH, 8, [ ])
94+
AC_DEFINE([HAVE_BUNDLED_PCRE], [1],
95+
[Define to 1 if PHP uses the bundled PCRE library.])
96+
AC_DEFINE([PCRE2_CODE_UNIT_WIDTH], [8])
9497

9598
AS_VAR_IF([PHP_PCRE_JIT], [no],,
9699
[AC_DEFINE([HAVE_PCRE_JIT_SUPPORT], [1])

ext/pdo_mysql/config.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ if test "$PHP_PDO_MYSQL" != "no"; then
3939
if test "$PHP_PDO_MYSQL" = "yes" || test "$PHP_PDO_MYSQL" = "mysqlnd"; then
4040
dnl enables build of mysqnd library
4141
PHP_MYSQLND_ENABLED=yes
42-
AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd])
42+
AC_DEFINE([PDO_USE_MYSQLND], [1],
43+
[Define to 1 if the pdo_mysql extension uses mysqlnd.])
4344
else
4445
AC_MSG_CHECKING([for mysql_config])
4546
if test -n "$PDO_MYSQL_CONFIG"; then

ext/pdo_mysql/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG_WITH("pdo-mysql", "MySQL support for PDO", "no");
44

55
if (PHP_PDO_MYSQL != "no") {
66
if (PHP_PDO_MYSQL == "yes" || PHP_PDO_MYSQL == "mysqlnd") {
7-
AC_DEFINE('PDO_USE_MYSQLND', 1, 'Using MySQL native driver');
7+
AC_DEFINE('PDO_USE_MYSQLND', 1, 'Define to 1 if the pdo_mysql extension uses mysqlnd.');
88
STDOUT.WriteLine("INFO: mysqlnd build");
99
EXTENSION("pdo_mysql", "pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c", null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
1010
ADD_EXTENSION_DEP('pdo_mysql', 'pdo');

ext/readline/config.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
8080
LIBS=$LIBS_SAVE
8181

8282
AC_DEFINE(HAVE_HISTORY_LIST, 1, [ ])
83-
AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])
83+
AC_DEFINE([HAVE_LIBREADLINE], [1],
84+
[Define to 1 if readline extension uses the 'readline' library.])
8485

8586
elif test "$PHP_LIBEDIT" != "no"; then
8687
if test "$PHP_LIBEDIT" != "yes"; then
@@ -131,7 +132,8 @@ elif test "$PHP_LIBEDIT" != "no"; then
131132
CFLAGS=$CFLAGS_SAVE
132133
LIBS=$LIBS_SAVE
133134

134-
AC_DEFINE(HAVE_LIBEDIT, 1, [ ])
135+
AC_DEFINE([HAVE_LIBEDIT], [1],
136+
[Define to 1 if readline extension uses the 'libedit' library.])
135137
fi
136138

137139
if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then

ext/standard/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (PHP_PASSWORD_ARGON2 != "no") {
1717
ARG_WITH("config-file-scan-dir", "Dir to check for additional php ini files", "");
1818

1919
AC_DEFINE("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR);
20-
AC_DEFINE("PHP_USE_PHP_CRYPT_R", 1);
20+
AC_DEFINE("PHP_USE_PHP_CRYPT_R", 1, "Define to 1 if PHP uses its own crypt_r, and to 0 if using the external crypt library.");
2121

2222
CHECK_HEADER_ADD_INCLUDE("timelib_config.h", "CFLAGS_STANDARD", "ext/date/lib");
2323

0 commit comments

Comments
 (0)