Skip to content

Commit

Permalink
* zend_module_entry change: apino, debug and zts are moved first,
Browse files Browse the repository at this point in the history
  see README.EXTENSIONS file for upgrade help.
@introduced extension version numbers (Stig)
  • Loading branch information
stigsb committed Oct 11, 2001
1 parent 4051420 commit 6892520
Show file tree
Hide file tree
Showing 97 changed files with 392 additions and 72 deletions.
39 changes: 39 additions & 0 deletions README.EXTENSIONS
@@ -0,0 +1,39 @@
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
that broke both source and binary compatibility. If you are
maintaining a third party extension, here's how to update it:

If this was your old module entry:

zend_module_entry foo_module_entry = {
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
STANDARD_MODULE_PROPERTIES
};

Here's how it should look if you want your code to build with PHP
4.1.0 and up:

zend_module_entry foo_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
#if ZEND_MODULE_API_NO >= 20010901
FOO_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};

If you don't care about source compatibility with earlier PHP releases
than 4.1.0, you can drop the #if/#endif lines.
3 changes: 2 additions & 1 deletion ext/aspell/aspell.c
Expand Up @@ -51,7 +51,8 @@ function_entry aspell_functions[] = {
static int le_aspell;

zend_module_entry aspell_module_entry = {
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_ASPELL
Expand Down
4 changes: 3 additions & 1 deletion ext/bcmath/bcmath.c
Expand Up @@ -44,13 +44,15 @@ function_entry bcmath_functions[] = {
};

zend_module_entry bcmath_module_entry = {
STANDARD_MODULE_HEADER,
"bcmath",
bcmath_functions,
bcmath_functions,
PHP_MINIT(bcmath),
PHP_MSHUTDOWN(bcmath),
PHP_RINIT(bcmath),
NULL,
PHP_MINFO(bcmath),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

Expand Down
2 changes: 2 additions & 0 deletions ext/calendar/calendar.c
Expand Up @@ -57,13 +57,15 @@ function_entry calendar_functions[] = {


zend_module_entry calendar_module_entry = {
STANDARD_MODULE_HEADER,
"calendar",
calendar_functions,
PHP_MINIT(calendar),
NULL,
NULL,
NULL,
PHP_MINFO(calendar),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES,
};

Expand Down
6 changes: 4 additions & 2 deletions ext/ccvs/ccvs.c
Expand Up @@ -97,15 +97,17 @@ static char const cvsid[] = "$Id$";

/* Declare our module to the Zend engine */
zend_module_entry ccvs_module_entry = {
STANDARD_MODULE_HEADER,
"CCVS",
ccvs_functions,
NULL, NULL, NULL, NULL,
PHP_MINFO(ccvs),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_LDAP
ZEND_GET_MODULE(ldap)
#ifdef COMPILE_DL_CCVS
ZEND_GET_MODULE(ccvs)
#endif

/* Full Functions (The actual CCVS functions and any internal php hooked functions such as MINFO) */
Expand Down
19 changes: 18 additions & 1 deletion ext/com/COM.c
Expand Up @@ -1810,7 +1810,16 @@ PHP_MSHUTDOWN_FUNCTION(COM)
/* exports for external object creation */

zend_module_entry COM_module_entry = {
"com", COM_functions, PHP_MINIT(COM), PHP_MSHUTDOWN(COM), NULL, NULL, PHP_MINFO(COM), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"com",
COM_functions,
PHP_MINIT(COM),
PHP_MSHUTDOWN(COM),
NULL,
NULL,
PHP_MINFO(COM),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

PHPAPI int php_COM_get_le_comval()
Expand All @@ -1819,3 +1828,11 @@ PHPAPI int php_COM_get_le_comval()
}

#endif

/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*/
11 changes: 10 additions & 1 deletion ext/cpdf/cpdf.c
Expand Up @@ -155,7 +155,16 @@ function_entry cpdf_functions[] = {
};

zend_module_entry cpdf_module_entry = {
"cpdf", cpdf_functions, PHP_MINIT(cpdf), PHP_MSHUTDOWN(cpdf), PHP_RINIT(cpdf), NULL, PHP_MINFO(cpdf), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"cpdf",
cpdf_functions,
PHP_MINIT(cpdf),
PHP_MSHUTDOWN(cpdf),
PHP_RINIT(cpdf),
NULL,
PHP_MINFO(cpdf),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_CPDF
Expand Down
2 changes: 2 additions & 0 deletions ext/crack/crack.c
Expand Up @@ -43,13 +43,15 @@ function_entry crack_functions[] = {
};

zend_module_entry crack_module_entry = {
STANDARD_MODULE_HEADER,
"crack",
crack_functions,
ZEND_MODULE_STARTUP_N(crack),
ZEND_MODULE_SHUTDOWN_N(crack),
ZEND_MODULE_ACTIVATE_N(crack),
ZEND_MODULE_DEACTIVATE_N(crack),
ZEND_MODULE_INFO_N(crack),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

Expand Down
2 changes: 2 additions & 0 deletions ext/ctype/ctype.c
Expand Up @@ -62,13 +62,15 @@ function_entry ctype_functions[] = {
/* {{{ ctype_mpodule_entry
*/
zend_module_entry ctype_module_entry = {
STANDARD_MODULE_HEADER,
"ctype",
ctype_functions,
NULL,
NULL,
NULL,
NULL,
PHP_MINFO(ctype),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
Expand Down
2 changes: 2 additions & 0 deletions ext/curl/curl.c
Expand Up @@ -69,13 +69,15 @@ function_entry curl_functions[] = {
/* {{{ curl_module_entry
*/
zend_module_entry curl_module_entry = {
STANDARD_MODULE_HEADER,
"curl",
curl_functions,
PHP_MINIT(curl),
PHP_MSHUTDOWN(curl),
NULL,
NULL,
PHP_MINFO(curl),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
Expand Down
2 changes: 2 additions & 0 deletions ext/cybercash/cybercash.c
Expand Up @@ -45,13 +45,15 @@ function_entry cybercash_functions[] = {
/* {{{ cybercash_module_entry
*/
zend_module_entry cybercash_module_entry = {
STANDARD_MODULE_HEADER,
"cybercash",
cybercash_functions,
NULL,
NULL,
NULL,
NULL,
PHP_MINFO(cybercash),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES,
};
/* }}} */
Expand Down
2 changes: 2 additions & 0 deletions ext/cybermut/cybermut.c
Expand Up @@ -48,13 +48,15 @@ function_entry cybermut_functions[] = {
/* {{{ cybermut_module_entry
*/
zend_module_entry cybermut_module_entry = {
STANDARD_MODULE_HEADER,
"cybermut",
cybermut_functions,
PHP_MINIT(cybermut),
PHP_MSHUTDOWN(cybermut),
NULL,
NULL,
PHP_MINFO(cybermut),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
Expand Down
2 changes: 2 additions & 0 deletions ext/cyrus/cyrus.c
Expand Up @@ -48,13 +48,15 @@ function_entry cyrus_functions[] = {
};

zend_module_entry cyrus_module_entry = {
STANDARD_MODULE_HEADER,
"cyrus",
cyrus_functions,
PHP_MINIT(cyrus),
NULL,
NULL,
NULL,
PHP_MINFO(cyrus),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

Expand Down
11 changes: 10 additions & 1 deletion ext/db/db.c
Expand Up @@ -1234,7 +1234,16 @@ function_entry dbm_functions[] = {
/* }}} */

zend_module_entry dbm_module_entry = {
"db", dbm_functions, PHP_MINIT(db), PHP_MSHUTDOWN(db), PHP_RINIT(db), NULL, PHP_MINFO(db), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"db",
dbm_functions,
PHP_MINIT(db),
PHP_MSHUTDOWN(db),
PHP_RINIT(db),
NULL,
PHP_MINFO(db),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_DB
Expand Down
8 changes: 6 additions & 2 deletions ext/dba/dba.c
Expand Up @@ -60,11 +60,15 @@ static PHP_MSHUTDOWN_FUNCTION(dba);
static PHP_MINFO_FUNCTION(dba);

zend_module_entry dba_module_entry = {
"dba", dba_functions,
STANDARD_MODULE_HEADER,
"dba",
dba_functions,
PHP_MINIT(dba),
PHP_MSHUTDOWN(dba),
NULL, NULL,
NULL,
NULL,
PHP_MINFO(dba),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

Expand Down
3 changes: 2 additions & 1 deletion ext/dbase/dbase.c
Expand Up @@ -787,7 +787,8 @@ function_entry dbase_functions[] = {
/* }}} */

zend_module_entry dbase_module_entry = {
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};


Expand Down
2 changes: 2 additions & 0 deletions ext/dbplus/dbplus.c
Expand Up @@ -118,13 +118,15 @@ function_entry dbplus_functions[] = {
/* {{{ module entry */

zend_module_entry dbplus_module_entry = {
STANDARD_MODULE_HEADER,
"dbplus",
dbplus_functions,
PHP_MINIT(dbplus),
PHP_MSHUTDOWN(dbplus),
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(dbplus),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

Expand Down
2 changes: 2 additions & 0 deletions ext/dbx/dbx.c
Expand Up @@ -148,13 +148,15 @@ function_entry dbx_functions[] = {
};

zend_module_entry dbx_module_entry = {
STANDARD_MODULE_HEADER,
"dbx",
dbx_functions,
ZEND_MINIT(dbx),
ZEND_MSHUTDOWN(dbx),
NULL, /*ZEND_RINIT(dbx), /* Replace with NULL if there's nothing to do at request start */
NULL, /*ZEND_RSHUTDOWN(dbx), /* Replace with NULL if there's nothing to do at request end */
ZEND_MINFO(dbx),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

Expand Down
2 changes: 2 additions & 0 deletions ext/domxml/php_domxml.c
Expand Up @@ -267,13 +267,15 @@ static zend_function_entry php_domxmlns_class_functions[] = {
};

zend_module_entry domxml_module_entry = {
STANDARD_MODULE_HEADER,
"domxml",
domxml_functions,
PHP_MINIT(domxml),
NULL,
PHP_RINIT(domxml),
NULL,
PHP_MINFO(domxml),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

Expand Down
3 changes: 2 additions & 1 deletion ext/dotnet/dotnet.cpp
Expand Up @@ -226,7 +226,8 @@ PHP_MSHUTDOWN_FUNCTION(DOTNET)


zend_module_entry dotnet_module_entry = {
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};

BEGIN_EXTERN_C()
Expand Down
2 changes: 2 additions & 0 deletions ext/exif/exif.c
Expand Up @@ -131,11 +131,13 @@ PHP_MINFO_FUNCTION(exif);
/* {{{ exif_module_entry
*/
zend_module_entry exif_module_entry = {
STANDARD_MODULE_HEADER,
"exif",
exif_functions,
NULL, NULL,
NULL, NULL,
PHP_MINFO(exif),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
Expand Down
18 changes: 10 additions & 8 deletions ext/fbsql/php_fbsql.c
Expand Up @@ -231,14 +231,16 @@ function_entry fbsql_functions[] = {
/* }}} */

zend_module_entry fbsql_module_entry = {
"fbsql",
fbsql_functions,
PHP_MINIT(fbsql),
PHP_MSHUTDOWN(fbsql),
PHP_RINIT(fbsql),
PHP_RSHUTDOWN(fbsql),
PHP_MINFO(fbsql),
STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"fbsql",
fbsql_functions,
PHP_MINIT(fbsql),
PHP_MSHUTDOWN(fbsql),
PHP_RINIT(fbsql),
PHP_RSHUTDOWN(fbsql),
PHP_MINFO(fbsql),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};

ZEND_DECLARE_MODULE_GLOBALS(fbsql)
Expand Down

0 comments on commit 6892520

Please sign in to comment.