Skip to content

Commit 61a0e3b

Browse files
authored
Sync HAVE_OPENSSL* symbols (#14333)
This syncs few inconsistencies between the Windows and Autotools build systems: - HAVE_OPENSSL_EXT is now defined in the same style on both systems (undefined - extension is not available, defined to 1 - extension is available) - HAVE_OPENSSL removed as it was only defined on Windows
1 parent bfc9885 commit 61a0e3b

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

UPGRADING.INTERNALS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ PHP 8.4 INTERNALS UPGRADE NOTES
156156
- Unused symbols CONFIGURATION_FILE_PATH, DISCARD_PATH, HAVE_ERRMSG_H,
157157
HAVE_REGCOMP, HAVE_RINT, NEED_ISBLANK, PHP_URL_FOPEN, REGEX, HSREGEX,
158158
USE_CONFIG_FILE have been removed.
159+
- The HAVE_OPENSSL symbol has been removed.
160+
- The HAVE_OPENSSL_EXT symbol is now consistently defined to value 1 whether
161+
the openssl extension is available either as shared or built statically.
159162

160163
========================
161164
3. Module changes

ext/openssl/config.w32

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ if (PHP_OPENSSL != "no") {
77

88
if (ret > 0) {
99
EXTENSION("openssl", "openssl.c xp_ssl.c");
10-
AC_DEFINE("HAVE_OPENSSL_EXT", PHP_OPENSSL_SHARED ? 0 : 1, "Have openssl");
11-
AC_DEFINE("HAVE_OPENSSL", 1);
10+
AC_DEFINE("HAVE_OPENSSL_EXT", 1, "Define to 1 if the openssl extension is available.");
1211
}
1312
}

ext/openssl/config0.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ if test "$PHP_OPENSSL" != "no"; then
2121
PHP_NEW_EXTENSION(openssl, openssl.c xp_ssl.c, $ext_shared)
2222
PHP_SUBST(OPENSSL_SHARED_LIBADD)
2323
PHP_SETUP_OPENSSL([OPENSSL_SHARED_LIBADD],
24-
[AC_DEFINE([HAVE_OPENSSL_EXT], [1], [ ])])
24+
[AC_DEFINE([HAVE_OPENSSL_EXT], [1],
25+
[Define to 1 if the openssl extension is available.])])
2526

2627
AC_CHECK_FUNCS([RAND_egd])
2728

ext/openssl/php_openssl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#ifndef PHP_OPENSSL_H
1919
#define PHP_OPENSSL_H
20-
/* HAVE_OPENSSL would include SSL MySQL stuff */
20+
2121
#ifdef HAVE_OPENSSL_EXT
2222
extern zend_module_entry openssl_module_entry;
2323
#define phpext_openssl_ptr &openssl_module_entry

sapi/cgi/cgi_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS;
8787
#include "fastcgi.h"
8888
#include "cgi_main_arginfo.h"
8989

90-
#if defined(PHP_WIN32) && defined(HAVE_OPENSSL)
90+
#if defined(PHP_WIN32) && defined(HAVE_OPENSSL_EXT)
9191
# include "openssl/applink.c"
9292
#endif
9393

sapi/cli/php_cli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
# include "win32/select.h"
8989
#endif
9090

91-
#if defined(PHP_WIN32) && defined(HAVE_OPENSSL)
91+
#if defined(PHP_WIN32) && defined(HAVE_OPENSSL_EXT)
9292
# include "openssl/applink.c"
9393
#endif
9494

sapi/phpdbg/phpdbg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#include "ext/standard/basic_functions.h"
3535

36-
#if defined(PHP_WIN32) && defined(HAVE_OPENSSL)
36+
#if defined(PHP_WIN32) && defined(HAVE_OPENSSL_EXT)
3737
# include "openssl/applink.c"
3838
#endif
3939

0 commit comments

Comments
 (0)