From adbdd71dc871a1452cc04b29ef0d086f39f8262b Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Fri, 11 Oct 2002 17:01:34 +0000 Subject: [PATCH] Fixed possible compile-time failure --- ext/iconv/iconv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 92c3a174d36..969aeac9c38 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -106,7 +106,6 @@ static void php_iconv_init_globals(zend_iconv_globals *iconv_globals) PHP_MINIT_FUNCTION(miconv) { - char *impl_name = "unknown"; char *version = ""; ZEND_INIT_MODULE_GLOBALS(iconv, php_iconv_init_globals, NULL); @@ -115,14 +114,16 @@ PHP_MINIT_FUNCTION(miconv) #if HAVE_LIBICONV { static char buf[16]; - impl_name = "libiconv"; snprintf(buf, sizeof(buf), "%d.%d", ((_libiconv_version >> 8) & 0x0f), (_libiconv_version & 0x0f)); version = buf; } #endif - +#ifdef ICONV_IMPL REGISTER_STRING_CONSTANT("ICONV_IMPL", ICONV_IMPL, CONST_CS | CONST_PERSISTENT); +#else + REGISTER_STRING_CONSTANT("ICONV_IMPL", "unknown", CONST_CS | CONST_PERSISTENT); +#endif REGISTER_STRING_CONSTANT("ICONV_VERSION", version, CONST_CS | CONST_PERSISTENT); return SUCCESS;