sniper Tue Sep 23 22:08:50 2003 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/ext/gettext gettext.c php_gettext.h Log: MFH: Fixed bug #24402 (Compile failure with gettext 0.12.x) Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.403 php-src/NEWS:1.1247.2.404 --- php-src/NEWS:1.1247.2.403 Tue Sep 23 14:26:10 2003 +++ php-src/NEWS Tue Sep 23 22:08:35 2003 @@ -46,6 +46,7 @@ - Fixed bug #25109 (Possible crash when fetching field names in pgsql). (Ilia) - Fixed bug #25106 (Added more stringent checks on bzopen() mode). (Ilia) - Fixed bug #25218 ("deflate" compressed pages had a gzip header). (Stefan) +- Fixed bug #24402 (Compile failure with gettext 0.12.x). (Jani) - Fixed bug #23326 (ext/domxml: Attributes via append_child not supported). (Melvyn) - Fixed bug #21220 (Wrong Apache version shown in phpinfo() output). (Jani) Index: php-src/ext/gettext/gettext.c diff -u php-src/ext/gettext/gettext.c:1.39.4.2 php-src/ext/gettext/gettext.c:1.39.4.3 --- php-src/ext/gettext/gettext.c:1.39.4.2 Sat Feb 8 13:59:38 2003 +++ php-src/ext/gettext/gettext.c Tue Sep 23 22:08:48 2003 @@ -16,58 +16,57 @@ +----------------------------------------------------------------------+ */ -/* $Id: gettext.c,v 1.39.4.2 2003/02/08 18:59:38 sas Exp $ */ +/* $Id: gettext.c,v 1.39.4.3 2003/09/24 02:08:48 sniper Exp $ */ -#include <stdio.h> #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "php.h" -#include "php_gettext.h" #if HAVE_LIBINTL +#include <stdio.h> #include <libintl.h> #include "ext/standard/info.h" +#include "php_gettext.h" /* {{{ php_gettext_functions[] */ function_entry php_gettext_functions[] = { - PHP_FE(textdomain, NULL) - PHP_FE(gettext, NULL) - PHP_FALIAS(_, gettext, NULL) - PHP_FE(dgettext, NULL) - PHP_FE(dcgettext, NULL) - PHP_FE(bindtextdomain, NULL) + PHP_NAMED_FE(textdomain, zif_textdomain, NULL) + PHP_NAMED_FE(gettext, zif_gettext, NULL) + /* Alias for gettext() */ + PHP_NAMED_FE(_, zif_gettext, NULL) + PHP_NAMED_FE(dgettext, zif_dgettext, NULL) + PHP_NAMED_FE(dcgettext, zif_dcgettext, NULL) + PHP_NAMED_FE(bindtextdomain, zif_bindtextdomain, NULL) #if HAVE_NGETTEXT - PHP_FE(ngettext, NULL) + PHP_NAMED_FE(ngettext, zif_ngettext, NULL) #endif #if HAVE_DNGETTEXT - PHP_FE(dngettext, NULL) + PHP_NAMED_FE(dngettext, zif_dngettext, NULL) #endif #if HAVE_DCNGETTEXT - PHP_FE(dcngettext, NULL) + PHP_NAMED_FE(dcngettext, zif_dcngettext, NULL) #endif #if HAVE_BIND_TEXTDOMAIN_CODESET - PHP_FE(bind_textdomain_codeset, NULL) + PHP_NAMED_FE(bind_textdomain_codeset, zif_bind_textdomain_codeset, NULL) #endif - - {NULL, NULL, NULL} }; /* }}} */ zend_module_entry php_gettext_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER, "gettext", php_gettext_functions, NULL, NULL, NULL, NULL, - PHP_MINFO(gettext), - NO_VERSION_YET, + PHP_MINFO(php_gettext), + NO_VERSION_YET, STANDARD_MODULE_PROPERTIES }; @@ -75,7 +74,7 @@ ZEND_GET_MODULE(php_gettext) #endif -PHP_MINFO_FUNCTION(gettext) +PHP_MINFO_FUNCTION(php_gettext) { php_info_print_table_start(); php_info_print_table_row(2, "GetText Support", "enabled"); @@ -84,7 +83,7 @@ /* {{{ proto string textdomain(string domain) Set the textdomain to "domain". Returns the current domain */ -PHP_FUNCTION(textdomain) +PHP_NAMED_FUNCTION(zif_textdomain) { zval **domain; char *domain_name, *retval; @@ -110,7 +109,7 @@ /* {{{ proto string gettext(string msgid) Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist */ -PHP_FUNCTION(gettext) +PHP_NAMED_FUNCTION(zif_gettext) { zval **msgid; char *msgstr; @@ -128,7 +127,7 @@ /* {{{ proto string dgettext(string domain_name, string msgid) Return the translation of msgid for domain_name, or msgid unaltered if a translation does not exist */ -PHP_FUNCTION(dgettext) +PHP_NAMED_FUNCTION(zif_dgettext) { zval **domain_name, **msgid; char *msgstr; @@ -147,7 +146,7 @@ /* {{{ proto string dcgettext(string domain_name, string msgid, long category) Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist */ -PHP_FUNCTION(dcgettext) +PHP_NAMED_FUNCTION(zif_dcgettext) { zval **domain_name, **msgid, **category; char *msgstr; @@ -167,7 +166,7 @@ /* {{{ proto string bindtextdomain(string domain_name, string dir) Bind to the text domain domain_name, looking for translations in dir. Returns the current domain */ -PHP_FUNCTION(bindtextdomain) +PHP_NAMED_FUNCTION(zif_bindtextdomain) { zval **domain_name, **dir; char *retval, dir_name[MAXPATHLEN]; @@ -198,7 +197,7 @@ #if HAVE_NGETTEXT /* {{{ proto string ngettext(string MSGID1, string MSGID2, int N) Plural version of gettext() */ -PHP_FUNCTION(ngettext) +PHP_NAMED_FUNCTION(zif_ngettext) { zval **msgid1, **msgid2, **count; char *msgstr; @@ -224,7 +223,7 @@ #if HAVE_DNGETTEXT /* {{{ proto string dngettext (string domain, string msgid1, string msgid2, int count) Plural version of dgettext() */ -PHP_FUNCTION(dngettext) +PHP_NAMED_FUNCTION(zif_dngettext) { zval **domain, **msgid1, **msgid2, **count; @@ -252,7 +251,7 @@ #if HAVE_DCNGETTEXT /* {{{ proto string dcngettext (string domain, string msgid1, string msgid2, int n, int category) Plural version of dcgettext() */ -PHP_FUNCTION(dcngettext) +PHP_NAMED_FUNCTION(zif_dcngettext) { zval **domain, **msgid1, **msgid2, **count, **category; @@ -283,7 +282,7 @@ /* {{{ proto string bind_textdomain_codeset (string domain, string codeset) Specify the character encoding in which the messages from the DOMAIN message catalog will be returned. */ -PHP_FUNCTION(bind_textdomain_codeset) +PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset) { zval **domain, **codeset; char *retval; Index: php-src/ext/gettext/php_gettext.h diff -u php-src/ext/gettext/php_gettext.h:1.15.8.1 php-src/ext/gettext/php_gettext.h:1.15.8.2 --- php-src/ext/gettext/php_gettext.h:1.15.8.1 Tue Dec 31 11:34:38 2002 +++ php-src/ext/gettext/php_gettext.h Tue Sep 23 22:08:48 2003 @@ -16,37 +16,34 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_gettext.h,v 1.15.8.1 2002/12/31 16:34:38 sebastian Exp $ */ +/* $Id: php_gettext.h,v 1.15.8.2 2003/09/24 02:08:48 sniper Exp $ */ #ifndef PHP_GETTEXT_H #define PHP_GETTEXT_H #if HAVE_LIBINTL -#ifndef INIT_FUNC_ARGS -#include "zend_modules.h" -#endif extern zend_module_entry php_gettext_module_entry; #define gettext_module_ptr &php_gettext_module_entry -PHP_MINFO_FUNCTION(gettext); +PHP_MINFO_FUNCTION(php_gettext); -PHP_FUNCTION(textdomain); -PHP_FUNCTION(gettext); -PHP_FUNCTION(dgettext); -PHP_FUNCTION(dcgettext); -PHP_FUNCTION(bindtextdomain); +PHP_NAMED_FUNCTION(zif_textdomain); +PHP_NAMED_FUNCTION(zif_gettext); +PHP_NAMED_FUNCTION(zif_dgettext); +PHP_NAMED_FUNCTION(zif_dcgettext); +PHP_NAMED_FUNCTION(zif_bindtextdomain); #if HAVE_NGETTEXT -PHP_FUNCTION(ngettext); +PHP_NAMED_FUNCTION(zif_ngettext); #endif #if HAVE_DNGETTEXT -PHP_FUNCTION(dngettext); +PHP_NAMED_FUNCTION(zif_dngettext); #endif #if HAVE_DCNGETTEXT -PHP_FUNCTION(dcngettext); +PHP_NAMED_FUNCTION(zif_dcngettext); #endif #if HAVE_BIND_TEXTDOMAIN_CODESET -PHP_FUNCTION(bind_textdomain_codeset); +PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset); #endif #else
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php