cvs: /php4 configuration-parser.y php.h /php4/ext/apache apache.c /php4/ext/aspell aspell.c php3_aspell.h /php4/ext/bcmath bcmath.c php3_bcmath.h
/php4/ext/com COM.c php3_COM.h /php4/ext/db db.c php3_db.h /php4/ext/standard basic_functions.c basic_functions.h browscap.c crypt.c dir.c dl.c dl.h
file.c file.h filestat.c fsock.c fsock.h head.c head.h mail.c pack.c pack.h php3_browscap.h php3_crypt.h php3_dir.h php3_filestat.h php3_mail.h
php3_syslog.h reg.c syslog.c

From: Date: Mon, 26 Jul 1999 20:09:09 +0000
Subject: cvs: /php4 configuration-parser.y php.h /php4/ext/apache apache.c /php4/ext/aspell aspell.c php3_aspell.h /php4/ext/bcmath bcmath.c php3_bcmath.h
/php4/ext/com COM.c php3_COM.h /php4/ext/db db.c php3_db.h /php4/ext/standard basic_functions.c basic_functions.h browscap.c crypt.c dir.c dl.c dl.h
file.c file.h filestat.c fsock.c fsock.h head.c head.h mail.c pack.c pack.h php3_browscap.h php3_crypt.h php3_dir.h php3_filestat.h php3_mail.h
php3_syslog.h reg.c syslog.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-2808@lists.php.net to get a copy of this message
andrey Mon Jul 26 16:09:09 1999 EDT Modified files: /php4 configuration-parser.y php.h /php4/ext/apache apache.c /php4/ext/aspell aspell.c php3_aspell.h /php4/ext/bcmath bcmath.c php3_bcmath.h /php4/ext/com COM.c php3_COM.h /php4/ext/db db.c php3_db.h /php4/ext/standard basic_functions.c basic_functions.h browscap.c crypt.c dir.c dl.c dl.h file.c file.h filestat.c fsock.c fsock.h head.c head.h mail.c pack.c pack.h php3_browscap.h php3_crypt.h php3_dir.h php3_filestat.h php3_mail.h php3_syslog.h reg.c syslog.c Log: More symbol work. I've defined a few macros to help with module/request init/startup function definitions. Basically: PHP_MINIT_FUNCTION(module) PHP_MSHUTDOWN_FUNCTION(module) PHP_RINIT_FUNCTION(module) PHP_RSHUTDOWN_FUNCTION(module) PHP_MINFO_FUNCTION(module) These will expand to proper function prototypes. Now to specify these in the module entry, use: PHP_MINIT(module) PHP_MSHUTDOWN(module) PHP_RINIT(module) PHP_RSHUTDOWN(module) PHP_MINFO(module) I've updated all modules in ext/standard and everything from ext/apache to ext/db. If you can, please update your module to use these macros. Index: php4/configuration-parser.y diff -u php4/configuration-parser.y:1.16 php4/configuration-parser.y:1.17 --- php4/configuration-parser.y:1.16 Fri Jul 16 09:12:41 1999 +++ php4/configuration-parser.y Mon Jul 26 16:09:04 1999 @@ -19,7 +19,7 @@ -/* $Id: configuration-parser.y,v 1.16 1999/07/16 13:12:41 zeev Exp $ */ +/* $Id: configuration-parser.y,v 1.17 1999/07/26 20:09:04 andrey Exp $ */ #define DEBUG_CFG_PARSER 1 #include "php.h" @@ -244,7 +244,7 @@ } -int php3_minit_browscap(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(browscap) { char *browscap = INI_STR("browscap"); @@ -277,7 +277,7 @@ } -int php3_mshutdown_browscap(SHUTDOWN_FUNC_ARGS) +PHP_MSHUTDOWN_FUNCTION(browscap) { if (INI_STR("browscap")) { _php3_hash_destroy(&browser_hash); Index: php4/php.h diff -u php4/php.h:1.21 php4/php.h:1.22 --- php4/php.h:1.21 Fri Jul 16 09:12:42 1999 +++ php4/php.h Mon Jul 26 16:09:04 1999 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.21 1999/07/16 13:12:42 zeev Exp $ */ +/* $Id: php.h,v 1.22 1999/07/26 20:09:04 andrey Exp $ */ #ifndef _PHP_H #define _PHP_H @@ -246,12 +246,25 @@ #define MAXPATHLEN 256 /* Should be safe for any weird systems that do not define it */ #endif +#define PHP_FN(name) php3_##name #define PHP_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS) #define PHP_FUNCTION(name) PHP_NAMED_FUNCTION(php3_##name) #define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types }, #define PHP_FE(name, arg_types) PHP_NAMED_FE(name, php3_##name, arg_types) #define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, php3_##alias, arg_types) + +#define PHP_MINIT(module) php3_minit_##module +#define PHP_MSHUTDOWN(module) php3_mshutdown_##module +#define PHP_RINIT(module) php3_rinit_##module +#define PHP_RSHUTDOWN(module) php3_rshutdown_##module +#define PHP_MINFO(module) php3_info_##module + +#define PHP_MINIT_FUNCTION(module) int php3_minit_##module(INIT_FUNC_ARGS) +#define PHP_MSHUTDOWN_FUNCTION(module) int php3_mshutdown_##module(SHUTDOWN_FUNC_ARGS) +#define PHP_RINIT_FUNCTION(module) int php3_rinit_##module(INIT_FUNC_ARGS) +#define PHP_RSHUTDOWN_FUNCTION(module) int php3_rshutdown_##module(SHUTDOWN_FUNC_ARGS) +#define PHP_MINFO_FUNCTION(module) void php3_info_##module(ZEND_MODULE_INFO_FUNC_ARGS) /* global variables */ Index: php4/ext/apache/apache.c diff -u php4/ext/apache/apache.c:1.15 php4/ext/apache/apache.c:1.16 --- php4/ext/apache/apache.c:1.15 Sat Jul 17 16:03:10 1999 +++ php4/ext/apache/apache.c Mon Jul 26 16:09:06 1999 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: apache.c,v 1.15 1999/07/17 20:03:10 andrey Exp $ */ +/* $Id: apache.c,v 1.16 1999/07/26 20:09:06 andrey Exp $ */ #include "php.h" #include "ext/standard/head.h" #include "php_globals.h" @@ -46,15 +46,16 @@ PHP_FUNCTION(virtual); PHP_FUNCTION(getallheaders); PHP_FUNCTION(apachelog); -void php3_info_apache(ZEND_MODULE_INFO_FUNC_ARGS); PHP_FUNCTION(apache_note); PHP_FUNCTION(apache_lookup_uri); +PHP_MINFO_FUNCTION(apache); + function_entry apache_functions[] = { - {"virtual", php3_virtual, NULL}, - {"getallheaders", php3_getallheaders, NULL}, - {"apache_note", php3_apache_note,NULL}, - {"apache_lookup_uri", php3_apache_lookup_uri,NULL}, + PHP_FE(virtual, NULL) + PHP_FE(getallheaders, NULL) + PHP_FE(apache_note, NULL) + PHP_FE(apache_lookup_uri, NULL) {NULL, NULL, NULL} }; @@ -98,14 +99,14 @@ PHP_INI_END() -static int php_apache_minit(INIT_FUNC_ARGS) +static PHP_MINIT_FUNCTION(apache) { REGISTER_INI_ENTRIES(); return SUCCESS; } -static int php_apache_mshutdown(SHUTDOWN_FUNC_ARGS) +static PHP_MSHUTDOWN_FUNCTION(apache) { UNREGISTER_INI_ENTRIES(); return SUCCESS; @@ -113,7 +114,7 @@ php3_module_entry apache_module_entry = { - "Apache", apache_functions, php_apache_minit, php_apache_mshutdown, NULL, NULL, php3_info_apache, STANDARD_MODULE_PROPERTIES + "Apache", apache_functions, PHP_MINIT(apache), PHP_MSHUTDOWN(apache), NULL, NULL, PHP_MINFO(apache), STANDARD_MODULE_PROPERTIES }; /* {{{ proto string apache_note(string note_name [, string note_value]) @@ -146,7 +147,7 @@ } /* }}} */ -void php3_info_apache(ZEND_MODULE_INFO_FUNC_ARGS) +PHP_MINFO_FUNCTION(apache) { module *modp = NULL; char output_buf[128]; Index: php4/ext/aspell/aspell.c diff -u php4/ext/aspell/aspell.c:1.3 php4/ext/aspell/aspell.c:1.4 --- php4/ext/aspell/aspell.c:1.3 Fri Jul 16 09:12:42 1999 +++ php4/ext/aspell/aspell.c Mon Jul 26 16:09:07 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: aspell.c,v 1.3 1999/07/16 13:12:42 zeev Exp $ */ +/* $Id: aspell.c,v 1.4 1999/07/26 20:09:07 andrey Exp $ */ #include "php.h" #if defined(COMPILE_DL) @@ -37,17 +37,17 @@ #include <aspell-c.h> function_entry aspell_functions[] = { - {"aspell_new", php3_aspell_new, NULL}, - {"aspell_check", php3_aspell_check, NULL}, - {"aspell_check_raw", php3_aspell_check_raw, NULL}, - {"aspell_suggest", php3_aspell_suggest, NULL}, + PHP_FE(aspell_new, NULL) + PHP_FE(aspell_check, NULL) + PHP_FE(aspell_check_raw, NULL) + PHP_FE(aspell_suggest, NULL) {NULL, NULL, NULL} }; static int le_aspell; php3_module_entry aspell_module_entry = { - "Aspell", aspell_functions, php3_minit_aspell, NULL, NULL, NULL, php3_info_aspell, STANDARD_MODULE_PROPERTIES + "Aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), STANDARD_MODULE_PROPERTIES }; @@ -55,7 +55,7 @@ DLEXPORT php3_module_entry *get_module(void) { return &aspell_module_entry; } #endif -int php3_minit_aspell(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(aspell) { le_aspell = register_list_destructors(php3_aspell_close,NULL); return SUCCESS; @@ -68,7 +68,7 @@ /* {{{ proto int aspell_new(string master[, string personal]) Load a dictionary */ -void php3_aspell_new(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(aspell_new) { pval *master, *personal; int argc; @@ -93,9 +93,10 @@ } /* }}} */ + /* {{{ proto array aspell_suggest(aspell int,string word) Return array of Suggestions */ -void php3_aspell_suggest(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(aspell_suggest) { pval *scin, *word; int argc; @@ -132,7 +133,7 @@ /* {{{ proto int aspell_check(aspell int,string word) Return if word is valid */ -void php3_aspell_check(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(aspell_check) { int type; pval *scin,*word; @@ -164,7 +165,7 @@ /* {{{ proto int aspell_check_raw(aspell int,string word) Return if word is valid, ignoring case or trying to trim it in any way*/ -void php3_aspell_check_raw(INTERNAL_FUNCTION_PARAMETERS) +PHP_FUNCTION(aspell_check_raw) { pval *scin,*word; int type; @@ -194,7 +195,7 @@ } /* }}} */ -void php3_info_aspell(ZEND_MODULE_INFO_FUNC_ARGS) +PHP_MINFO_FUNCTION(aspell) { php3_printf("ASpell support enabled"); Index: php4/ext/aspell/php3_aspell.h diff -u php4/ext/aspell/php3_aspell.h:1.2 php4/ext/aspell/php3_aspell.h:1.3 --- php4/ext/aspell/php3_aspell.h:1.2 Mon Jul 12 15:17:53 1999 +++ php4/ext/aspell/php3_aspell.h Mon Jul 26 16:09:07 1999 @@ -28,7 +28,7 @@ */ -/* $Id: php3_aspell.h,v 1.2 1999/07/12 19:17:53 rasmus Exp $ */ +/* $Id: php3_aspell.h,v 1.3 1999/07/26 20:09:07 andrey Exp $ */ #ifndef _ASPELL_H #define _ASPELL_H @@ -36,13 +36,14 @@ extern php3_module_entry aspell_module_entry; #define aspell_module_ptr &aspell_module_entry -extern int php3_minit_aspell(INIT_FUNC_ARGS); -extern void php3_info_aspell(ZEND_MODULE_INFO_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(aspell); +extern PHP_MINFO_FUNCTION(aspell); extern void php3_aspell_close(); -void php3_aspell_new(INTERNAL_FUNCTION_PARAMETERS); -void php3_aspell_check(INTERNAL_FUNCTION_PARAMETERS); -void php3_aspell_check_raw(INTERNAL_FUNCTION_PARAMETERS); -void php3_aspell_suggest(INTERNAL_FUNCTION_PARAMETERS); + +PHP_FUNCTION(aspell_new); +PHP_FUNCTION(aspell_check); +PHP_FUNCTION(aspell_check_raw); +PHP_FUNCTION(aspell_suggest); #else #define aspell_module_ptr NULL Index: php4/ext/bcmath/bcmath.c diff -u php4/ext/bcmath/bcmath.c:1.5 php4/ext/bcmath/bcmath.c:1.6 --- php4/ext/bcmath/bcmath.c:1.5 Fri Jul 16 09:12:43 1999 +++ php4/ext/bcmath/bcmath.c Mon Jul 26 16:09:07 1999 @@ -24,20 +24,20 @@ #include "php3_bcmath.h" function_entry bcmath_functions[] = { - {"bcadd", php3_bcmath_add, NULL}, - {"bcsub", php3_bcmath_sub, NULL}, - {"bcmul", php3_bcmath_mul, NULL}, - {"bcdiv", php3_bcmath_div, NULL}, - {"bcmod", php3_bcmath_mod, NULL}, - {"bcpow", php3_bcmath_pow, NULL}, - {"bcsqrt", php3_bcmath_sqrt, NULL}, - {"bcscale", php3_bcmath_set_scale, NULL}, - {"bccomp", php3_bcmath_comp, NULL}, + PHP_FE(bcadd, NULL) + PHP_FE(bcsub, NULL) + PHP_FE(bcmul, NULL) + PHP_FE(bcdiv, NULL) + PHP_FE(bcmod, NULL) + PHP_FE(bcpow, NULL) + PHP_FE(bcsqrt, NULL) + PHP_FE(bcscale, NULL) + PHP_FE(bccomp, NULL) {NULL, NULL, NULL} }; php3_module_entry bcmath_module_entry = { - "bcmath", bcmath_functions, NULL, NULL, php3_rinit_bcmath, php3_rend_bcmath, NULL, STANDARD_MODULE_PROPERTIES + "bcmath", bcmath_functions, NULL, NULL, PHP_RINIT(bcmath), PHP_RSHUTDOWN(bcmath), NULL, STANDARD_MODULE_PROPERTIES }; #if COMPILE_DL @@ -48,7 +48,7 @@ static long bc_precision; #endif -int php3_rinit_bcmath(INIT_FUNC_ARGS) +PHP_RINIT_FUNCTION(bcmath) { init_numbers(); if (cfg_get_long("bcmath.scale",&bc_precision)==FAILURE) { @@ -57,7 +57,7 @@ return SUCCESS; } -int php3_rend_bcmath(SHUTDOWN_FUNC_ARGS) +PHP_RSHUTDOWN_FUNCTION(bcmath) { destruct_numbers(); return SUCCESS; @@ -65,7 +65,7 @@ /* {{{ proto string bcadd(string left_operand, string right_operand [, int scale]) Returns the sum of two arbitrary precision numbers */ -PHP_FUNCTION(bcmath_add) +PHP_FUNCTION(bcadd) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -108,7 +108,7 @@ /* {{{ proto string bcsub(string left_operand, string right_operand [, int scale]) Returns the difference between two arbitrary precision numbers (subtration) */ -PHP_FUNCTION(bcmath_sub) +PHP_FUNCTION(bcsub) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -151,7 +151,7 @@ /* {{{ proto string bcmul(string left_operand, string right_operand [, int scale]) Returns the multiplication of two arbitrary precision numbers */ -PHP_FUNCTION(bcmath_mul) +PHP_FUNCTION(bcmul) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -194,7 +194,7 @@ /* {{{ proto string bcdiv(string left_operand, string right_operand [, int scale]) Returns the quotient of two arbitrary precision numbers (division) */ -PHP_FUNCTION(bcmath_div) +PHP_FUNCTION(bcdiv) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -243,7 +243,7 @@ /* {{{ proto string bcmod(string left_operand, string right_operand) Returns the modulus of the two arbitrary precision operands */ -PHP_FUNCTION(bcmath_mod) +PHP_FUNCTION(bcmod) { pval *left, *right; bc_num first, second, result; @@ -284,7 +284,7 @@ /* {{{ proto string bcpow(string x, string y [, int scale]) Returns the value of an arbitrary precision number raised to the power of another */ -PHP_FUNCTION(bcmath_pow) +PHP_FUNCTION(bcpow) { pval *left, *right,*scale_param; bc_num first, second, result; @@ -327,7 +327,7 @@ /* {{{ proto string bcsqrt(string operand [, int scale]) Returns the square root of an arbitray precision number */ -PHP_FUNCTION(bcmath_sqrt) +PHP_FUNCTION(bcsqrt) { pval *left,*scale_param; bc_num result; @@ -367,7 +367,7 @@ /* {{{ proto string bccomp(string left_operand, string right_operand [, int scale]) Compares two arbitrary precision numbers */ -PHP_FUNCTION(bcmath_comp) +PHP_FUNCTION(bccomp) { pval *left, *right, *scale_param; bc_num first, second; @@ -409,7 +409,7 @@ /* {{{ proto string bcscale(int scale) Sets default scale parameter for all bc math functions */ -PHP_FUNCTION(bcmath_set_scale) +PHP_FUNCTION(bcscale) { pval *new_scale; Index: php4/ext/bcmath/php3_bcmath.h diff -u php4/ext/bcmath/php3_bcmath.h:1.3 php4/ext/bcmath/php3_bcmath.h:1.4 --- php4/ext/bcmath/php3_bcmath.h:1.3 Fri May 21 06:05:43 1999 +++ php4/ext/bcmath/php3_bcmath.h Mon Jul 26 16:09:07 1999 @@ -28,7 +28,7 @@ */ -/* $Id: php3_bcmath.h,v 1.3 1999/05/21 10:05:43 sas Exp $ */ +/* $Id: php3_bcmath.h,v 1.4 1999/07/26 20:09:07 andrey Exp $ */ #ifndef _PHP3_BCMATH_H #define _PHP3_BCMATH_H @@ -43,17 +43,17 @@ extern php3_module_entry bcmath_module_entry; #define phpext_bcmath_ptr &bcmath_module_entry -extern int php3_rinit_bcmath(INIT_FUNC_ARGS); -extern int php3_rend_bcmath(SHUTDOWN_FUNC_ARGS); -PHP_FUNCTION(bcmath_add); -PHP_FUNCTION(bcmath_sub); -PHP_FUNCTION(bcmath_mul); -PHP_FUNCTION(bcmath_div); -PHP_FUNCTION(bcmath_mod); -PHP_FUNCTION(bcmath_pow); -PHP_FUNCTION(bcmath_sqrt); -PHP_FUNCTION(bcmath_comp); -PHP_FUNCTION(bcmath_set_scale); +extern PHP_RINIT_FUNCTION(bcmath); +extern PHP_RSHUTDOWN_FUNCTION(bcmath); +PHP_FUNCTION(bcadd); +PHP_FUNCTION(bcsub); +PHP_FUNCTION(bcmul); +PHP_FUNCTION(bcdiv); +PHP_FUNCTION(bcmod); +PHP_FUNCTION(bcpow); +PHP_FUNCTION(bcsqrt); +PHP_FUNCTION(bccomp); +PHP_FUNCTION(bcscale); #else Index: php4/ext/com/COM.c diff -u php4/ext/com/COM.c:1.9 php4/ext/com/COM.c:1.10 --- php4/ext/com/COM.c:1.9 Mon Jul 26 12:54:40 1999 +++ php4/ext/com/COM.c Mon Jul 26 16:09:07 1999 @@ -50,28 +50,28 @@ static int le_idispatch; function_entry COM_functions[] = { - {"com_load", php3_COM_load, NULL}, - {"com_invoke", php3_COM_invoke, NULL}, + PHP_FE(COM_load, NULL) + PHP_FE(COM_invoke, NULL) - PHP_FE(com_propget, NULL) - PHP_FE(com_propput, NULL) + PHP_FE(com_propget, NULL) + PHP_FE(com_propput, NULL) - PHP_NAMED_FE(com_get, php3_com_propget, NULL) - PHP_NAMED_FE(com_propset, php3_com_propput, NULL) - PHP_NAMED_FE(com_set, php3_com_propput, NULL) + PHP_FALIAS(com_get, com_propget, NULL) + PHP_FALIAS(com_propset, com_propput, NULL) + PHP_FALIAS(com_set, com_propput, NULL) {NULL, NULL, NULL} }; -static void php_info_COM(ZEND_MODULE_INFO_FUNC_ARGS) +static PHP_MINFO_FUNCTION(COM) { DISPLAY_INI_ENTRIES(); } php3_module_entry COM_module_entry = { - "Win32 COM", COM_functions, php3_minit_COM, php3_mshutdown_COM, NULL, NULL, php_info_COM, STANDARD_MODULE_PROPERTIES + "Win32 COM", COM_functions, PHP_MINIT(COM), PHP_MSHUTDOWN(COM), NULL, NULL, PHP_MINFO(COM), STANDARD_MODULE_PROPERTIES }; void php_register_COM_class(); @@ -214,7 +214,7 @@ PHP_INI_END() -int php3_minit_COM(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(COM) { CoInitialize(NULL); le_idispatch = register_list_destructors(_php3_idispatch_destructor,NULL); @@ -224,7 +224,7 @@ } -int php3_mshutdown_COM(SHUTDOWN_FUNC_ARGS) +PHP_MSHUTDOWN_FUNCTION(COM) { CoUninitialize(); UNREGISTER_INI_ENTRIES(); @@ -817,7 +817,7 @@ && !strcmp(function_name->element.value.str.val, "com")) { /* constructor */ pval *object_handle; - php3_COM_load(INTERNAL_FUNCTION_PARAM_PASSTHRU); + PHP_FN(COM_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU); if (!zend_is_true(return_value)) { var_reset(object); return; Index: php4/ext/com/php3_COM.h diff -u php4/ext/com/php3_COM.h:1.2 php4/ext/com/php3_COM.h:1.3 --- php4/ext/com/php3_COM.h:1.2 Fri May 21 06:05:44 1999 +++ php4/ext/com/php3_COM.h Mon Jul 26 16:09:07 1999 @@ -3,8 +3,8 @@ #if WIN32|WINNT -extern int php3_minit_COM(INIT_FUNC_ARGS); -extern int php3_mshutdown_COM(SHUTDOWN_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(COM); +extern PHP_MSHUTDOWN_FUNCTION(COM); PHP_FUNCTION(COM_load); PHP_FUNCTION(COM_invoke); Index: php4/ext/db/db.c diff -u php4/ext/db/db.c:1.5 php4/ext/db/db.c:1.6 --- php4/ext/db/db.c:1.5 Fri Jul 16 09:12:46 1999 +++ php4/ext/db/db.c Mon Jul 26 16:09:08 1999 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: db.c,v 1.5 1999/07/16 13:12:46 zeev Exp $ */ +/* $Id: db.c,v 1.6 1999/07/26 20:09:08 andrey Exp $ */ #define IS_EXT_MODULE #if COMPILE_DL #ifdef PHP_31 @@ -240,7 +240,7 @@ } -void php3_info_db(ZEND_MODULE_INFO_FUNC_ARGS) +PHP_MINFO_FUNCTION(db) { php3_printf(php3_get_info_db()); } @@ -1079,7 +1079,7 @@ #endif -int php3_minit_db(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(db) { #if defined(THREAD_SAFE) dbm_global_struct *dbm_globals; @@ -1104,7 +1104,8 @@ return SUCCESS; } -static int php3_mend_db(void){ +static PHP_MSHUTDOWN_FUNCTION(db) +{ DBM_TLS_VARS; #ifdef THREAD_SAFE PHP3_TLS_THREAD_FREE(dbm_globals); @@ -1121,7 +1122,8 @@ return SUCCESS; } -int php3_rinit_db(INIT_FUNC_ARGS) { +PHP_RINIT_FUNCTION(db) +{ #if !GDBM && !NDBM CurrentFlatFilePos = 0L; #endif @@ -1130,21 +1132,21 @@ function_entry dbm_functions[] = { - {"dblist", php3_dblist, NULL}, - {"dbmopen", php3_dbmopen, NULL}, - {"dbmclose", php3_dbmclose, NULL}, - {"dbminsert", php3_dbminsert, NULL}, - {"dbmfetch", php3_dbmfetch, NULL}, - {"dbmreplace", php3_dbmreplace, NULL}, - {"dbmexists", php3_dbmexists, NULL}, - {"dbmdelete", php3_dbmdelete, NULL}, - {"dbmfirstkey", php3_dbmfirstkey, NULL}, - {"dbmnextkey", php3_dbmnextkey, NULL}, + PHP_FE(dblist, NULL) + PHP_FE(dbmopen, NULL) + PHP_FE(dbmclose, NULL) + PHP_FE(dbminsert, NULL) + PHP_FE(dbmfetch, NULL) + PHP_FE(dbmreplace, NULL) + PHP_FE(dbmexists, NULL) + PHP_FE(dbmdelete, NULL) + PHP_FE(dbmfirstkey, NULL) + PHP_FE(dbmnextkey, NULL) {NULL,NULL,NULL} }; php3_module_entry dbm_module_entry = { - "DBM", dbm_functions, php3_minit_db, php3_mend_db, php3_rinit_db, NULL, php3_info_db, STANDARD_MODULE_PROPERTIES + "DBM", dbm_functions, PHP_MINIT(db), PHP_MSHUTDOWN(db), PHP_RINIT(db), NULL, PHP_MINFO(db), STANDARD_MODULE_PROPERTIES }; #if COMPILE_DL Index: php4/ext/db/php3_db.h diff -u php4/ext/db/php3_db.h:1.3 php4/ext/db/php3_db.h:1.4 --- php4/ext/db/php3_db.h:1.3 Fri May 21 06:05:46 1999 +++ php4/ext/db/php3_db.h Mon Jul 26 16:09:08 1999 @@ -28,7 +28,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php3_db.h,v 1.3 1999/05/21 10:05:46 sas Exp $ */ +/* $Id: php3_db.h,v 1.4 1999/07/26 20:09:08 andrey Exp $ */ #ifndef _PHP3_DB_H @@ -74,9 +74,10 @@ char *_php3_dbmnextkey(dbm_info *info, char *key); /* db file functions */ -int php3_minit_db(INIT_FUNC_ARGS); -int php3_rinit_db(INIT_FUNC_ARGS); -void php3_info_db(ZEND_MODULE_INFO_FUNC_ARGS); +PHP_MINIT_FUNCTION(db); +PHP_RINIT_FUNCTION(db); +PHP_MINFO_FUNCTION(db); + PHP_FUNCTION(dblist); PHP_FUNCTION(dbmopen); PHP_FUNCTION(dbmclose); Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.54 php4/ext/standard/basic_functions.c:1.55 --- php4/ext/standard/basic_functions.c:1.54 Mon Jul 26 12:54:41 1999 +++ php4/ext/standard/basic_functions.c Mon Jul 26 16:09:08 1999 @@ -326,10 +326,10 @@ php3_module_entry basic_functions_module = { "Basic Functions", /* extension name */ basic_functions, /* function list */ - php3_minit_basic, /* process startup */ - php3_mshutdown_basic, /* process shutdown */ - php3_rinit_basic, /* request startup */ - php3_rshutdown_basic, /* request shutdown */ + PHP_MINIT(basic), /* process startup */ + PHP_MSHUTDOWN(basic), /* process shutdown */ + PHP_RINIT(basic), /* request startup */ + PHP_RSHUTDOWN(basic), /* request shutdown */ NULL, /* extension info */ STANDARD_MODULE_PROPERTIES }; @@ -372,7 +372,7 @@ void test_class_startup(); -int php3_minit_basic(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(basic) { ELS_FETCH(); @@ -391,14 +391,14 @@ } -int php3_mshutdown_basic(SHUTDOWN_FUNC_ARGS) +PHP_MSHUTDOWN_FUNCTION(basic) { UNREGISTER_INI_ENTRIES(); return SUCCESS; } -int php3_rinit_basic(INIT_FUNC_ARGS) +PHP_RINIT_FUNCTION(basic) { strtok_string = NULL; #ifdef HAVE_PUTENV @@ -412,7 +412,7 @@ } -int php3_rshutdown_basic(SHUTDOWN_FUNC_ARGS) +PHP_RSHUTDOWN_FUNCTION(basic) { STR_FREE(strtok_string); #ifdef HAVE_PUTENV Index: php4/ext/standard/basic_functions.h diff -u php4/ext/standard/basic_functions.h:1.11 php4/ext/standard/basic_functions.h:1.12 --- php4/ext/standard/basic_functions.h:1.11 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/basic_functions.h Mon Jul 26 16:09:08 1999 @@ -29,7 +29,7 @@ */ -/* $Id: basic_functions.h,v 1.11 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: basic_functions.h,v 1.12 1999/07/26 20:09:08 andrey Exp $ */ #ifndef _BASIC_FUNCTIONS_H #define _BASIC_FUNCTIONS_H @@ -39,10 +39,11 @@ extern php3_module_entry basic_functions_module; #define basic_functions_module_ptr &basic_functions_module -extern int php3_minit_basic(INIT_FUNC_ARGS); -extern int php3_mshutdown_basic(SHUTDOWN_FUNC_ARGS); -extern int php3_rinit_basic(INIT_FUNC_ARGS); -extern int php3_rshutdown_basic(SHUTDOWN_FUNC_ARGS); +PHP_MINIT_FUNCTION(basic); +PHP_MSHUTDOWN_FUNCTION(basic); +PHP_RINIT_FUNCTION(basic); +PHP_RSHUTDOWN_FUNCTION(basic); + PHP_FUNCTION(intval); PHP_FUNCTION(doubleval); PHP_FUNCTION(strval); Index: php4/ext/standard/browscap.c diff -u php4/ext/standard/browscap.c:1.10 php4/ext/standard/browscap.c:1.11 --- php4/ext/standard/browscap.c:1.10 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/browscap.c Mon Jul 26 16:09:08 1999 @@ -35,7 +35,8 @@ }; php3_module_entry browscap_module_entry = { - "browscap", browscap_functions, php3_minit_browscap, php3_mshutdown_browscap, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES + "browscap", browscap_functions, PHP_MINIT(browscap), PHP_MSHUTDOWN(browscap), + NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; Index: php4/ext/standard/crypt.c diff -u php4/ext/standard/crypt.c:1.6 php4/ext/standard/crypt.c:1.7 --- php4/ext/standard/crypt.c:1.6 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/crypt.c Mon Jul 26 16:09:08 1999 @@ -17,7 +17,7 @@ | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: crypt.c,v 1.6 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: crypt.c,v 1.7 1999/07/26 20:09:08 andrey Exp $ */ #include <stdlib.h> #include "php.h" @@ -54,7 +54,7 @@ }; php3_module_entry crypt_module_entry = { - "Crypt", crypt_functions, php_minit_crypt, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES + "Crypt", crypt_functions, PHP_MINIT(crypt), NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; @@ -90,7 +90,7 @@ #endif #endif -int php_minit_crypt(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(crypt) { ELS_FETCH(); Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.8 php4/ext/standard/dir.c:1.9 --- php4/ext/standard/dir.c:1.8 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/dir.c Mon Jul 26 16:09:08 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.8 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: dir.c,v 1.9 1999/07/26 20:09:08 andrey Exp $ */ #include "php.h" #include "fopen-wrappers.h" @@ -63,11 +63,11 @@ php3_module_entry php3_dir_module_entry = { - "PHP_dir", php_dir_functions, php3_minit_dir, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES + "PHP_dir", php_dir_functions, PHP_MINIT(dir), NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; -int php3_minit_dir(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(dir) { zend_class_entry dir_class_entry; Index: php4/ext/standard/dl.c diff -u php4/ext/standard/dl.c:1.6 php4/ext/standard/dl.c:1.7 --- php4/ext/standard/dl.c:1.6 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/dl.c Mon Jul 26 16:09:08 1999 @@ -47,7 +47,7 @@ php3_module_entry dl_module_entry = { - "PHP_DL", dl_functions, NULL, NULL, NULL, NULL, php3_info_dl, STANDARD_MODULE_PROPERTIES + "PHP_DL", dl_functions, NULL, NULL, NULL, NULL, PHP_MINFO(dl), STANDARD_MODULE_PROPERTIES }; #endif @@ -150,7 +150,7 @@ } -void php3_info_dl(ZEND_MODULE_INFO_FUNC_ARGS) +PHP_MINFO_FUNCTION(dl) { PUTS("Dynamic Library support enabled.\n"); } Index: php4/ext/standard/dl.h diff -u php4/ext/standard/dl.h:1.4 php4/ext/standard/dl.h:1.5 --- php4/ext/standard/dl.h:1.4 Sun May 16 07:19:25 1999 +++ php4/ext/standard/dl.h Mon Jul 26 16:09:08 1999 @@ -30,7 +30,7 @@ */ -/* $Id: dl.h,v 1.4 1999/05/16 11:19:25 sas Exp $ */ +/* $Id: dl.h,v 1.5 1999/07/26 20:09:08 andrey Exp $ */ #ifndef _DL_H #define _DL_H @@ -45,10 +45,10 @@ /* dynamic loading functions */ void dl(INTERNAL_FUNCTION_PARAMETERS); -extern int php3_minit_dl(INIT_FUNC_ARGS); -extern int php3_mshutdown_dl(SHUTDOWN_FUNC_ARGS); -extern int php3_rshutdown_dl(SHUTDOWN_FUNC_ARGS); -void php3_info_dl(ZEND_MODULE_INFO_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(dl); +extern PHP_MSHUTDOWN_FUNCTION(dl); +extern PHP_RSHUTDOWN_FUNCTION(dl); +PHP_MINFO_FUNCTION(dl); #else Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.22 php4/ext/standard/file.c:1.23 --- php4/ext/standard/file.c:1.22 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/file.c Mon Jul 26 16:09:08 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.22 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: file.c,v 1.23 1999/07/26 20:09:08 andrey Exp $ */ /* Synced with php3 revision 1.218 1999-06-16 [ssb] */ @@ -215,7 +215,7 @@ php3_module_entry php3_file_module_entry = { "File functions", php3_file_functions, - php3_minit_file, + PHP_MINIT(file), NULL, NULL, NULL, @@ -495,7 +495,7 @@ (void)fclose(fp); } -int php3_minit_file(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(file) { le_fp = register_list_destructors(php3i_destructor_fclose, NULL); le_pp = register_list_destructors(__pclose, NULL); Index: php4/ext/standard/file.h diff -u php4/ext/standard/file.h:1.8 php4/ext/standard/file.h:1.9 --- php4/ext/standard/file.h:1.8 Wed Jun 16 13:06:52 1999 +++ php4/ext/standard/file.h Mon Jul 26 16:09:08 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.h,v 1.8 1999/06/16 17:06:52 ssb Exp $ */ +/* $Id: file.h,v 1.9 1999/07/26 20:09:08 andrey Exp $ */ /* Synced with php3 revision 1.30 1999-06-16 [ssb] */ @@ -37,7 +37,8 @@ extern php3_module_entry php3_file_module_entry; #define php3_file_module_ptr &php3_file_module_entry -extern int php3_minit_file(INIT_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(file); + PHP_FUNCTION(tempnam); PHP_FUNCTION(fopen); PHP_FUNCTION(fclose); Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.8 php4/ext/standard/filestat.c:1.9 --- php4/ext/standard/filestat.c:1.8 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/filestat.c Mon Jul 26 16:09:08 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.8 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: filestat.c,v 1.9 1999/07/26 20:09:08 andrey Exp $ */ #include "php.h" #include "safe_mode.h" @@ -84,7 +84,7 @@ #endif -int php3_init_filestat(INIT_FUNC_ARGS) +PHP_RINIT_FUNCTION(filestat) { CurrentStatFile=NULL; CurrentStatLength=0; @@ -92,7 +92,7 @@ } -int php3_shutdown_filestat(SHUTDOWN_FUNC_ARGS) +PHP_RSHUTDOWN_FUNCTION(filestat) { if (CurrentStatFile) { efree (CurrentStatFile); @@ -433,24 +433,24 @@ _php3_stat(filename->value.str.val, funcnum, return_value); \ } -FileFunction(php3_fileperms,0) -FileFunction(php3_fileinode,1) -FileFunction(php3_filesize, 2) -FileFunction(php3_fileowner,3) -FileFunction(php3_filegroup,4) -FileFunction(php3_fileatime,5) -FileFunction(php3_filemtime,6) -FileFunction(php3_filectime,7) -FileFunction(php3_filetype, 8) -FileFunction(php3_is_writable, 9) -FileFunction(php3_is_readable,10) -FileFunction(php3_is_executable,11) -FileFunction(php3_is_file,12) -FileFunction(php3_is_dir,13) -FileFunction(php3_is_link,14) -FileFunction(php3_file_exists,15) -FileFunction(php3_lstat,16) -FileFunction(php3_stat,17) +FileFunction(PHP_FN(fileperms),0) +FileFunction(PHP_FN(fileinode),1) +FileFunction(PHP_FN(filesize), 2) +FileFunction(PHP_FN(fileowner),3) +FileFunction(PHP_FN(filegroup),4) +FileFunction(PHP_FN(fileatime),5) +FileFunction(PHP_FN(filemtime),6) +FileFunction(PHP_FN(filectime),7) +FileFunction(PHP_FN(filetype), 8) +FileFunction(PHP_FN(is_writable), 9) +FileFunction(PHP_FN(is_readable),10) +FileFunction(PHP_FN(is_executable),11) +FileFunction(PHP_FN(is_file),12) +FileFunction(PHP_FN(is_dir),13) +FileFunction(PHP_FN(is_link),14) +FileFunction(PHP_FN(file_exists),15) +FileFunction(PHP_FN(lstat),16) +FileFunction(PHP_FN(stat),17) function_entry php3_filestat_functions[] = { PHP_FE(fileatime, NULL) @@ -481,7 +481,8 @@ php3_module_entry php3_filestat_module_entry = { - "PHP_filestat", php3_filestat_functions, NULL, NULL, php3_init_filestat, php3_shutdown_filestat, NULL, STANDARD_MODULE_PROPERTIES + "PHP_filestat", php3_filestat_functions, NULL, NULL, PHP_RINIT(filestat), + PHP_RSHUTDOWN(filestat), NULL, STANDARD_MODULE_PROPERTIES }; /* Index: php4/ext/standard/fsock.c diff -u php4/ext/standard/fsock.c:1.18 php4/ext/standard/fsock.c:1.19 --- php4/ext/standard/fsock.c:1.18 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/fsock.c Mon Jul 26 16:09:08 1999 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.18 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: fsock.c,v 1.19 1999/07/26 20:09:08 andrey Exp $ */ /* Synced with php3 revision 1.121 1999-06-18 [ssb] */ /* Synced with php3 revision 1.133 1999-07-21 [sas] */ @@ -109,10 +109,10 @@ php3_module_entry fsock_module_entry = { "Socket functions", fsock_functions, - php3_minit_fsock, - php3_mshutdown_fsock, + PHP_MINIT(fsock), + PHP_MSHUTDOWN(fsock), NULL, - php3_rshutdown_fsock, + PHP_RSHUTDOWN(fsock), NULL, STANDARD_MODULE_PROPERTIES }; @@ -701,7 +701,7 @@ /* }}} */ /* {{{ php3_minit_fsock */ -int php3_minit_fsock(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(fsock) { #ifndef ZTS _php3_hash_init(&PG(ht_fsock_keys), 0, NULL, NULL, 1); @@ -712,7 +712,7 @@ /* }}} */ /* {{{ php3_mshutdown_fsock */ -int php3_mshutdown_fsock(SHUTDOWN_FUNC_ARGS) +PHP_MSHUTDOWN_FUNCTION(fsock) { #ifndef ZTS _php3_hash_destroy(&PG(ht_fsock_socks)); @@ -724,7 +724,7 @@ /* }}} */ /* {{{ php3_rshutdown_fsock() */ -int php3_rshutdown_fsock(SHUTDOWN_FUNC_ARGS) +PHP_RSHUTDOWN_FUNCTION(fsock) { php_cleanup_sockbuf(0); return SUCCESS; Index: php4/ext/standard/fsock.h diff -u php4/ext/standard/fsock.h:1.11 php4/ext/standard/fsock.h:1.12 --- php4/ext/standard/fsock.h:1.11 Sat Jun 26 14:01:21 1999 +++ php4/ext/standard/fsock.h Mon Jul 26 16:09:08 1999 @@ -27,7 +27,7 @@ | Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: fsock.h,v 1.11 1999/06/26 18:01:21 zeev Exp $ */ +/* $Id: fsock.h,v 1.12 1999/07/26 20:09:08 andrey Exp $ */ /* Synced with php3 revision 1.24 1999-06-18 [ssb] */ @@ -72,8 +72,8 @@ PHPAPI int connect_nonb(int sockfd, struct sockaddr *addr, int addrlen, struct timeval *timeout); -int php3_minit_fsock(INIT_FUNC_ARGS); -int php3_mshutdown_fsock(SHUTDOWN_FUNC_ARGS); -int php3_rshutdown_fsock(SHUTDOWN_FUNC_ARGS); +PHP_MINIT_FUNCTION(fsock); +PHP_MSHUTDOWN_FUNCTION(fsock); +PHP_RSHUTDOWN_FUNCTION(fsock); #endif /* _FSOCK_H */ Index: php4/ext/standard/head.c diff -u php4/ext/standard/head.c:1.16 php4/ext/standard/head.c:1.17 --- php4/ext/standard/head.c:1.16 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/head.c Mon Jul 26 16:09:08 1999 @@ -15,7 +15,7 @@ | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: head.c,v 1.16 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: head.c,v 1.17 1999/07/26 20:09:08 andrey Exp $ */ #include <stdio.h> #include "php.h" @@ -47,7 +47,7 @@ void php3_PushCookieList(char *, char *, time_t, char *, char *, int); CookieList *php3_PopCookieList(void); -int php3_init_head(INIT_FUNC_ARGS) +PHP_RINIT_FUNCTION(head) { php3_HeaderPrinted = 0; if (header_called == 0) @@ -574,7 +574,7 @@ php3_module_entry php3_header_module_entry = { - "PHP_head", php3_header_functions, NULL, NULL, php3_init_head, NULL, NULL, STANDARD_MODULE_PROPERTIES + "PHP_head", php3_header_functions, NULL, NULL, PHP_RINIT(head), NULL, NULL, STANDARD_MODULE_PROPERTIES }; /* Index: php4/ext/standard/head.h diff -u php4/ext/standard/head.h:1.8 php4/ext/standard/head.h:1.9 --- php4/ext/standard/head.h:1.8 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/head.h Mon Jul 26 16:09:08 1999 @@ -52,7 +52,7 @@ extern php3_module_entry php3_header_module_entry; #define php3_header_module_ptr &php3_header_module_entry -extern int php3_init_head(INIT_FUNC_ARGS); +extern PHP_RINIT_FUNCTION(head); PHP_FUNCTION(Header); PHP_FUNCTION(setcookie); PHP_FUNCTION(headers_sent); Index: php4/ext/standard/mail.c diff -u php4/ext/standard/mail.c:1.7 php4/ext/standard/mail.c:1.8 --- php4/ext/standard/mail.c:1.7 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/mail.c Mon Jul 26 16:09:08 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c,v 1.7 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: mail.c,v 1.8 1999/07/26 20:09:08 andrey Exp $ */ #include <stdlib.h> #include <ctype.h> @@ -45,7 +45,7 @@ }; php3_module_entry mail_module_entry = { - "Sendmail", mail_functions, NULL, NULL, NULL, NULL, php3_info_mail, STANDARD_MODULE_PROPERTIES + "Sendmail", mail_functions, NULL, NULL, NULL, NULL, PHP_MINFO(mail), STANDARD_MODULE_PROPERTIES }; @@ -148,7 +148,7 @@ return 1; } -void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS) +PHP_MINFO_FUNCTION(mail) { #if MSVC5 PUTS("Internal Sendmail support for Windows 4"); @@ -160,7 +160,7 @@ #else PHP_FUNCTION(mail) {} -void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS) {} +PHP_MINFO_FUNCTION(mail) {} #endif Index: php4/ext/standard/pack.c diff -u php4/ext/standard/pack.c:1.7 php4/ext/standard/pack.c:1.8 --- php4/ext/standard/pack.c:1.7 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/pack.c Mon Jul 26 16:09:08 1999 @@ -15,7 +15,7 @@ | Authors: Chris Schneider <cschneid@relog.ch> | +----------------------------------------------------------------------+ */ -/* $Id: pack.c,v 1.7 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: pack.c,v 1.8 1999/07/26 20:09:08 andrey Exp $ */ #include "php.h" @@ -57,7 +57,7 @@ }; php3_module_entry pack_module_entry = { - "PHP_pack", pack_functions, php3_minit_pack, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES + "PHP_pack", pack_functions, PHP_MINIT(pack), NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; /* Whether machine is little endian */ @@ -794,7 +794,7 @@ /* }}} */ -int php3_minit_pack(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(pack) { int machine_endian_check = 1; int i; Index: php4/ext/standard/pack.h diff -u php4/ext/standard/pack.h:1.3 php4/ext/standard/pack.h:1.4 --- php4/ext/standard/pack.h:1.3 Sun May 16 07:19:26 1999 +++ php4/ext/standard/pack.h Mon Jul 26 16:09:08 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pack.h,v 1.3 1999/05/16 11:19:26 sas Exp $ */ +/* $Id: pack.h,v 1.4 1999/07/26 20:09:08 andrey Exp $ */ #ifndef _PACK_H #define _PACK_H @@ -35,7 +35,7 @@ extern php3_module_entry pack_module_entry; #define pack_module_ptr &pack_module_entry -extern int php3_minit_pack(INIT_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(pack); PHP_FUNCTION(pack); PHP_FUNCTION(unpack); Index: php4/ext/standard/php3_browscap.h diff -u php4/ext/standard/php3_browscap.h:1.3 php4/ext/standard/php3_browscap.h:1.4 --- php4/ext/standard/php3_browscap.h:1.3 Sun May 16 07:19:26 1999 +++ php4/ext/standard/php3_browscap.h Mon Jul 26 16:09:08 1999 @@ -34,8 +34,8 @@ extern php3_module_entry browscap_module_entry; #define browscap_module_ptr &browscap_module_entry -extern int php3_minit_browscap(INIT_FUNC_ARGS); -extern int php3_mshutdown_browscap(SHUTDOWN_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(browscap); +extern PHP_MSHUTDOWN_FUNCTION(browscap); PHP_FUNCTION(get_browser); Index: php4/ext/standard/php3_crypt.h diff -u php4/ext/standard/php3_crypt.h:1.3 php4/ext/standard/php3_crypt.h:1.4 --- php4/ext/standard/php3_crypt.h:1.3 Sun May 16 07:19:26 1999 +++ php4/ext/standard/php3_crypt.h Mon Jul 26 16:09:08 1999 @@ -5,7 +5,7 @@ extern php3_module_entry crypt_module_entry; #define crypt_module_ptr &crypt_module_entry PHP_FUNCTION(crypt); -extern int php_minit_crypt(INIT_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(crypt); #else #define crypt_module_ptr NULL #endif Index: php4/ext/standard/php3_dir.h diff -u php4/ext/standard/php3_dir.h:1.3 php4/ext/standard/php3_dir.h:1.4 --- php4/ext/standard/php3_dir.h:1.3 Sun May 16 07:19:26 1999 +++ php4/ext/standard/php3_dir.h Mon Jul 26 16:09:08 1999 @@ -29,7 +29,7 @@ */ -/* $Id: php3_dir.h,v 1.3 1999/05/16 11:19:26 sas Exp $ */ +/* $Id: php3_dir.h,v 1.4 1999/07/26 20:09:08 andrey Exp $ */ #ifndef _PHP3_DIR_H #define _PHP3_DIR_H @@ -37,7 +37,7 @@ #define php3_dir_module_ptr &php3_dir_module_entry /* directory functions */ -extern int php3_minit_dir(INIT_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(dir); PHP_FUNCTION(opendir); PHP_FUNCTION(closedir); PHP_FUNCTION(chdir); Index: php4/ext/standard/php3_filestat.h diff -u php4/ext/standard/php3_filestat.h:1.4 php4/ext/standard/php3_filestat.h:1.5 --- php4/ext/standard/php3_filestat.h:1.4 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/php3_filestat.h Mon Jul 26 16:09:08 1999 @@ -27,13 +27,14 @@ +----------------------------------------------------------------------+ */ -/* $Id: php3_filestat.h,v 1.4 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: php3_filestat.h,v 1.5 1999/07/26 20:09:08 andrey Exp $ */ #ifndef _FILESTAT_H #define _FILESTAT_H -extern int php3_init_filestat(INIT_FUNC_ARGS); -extern int php3_shutdown_filestat(SHUTDOWN_FUNC_ARGS); +PHP_RINIT_FUNCTION(filestat); +PHP_RSHUTDOWN_FUNCTION(filestat); + PHP_FUNCTION(clearstatcache); PHP_FUNCTION(fileatime); PHP_FUNCTION(filectime); Index: php4/ext/standard/php3_mail.h diff -u php4/ext/standard/php3_mail.h:1.4 php4/ext/standard/php3_mail.h:1.5 --- php4/ext/standard/php3_mail.h:1.4 Sun May 16 07:19:26 1999 +++ php4/ext/standard/php3_mail.h Mon Jul 26 16:09:08 1999 @@ -28,7 +28,7 @@ */ -/* $Id: php3_mail.h,v 1.4 1999/05/16 11:19:26 sas Exp $ */ +/* $Id: php3_mail.h,v 1.5 1999/07/26 20:09:08 andrey Exp $ */ #ifndef _MAIL_H #define _MAIL_H @@ -37,7 +37,7 @@ #define mail_module_ptr &mail_module_entry PHP_FUNCTION(mail); -void php3_info_mail(ZEND_MODULE_INFO_FUNC_ARGS); +PHP_MINFO_FUNCTION(mail); extern int _php3_mail(char *to, char *subject, char *message, char *headers); #else Index: php4/ext/standard/php3_syslog.h diff -u php4/ext/standard/php3_syslog.h:1.3 php4/ext/standard/php3_syslog.h:1.4 --- php4/ext/standard/php3_syslog.h:1.3 Sun May 16 07:19:26 1999 +++ php4/ext/standard/php3_syslog.h Mon Jul 26 16:09:08 1999 @@ -35,9 +35,10 @@ extern php3_module_entry syslog_module_entry; #define syslog_module_ptr &syslog_module_entry -extern int php3_minit_syslog(INIT_FUNC_ARGS); -extern int php3_rinit_syslog(INIT_FUNC_ARGS); -extern int php3_rshutdown_syslog(SHUTDOWN_FUNC_ARGS); +extern PHP_MINIT_FUNCTION(syslog); +extern PHP_RINIT_FUNCTION(syslog); +extern PHP_RSHUTDOWN_FUNCTION(syslog); + PHP_FUNCTION(openlog); PHP_FUNCTION(syslog); PHP_FUNCTION(closelog); Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.18 php4/ext/standard/reg.c:1.19 --- php4/ext/standard/reg.c:1.18 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/reg.c Mon Jul 26 16:09:08 1999 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.18 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: reg.c,v 1.19 1999/07/26 20:09:08 andrey Exp $ */ #include <stdio.h> #include "php.h" @@ -39,15 +39,15 @@ }; -static int php_minit_regex(INIT_FUNC_ARGS); -static int php_mshutdown_regex(SHUTDOWN_FUNC_ARGS); -static void php_info_regex(ZEND_MODULE_INFO_FUNC_ARGS); +static PHP_MINIT_FUNCTION(regex); +static PHP_MSHUTDOWN_FUNCTION(regex); +static PHP_MINFO_FUNCTION(regex); zend_module_entry regexp_module_entry = { "Regular Expressions", reg_functions, - php_minit_regex, php_mshutdown_regex, - NULL, NULL, php_info_regex, + PHP_MINIT(regex), PHP_MSHUTDOWN(regex), + NULL, NULL, PHP_MINFO(regex), STANDARD_MODULE_PROPERTIES }; @@ -101,7 +101,7 @@ _php3_hash_init(&reg_globals->ht_rc, 0, NULL, (int (*)(void *)) _free_reg_cache, 1); } -static int php_minit_regex(INIT_FUNC_ARGS) +static PHP_MINIT_FUNCTION(regex) { #ifdef ZTS reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), php_reg_init_globals, NULL); @@ -112,7 +112,7 @@ return SUCCESS; } -static int php_mshutdown_regex(SHUTDOWN_FUNC_ARGS) +static PHP_MSHUTDOWN_FUNCTION(regex) { REGLS_FETCH(); @@ -120,7 +120,7 @@ return SUCCESS; } -static void php_info_regex(ZEND_MODULE_INFO_FUNC_ARGS) +static PHP_MINFO_FUNCTION(regex) { #if HSREGEX PUTS("Bundled regex library enabled\n"); Index: php4/ext/standard/syslog.c diff -u php4/ext/standard/syslog.c:1.6 php4/ext/standard/syslog.c:1.7 --- php4/ext/standard/syslog.c:1.6 Sat Jul 24 18:16:54 1999 +++ php4/ext/standard/syslog.c Mon Jul 26 16:09:08 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: syslog.c,v 1.6 1999/07/24 22:16:54 andrey Exp $ */ +/* $Id: syslog.c,v 1.7 1999/07/26 20:09:08 andrey Exp $ */ #include "php.h" #include "php_ini.h" @@ -42,7 +42,7 @@ static char *syslog_device; static void start_syslog(void); -int php3_minit_syslog(INIT_FUNC_ARGS) +PHP_MINIT_FUNCTION(syslog) { ELS_FETCH(); @@ -104,7 +104,7 @@ } -int php3_rinit_syslog(INIT_FUNC_ARGS) +PHP_RINIT_FUNCTION(syslog) { if (INI_INT("define_syslog_variables")) { start_syslog(); @@ -116,7 +116,7 @@ } -int php3_rshutdown_syslog(SHUTDOWN_FUNC_ARGS) +PHP_RSHUTDOWN_FUNCTION(syslog) { if (syslog_device) { efree(syslog_device); @@ -266,7 +266,7 @@ php3_module_entry syslog_module_entry = { - "Syslog", syslog_functions, php3_minit_syslog, NULL, php3_rinit_syslog, php3_rshutdown_syslog, NULL, STANDARD_MODULE_PROPERTIES + "Syslog", syslog_functions, PHP_MINIT(syslog), NULL, PHP_RINIT(syslog), PHP_RSHUTDOWN(syslog), NULL, STANDARD_MODULE_PROPERTIES };

« previous php.version4 (#2808) next »