Skip to content

Commit 3523f9d

Browse files
committed
Sync HAVE_OPENSSL* symbols
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 ab80392 commit 3523f9d

File tree

7 files changed

+9
-7
lines changed

7 files changed

+9
-7
lines changed

UPGRADING.INTERNALS

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

156159
========================
157160
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, "Whether the openssl extension is available.");
1211
}
1312
}

ext/openssl/config0.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if test "$PHP_OPENSSL" != "no"; then
2222
PHP_SUBST(OPENSSL_SHARED_LIBADD)
2323
PHP_SETUP_OPENSSL(OPENSSL_SHARED_LIBADD,
2424
[
25-
AC_DEFINE(HAVE_OPENSSL_EXT,1,[ ])
25+
AC_DEFINE([HAVE_OPENSSL_EXT], [1], [Whether the openssl extension is available.])
2626
], [
2727
AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.])
2828
])

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)