Skip to content

Commit 329f015

Browse files
authored
Sync HAVE_ENCHANT_BROKER_SET_PARAM definitions (#14340)
This defines the HAVE_ENCHANT_BROKER_SET_PARAM to 1 or doesn't define it so it can be used in a similar way between platforms. It is only defined for Enchant versions 1.5.0 to 2.x. Previously on Windows it was defined to 0 if not found.
1 parent 8896bd3 commit 329f015

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ext/enchant/config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ if (PHP_ENCHANT == "yes") {
77
CHECK_HEADER_ADD_INCLUDE("glib.h", "CFLAGS_ENCHANT", PHP_ENCHANT+ ";" + PHP_PHP_BUILD + "\\include\\glib-2.0")) {
88
if (CHECK_LIB("libenchant2.lib", "enchant", PHP_ENCHANT)) {
99
have_enchant = true;
10-
AC_DEFINE('HAVE_ENCHANT_BROKER_SET_PARAM', 0);
1110
} else if (CHECK_LIB("libenchant.lib", "enchant", PHP_ENCHANT)) {
1211
have_enchant = true;
1312
AC_DEFINE('HAVE_ENCHANT_BROKER_SET_PARAM', 1);

ext/enchant/enchant.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ PHP_FUNCTION(enchant_broker_set_dict_path)
342342
RETURN_THROWS();
343343
}
344344

345-
#if HAVE_ENCHANT_BROKER_SET_PARAM
345+
#ifdef HAVE_ENCHANT_BROKER_SET_PARAM
346346
enchant_broker *pbroker;
347347
if (!value_len) {
348348
RETURN_FALSE;
@@ -381,7 +381,7 @@ PHP_FUNCTION(enchant_broker_get_dict_path)
381381
RETURN_THROWS();
382382
}
383383

384-
#if HAVE_ENCHANT_BROKER_SET_PARAM
384+
#ifdef HAVE_ENCHANT_BROKER_SET_PARAM
385385
enchant_broker *pbroker;
386386
char *value;
387387
PHP_ENCHANT_GET_BROKER;

0 commit comments

Comments
 (0)