Skip to content

Commit 6892520

Browse files
committed
* zend_module_entry change: apino, debug and zts are moved first,
see README.EXTENSIONS file for upgrade help. @introduced extension version numbers (Stig)
1 parent 4051420 commit 6892520

File tree

97 files changed

+392
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+392
-72
lines changed

README.EXTENSIONS

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
2+
that broke both source and binary compatibility. If you are
3+
maintaining a third party extension, here's how to update it:
4+
5+
If this was your old module entry:
6+
7+
zend_module_entry foo_module_entry = {
8+
"foo", /* extension name */
9+
foo_functions, /* extension function list */
10+
NULL, /* extension-wide startup function */
11+
NULL, /* extension-wide shutdown function */
12+
PHP_RINIT(foo), /* per-request startup function */
13+
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
14+
PHP_MINFO(foo), /* information function */
15+
STANDARD_MODULE_PROPERTIES
16+
};
17+
18+
Here's how it should look if you want your code to build with PHP
19+
4.1.0 and up:
20+
21+
zend_module_entry foo_module_entry = {
22+
#if ZEND_MODULE_API_NO >= 20010901
23+
STANDARD_MODULE_HEADER,
24+
#endif
25+
"foo", /* extension name */
26+
foo_functions, /* extension function list */
27+
NULL, /* extension-wide startup function */
28+
NULL, /* extension-wide shutdown function */
29+
PHP_RINIT(foo), /* per-request startup function */
30+
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
31+
PHP_MINFO(foo), /* information function */
32+
#if ZEND_MODULE_API_NO >= 20010901
33+
FOO_VERSION, /* extension version number (string) */
34+
#endif
35+
STANDARD_MODULE_PROPERTIES
36+
};
37+
38+
If you don't care about source compatibility with earlier PHP releases
39+
than 4.1.0, you can drop the #if/#endif lines.

ext/aspell/aspell.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ function_entry aspell_functions[] = {
5151
static int le_aspell;
5252

5353
zend_module_entry aspell_module_entry = {
54-
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), STANDARD_MODULE_PROPERTIES
54+
STANDARD_MODULE_HEADER,
55+
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
5556
};
5657

5758
#ifdef COMPILE_DL_ASPELL

ext/bcmath/bcmath.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ function_entry bcmath_functions[] = {
4444
};
4545

4646
zend_module_entry bcmath_module_entry = {
47+
STANDARD_MODULE_HEADER,
4748
"bcmath",
48-
bcmath_functions,
49+
bcmath_functions,
4950
PHP_MINIT(bcmath),
5051
PHP_MSHUTDOWN(bcmath),
5152
PHP_RINIT(bcmath),
5253
NULL,
5354
PHP_MINFO(bcmath),
55+
NO_VERSION_YET,
5456
STANDARD_MODULE_PROPERTIES
5557
};
5658

ext/calendar/calendar.c

+2
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@ function_entry calendar_functions[] = {
5757

5858

5959
zend_module_entry calendar_module_entry = {
60+
STANDARD_MODULE_HEADER,
6061
"calendar",
6162
calendar_functions,
6263
PHP_MINIT(calendar),
6364
NULL,
6465
NULL,
6566
NULL,
6667
PHP_MINFO(calendar),
68+
NO_VERSION_YET,
6769
STANDARD_MODULE_PROPERTIES,
6870
};
6971

ext/ccvs/ccvs.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,17 @@ static char const cvsid[] = "$Id$";
9797

9898
/* Declare our module to the Zend engine */
9999
zend_module_entry ccvs_module_entry = {
100+
STANDARD_MODULE_HEADER,
100101
"CCVS",
101102
ccvs_functions,
102103
NULL, NULL, NULL, NULL,
103104
PHP_MINFO(ccvs),
105+
NO_VERSION_YET,
104106
STANDARD_MODULE_PROPERTIES
105107
};
106108

107-
#ifdef COMPILE_DL_LDAP
108-
ZEND_GET_MODULE(ldap)
109+
#ifdef COMPILE_DL_CCVS
110+
ZEND_GET_MODULE(ccvs)
109111
#endif
110112

111113
/* Full Functions (The actual CCVS functions and any internal php hooked functions such as MINFO) */

ext/com/COM.c

+18-1
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,16 @@ PHP_MSHUTDOWN_FUNCTION(COM)
18101810
/* exports for external object creation */
18111811

18121812
zend_module_entry COM_module_entry = {
1813-
"com", COM_functions, PHP_MINIT(COM), PHP_MSHUTDOWN(COM), NULL, NULL, PHP_MINFO(COM), STANDARD_MODULE_PROPERTIES
1813+
STANDARD_MODULE_HEADER,
1814+
"com",
1815+
COM_functions,
1816+
PHP_MINIT(COM),
1817+
PHP_MSHUTDOWN(COM),
1818+
NULL,
1819+
NULL,
1820+
PHP_MINFO(COM),
1821+
NO_VERSION_YET,
1822+
STANDARD_MODULE_PROPERTIES
18141823
};
18151824

18161825
PHPAPI int php_COM_get_le_comval()
@@ -1819,3 +1828,11 @@ PHPAPI int php_COM_get_le_comval()
18191828
}
18201829

18211830
#endif
1831+
1832+
/*
1833+
* Local variables:
1834+
* tab-width: 4
1835+
* c-basic-offset: 4
1836+
* indent-tabs-mode: t
1837+
* End:
1838+
*/

ext/cpdf/cpdf.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,16 @@ function_entry cpdf_functions[] = {
155155
};
156156

157157
zend_module_entry cpdf_module_entry = {
158-
"cpdf", cpdf_functions, PHP_MINIT(cpdf), PHP_MSHUTDOWN(cpdf), PHP_RINIT(cpdf), NULL, PHP_MINFO(cpdf), STANDARD_MODULE_PROPERTIES
158+
STANDARD_MODULE_HEADER,
159+
"cpdf",
160+
cpdf_functions,
161+
PHP_MINIT(cpdf),
162+
PHP_MSHUTDOWN(cpdf),
163+
PHP_RINIT(cpdf),
164+
NULL,
165+
PHP_MINFO(cpdf),
166+
NO_VERSION_YET,
167+
STANDARD_MODULE_PROPERTIES
159168
};
160169

161170
#ifdef COMPILE_DL_CPDF

ext/crack/crack.c

+2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ function_entry crack_functions[] = {
4343
};
4444

4545
zend_module_entry crack_module_entry = {
46+
STANDARD_MODULE_HEADER,
4647
"crack",
4748
crack_functions,
4849
ZEND_MODULE_STARTUP_N(crack),
4950
ZEND_MODULE_SHUTDOWN_N(crack),
5051
ZEND_MODULE_ACTIVATE_N(crack),
5152
ZEND_MODULE_DEACTIVATE_N(crack),
5253
ZEND_MODULE_INFO_N(crack),
54+
NO_VERSION_YET,
5355
STANDARD_MODULE_PROPERTIES
5456
};
5557

ext/ctype/ctype.c

+2
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ function_entry ctype_functions[] = {
6262
/* {{{ ctype_mpodule_entry
6363
*/
6464
zend_module_entry ctype_module_entry = {
65+
STANDARD_MODULE_HEADER,
6566
"ctype",
6667
ctype_functions,
6768
NULL,
6869
NULL,
6970
NULL,
7071
NULL,
7172
PHP_MINFO(ctype),
73+
NO_VERSION_YET,
7274
STANDARD_MODULE_PROPERTIES
7375
};
7476
/* }}} */

ext/curl/curl.c

+2
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ function_entry curl_functions[] = {
6969
/* {{{ curl_module_entry
7070
*/
7171
zend_module_entry curl_module_entry = {
72+
STANDARD_MODULE_HEADER,
7273
"curl",
7374
curl_functions,
7475
PHP_MINIT(curl),
7576
PHP_MSHUTDOWN(curl),
7677
NULL,
7778
NULL,
7879
PHP_MINFO(curl),
80+
NO_VERSION_YET,
7981
STANDARD_MODULE_PROPERTIES
8082
};
8183
/* }}} */

ext/cybercash/cybercash.c

+2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ function_entry cybercash_functions[] = {
4545
/* {{{ cybercash_module_entry
4646
*/
4747
zend_module_entry cybercash_module_entry = {
48+
STANDARD_MODULE_HEADER,
4849
"cybercash",
4950
cybercash_functions,
5051
NULL,
5152
NULL,
5253
NULL,
5354
NULL,
5455
PHP_MINFO(cybercash),
56+
NO_VERSION_YET,
5557
STANDARD_MODULE_PROPERTIES,
5658
};
5759
/* }}} */

ext/cybermut/cybermut.c

+2
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ function_entry cybermut_functions[] = {
4848
/* {{{ cybermut_module_entry
4949
*/
5050
zend_module_entry cybermut_module_entry = {
51+
STANDARD_MODULE_HEADER,
5152
"cybermut",
5253
cybermut_functions,
5354
PHP_MINIT(cybermut),
5455
PHP_MSHUTDOWN(cybermut),
5556
NULL,
5657
NULL,
5758
PHP_MINFO(cybermut),
59+
NO_VERSION_YET,
5860
STANDARD_MODULE_PROPERTIES
5961
};
6062
/* }}} */

ext/cyrus/cyrus.c

+2
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ function_entry cyrus_functions[] = {
4848
};
4949

5050
zend_module_entry cyrus_module_entry = {
51+
STANDARD_MODULE_HEADER,
5152
"cyrus",
5253
cyrus_functions,
5354
PHP_MINIT(cyrus),
5455
NULL,
5556
NULL,
5657
NULL,
5758
PHP_MINFO(cyrus),
59+
NO_VERSION_YET,
5860
STANDARD_MODULE_PROPERTIES
5961
};
6062

ext/db/db.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,16 @@ function_entry dbm_functions[] = {
12341234
/* }}} */
12351235

12361236
zend_module_entry dbm_module_entry = {
1237-
"db", dbm_functions, PHP_MINIT(db), PHP_MSHUTDOWN(db), PHP_RINIT(db), NULL, PHP_MINFO(db), STANDARD_MODULE_PROPERTIES
1237+
STANDARD_MODULE_HEADER,
1238+
"db",
1239+
dbm_functions,
1240+
PHP_MINIT(db),
1241+
PHP_MSHUTDOWN(db),
1242+
PHP_RINIT(db),
1243+
NULL,
1244+
PHP_MINFO(db),
1245+
NO_VERSION_YET,
1246+
STANDARD_MODULE_PROPERTIES
12381247
};
12391248

12401249
#ifdef COMPILE_DL_DB

ext/dba/dba.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ static PHP_MSHUTDOWN_FUNCTION(dba);
6060
static PHP_MINFO_FUNCTION(dba);
6161

6262
zend_module_entry dba_module_entry = {
63-
"dba", dba_functions,
63+
STANDARD_MODULE_HEADER,
64+
"dba",
65+
dba_functions,
6466
PHP_MINIT(dba),
6567
PHP_MSHUTDOWN(dba),
66-
NULL, NULL,
68+
NULL,
69+
NULL,
6770
PHP_MINFO(dba),
71+
NO_VERSION_YET,
6872
STANDARD_MODULE_PROPERTIES
6973
};
7074

ext/dbase/dbase.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,8 @@ function_entry dbase_functions[] = {
787787
/* }}} */
788788

789789
zend_module_entry dbase_module_entry = {
790-
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
790+
STANDARD_MODULE_HEADER,
791+
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
791792
};
792793

793794

ext/dbplus/dbplus.c

+2
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@ function_entry dbplus_functions[] = {
118118
/* {{{ module entry */
119119

120120
zend_module_entry dbplus_module_entry = {
121+
STANDARD_MODULE_HEADER,
121122
"dbplus",
122123
dbplus_functions,
123124
PHP_MINIT(dbplus),
124125
PHP_MSHUTDOWN(dbplus),
125126
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
126127
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
127128
PHP_MINFO(dbplus),
129+
NO_VERSION_YET,
128130
STANDARD_MODULE_PROPERTIES
129131
};
130132

ext/dbx/dbx.c

+2
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,15 @@ function_entry dbx_functions[] = {
148148
};
149149

150150
zend_module_entry dbx_module_entry = {
151+
STANDARD_MODULE_HEADER,
151152
"dbx",
152153
dbx_functions,
153154
ZEND_MINIT(dbx),
154155
ZEND_MSHUTDOWN(dbx),
155156
NULL, /*ZEND_RINIT(dbx), /* Replace with NULL if there's nothing to do at request start */
156157
NULL, /*ZEND_RSHUTDOWN(dbx), /* Replace with NULL if there's nothing to do at request end */
157158
ZEND_MINFO(dbx),
159+
NO_VERSION_YET,
158160
STANDARD_MODULE_PROPERTIES
159161
};
160162

ext/domxml/php_domxml.c

+2
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,15 @@ static zend_function_entry php_domxmlns_class_functions[] = {
267267
};
268268

269269
zend_module_entry domxml_module_entry = {
270+
STANDARD_MODULE_HEADER,
270271
"domxml",
271272
domxml_functions,
272273
PHP_MINIT(domxml),
273274
NULL,
274275
PHP_RINIT(domxml),
275276
NULL,
276277
PHP_MINFO(domxml),
278+
NO_VERSION_YET,
277279
STANDARD_MODULE_PROPERTIES
278280
};
279281

ext/dotnet/dotnet.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ PHP_MSHUTDOWN_FUNCTION(DOTNET)
226226

227227

228228
zend_module_entry dotnet_module_entry = {
229-
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), STANDARD_MODULE_PROPERTIES
229+
STANDARD_MODULE_HEADER,
230+
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
230231
};
231232

232233
BEGIN_EXTERN_C()

ext/exif/exif.c

+2
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ PHP_MINFO_FUNCTION(exif);
131131
/* {{{ exif_module_entry
132132
*/
133133
zend_module_entry exif_module_entry = {
134+
STANDARD_MODULE_HEADER,
134135
"exif",
135136
exif_functions,
136137
NULL, NULL,
137138
NULL, NULL,
138139
PHP_MINFO(exif),
140+
NO_VERSION_YET,
139141
STANDARD_MODULE_PROPERTIES
140142
};
141143
/* }}} */

ext/fbsql/php_fbsql.c

+10-8
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,16 @@ function_entry fbsql_functions[] = {
231231
/* }}} */
232232

233233
zend_module_entry fbsql_module_entry = {
234-
"fbsql",
235-
fbsql_functions,
236-
PHP_MINIT(fbsql),
237-
PHP_MSHUTDOWN(fbsql),
238-
PHP_RINIT(fbsql),
239-
PHP_RSHUTDOWN(fbsql),
240-
PHP_MINFO(fbsql),
241-
STANDARD_MODULE_PROPERTIES
234+
STANDARD_MODULE_HEADER,
235+
"fbsql",
236+
fbsql_functions,
237+
PHP_MINIT(fbsql),
238+
PHP_MSHUTDOWN(fbsql),
239+
PHP_RINIT(fbsql),
240+
PHP_RSHUTDOWN(fbsql),
241+
PHP_MINFO(fbsql),
242+
NO_VERSION_YET,
243+
STANDARD_MODULE_PROPERTIES
242244
};
243245

244246
ZEND_DECLARE_MODULE_GLOBALS(fbsql)

0 commit comments

Comments
 (0)