Skip to content

Commit 663074b

Browse files
committed
cleanup mod version macros and mod defs, round x
1 parent 19360f3 commit 663074b

Some content is hidden

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

51 files changed

+99
-48
lines changed

ext/pgsql/pgsql.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ zend_module_entry pgsql_module_entry = {
762762
PHP_RINIT(pgsql),
763763
PHP_RSHUTDOWN(pgsql),
764764
PHP_MINFO(pgsql),
765-
NO_VERSION_YET,
765+
PHP_PGSQL_VERSION,
766766
PHP_MODULE_GLOBALS(pgsql),
767767
PHP_GINIT(pgsql),
768768
NULL,

ext/pgsql/php_pgsql.h

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
extern zend_module_entry pgsql_module_entry;
3030
#define pgsql_module_ptr &pgsql_module_entry
3131

32+
#include "php_version.h"
33+
#define PHP_PGSQL_VERSION PHP_VERSION
34+
3235
#ifdef PHP_PGSQL_PRIVATE
3336
#undef SOCKET_SIZE_TYPE
3437
#include <libpq-fe.h>

ext/posix/php_posix.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
extern zend_module_entry posix_module_entry;
3535
#define posix_module_ptr &posix_module_entry
3636

37+
#include "php_version.h"
38+
#define PHP_POSIX_VERSION PHP_VERSION
39+
3740
/* POSIX.1, 3.3 */
3841
PHP_FUNCTION(posix_kill);
3942

ext/posix/posix.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ zend_module_entry posix_module_entry = {
360360
NULL,
361361
NULL,
362362
PHP_MINFO(posix),
363-
NO_VERSION_YET,
363+
PHP_POSIX_VERSION,
364364
PHP_MODULE_GLOBALS(posix),
365365
PHP_GINIT(posix),
366366
NULL,

ext/pspell/php_pspell.h

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
#if HAVE_PSPELL
2424
extern zend_module_entry pspell_module_entry;
2525
#define pspell_module_ptr &pspell_module_entry
26+
27+
#include "php_version.h"
28+
#define PHP_PSPELL_VERSION PHP_VERSION
29+
2630
#else
2731
#define pspell_module_ptr NULL
2832
#endif

ext/pspell/pspell.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static int le_pspell, le_pspell_config;
206206

207207
zend_module_entry pspell_module_entry = {
208208
STANDARD_MODULE_HEADER,
209-
"pspell", pspell_functions, PHP_MINIT(pspell), NULL, NULL, NULL, PHP_MINFO(pspell), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
209+
"pspell", pspell_functions, PHP_MINIT(pspell), NULL, NULL, NULL, PHP_MINFO(pspell), PHP_PSPELL_VERSION, STANDARD_MODULE_PROPERTIES
210210
};
211211

212212
#ifdef COMPILE_DL_PSPELL

ext/readline/php_readline.h

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
extern zend_module_entry readline_module_entry;
3030
#define phpext_readline_ptr &readline_module_entry
3131

32+
#include "php_version.h"
33+
#define PHP_READLINE_VERSION PHP_VERSION
34+
3235
#else
3336

3437
#define phpext_readline_ptr NULL

ext/readline/readline.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ zend_module_entry readline_module_entry = {
160160
NULL,
161161
PHP_RSHUTDOWN(readline),
162162
PHP_MINFO(readline),
163-
PHP_VERSION,
163+
PHP_READLINE_VERSION,
164164
STANDARD_MODULE_PROPERTIES
165165
};
166166

ext/recode/php_recode.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry recode_module_entry;
2727
#define phpext_recode_ptr &recode_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_RECODE_VERSION PHP_VERSION
31+
2932
PHP_MINIT_FUNCTION(recode);
3033
PHP_MSHUTDOWN_FUNCTION(recode);
3134
PHP_MINFO_FUNCTION(recode);

ext/recode/recode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ zend_module_entry recode_module_entry = {
9696
NULL,
9797
NULL,
9898
PHP_MINFO(recode),
99-
NO_VERSION_YET,
99+
PHP_RECODE_VERSION,
100100
PHP_MODULE_GLOBALS(recode),
101101
PHP_GINIT(recode),
102102
NULL,

ext/reflection/php_reflection.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6233,7 +6233,7 @@ zend_module_entry reflection_module_entry = { /* {{{ */
62336233
NULL,
62346234
NULL,
62356235
PHP_MINFO(reflection),
6236-
"$Id$",
6236+
PHP_REFLECTION_VERSION,
62376237
STANDARD_MODULE_PROPERTIES
62386238
}; /* }}} */
62396239

ext/reflection/php_reflection.h

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
extern zend_module_entry reflection_module_entry;
2727
#define phpext_reflection_ptr &reflection_module_entry
2828

29+
#define PHP_REFLECTION_VERSION PHP_VERSION
30+
2931
BEGIN_EXTERN_C()
3032

3133
/* Class entry pointers */

ext/session/php_session.h

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
#define PHP_SESSION_API 20150121
3131

32+
#include "php_version.h"
33+
#define PHP_SESSION_VERSION PHP_VERSION
34+
3235
/* save handler macros */
3336
#define PS_NUM_APIS 9
3437
#define PS_OPEN_ARGS void **mod_data, const char *save_path, const char *session_name

ext/session/session.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3015,7 +3015,7 @@ zend_module_entry session_module_entry = {
30153015
PHP_MINIT(session), PHP_MSHUTDOWN(session),
30163016
PHP_RINIT(session), PHP_RSHUTDOWN(session),
30173017
PHP_MINFO(session),
3018-
NO_VERSION_YET,
3018+
PHP_SESSION_VERSION,
30193019
PHP_MODULE_GLOBALS(ps),
30203020
PHP_GINIT(ps),
30213021
NULL,

ext/shmop/php_shmop.h

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
extern zend_module_entry shmop_module_entry;
2525
#define phpext_shmop_ptr &shmop_module_entry
2626

27+
#include "php_version.h"
28+
#define PHP_SHMOP_VERSION PHP_VERSION
29+
2730
PHP_MINIT_FUNCTION(shmop);
2831
PHP_MINFO_FUNCTION(shmop);
2932

ext/shmop/shmop.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ zend_module_entry shmop_module_entry = {
102102
NULL,
103103
NULL,
104104
PHP_MINFO(shmop),
105-
NO_VERSION_YET,
105+
PHP_SHMOP_VERSION,
106106
STANDARD_MODULE_PROPERTIES
107107
};
108108
/* }}} */

ext/simplexml/php_simplexml.h

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
extern zend_module_entry simplexml_module_entry;
2525
#define phpext_simplexml_ptr &simplexml_module_entry
2626

27+
#include "php_version.h"
28+
#define PHP_SIMPLEXML_VERSION PHP_VERSION
29+
2730
#ifdef ZTS
2831
#include "TSRM.h"
2932
#endif

ext/simplexml/simplexml.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2524,7 +2524,7 @@ zend_module_entry simplexml_module_entry = { /* {{{ */
25242524
NULL,
25252525
NULL,
25262526
PHP_MINFO(simplexml),
2527-
"0.1",
2527+
PHP_SIMPLEXML_VERSION,
25282528
STANDARD_MODULE_PROPERTIES
25292529
};
25302530
/* }}} */

ext/snmp/snmp.c

-4
Original file line numberDiff line numberDiff line change
@@ -2470,13 +2470,9 @@ static const zend_module_dep snmp_module_deps[] = {
24702470
/* {{{ snmp_module_entry
24712471
*/
24722472
zend_module_entry snmp_module_entry = {
2473-
#if ZEND_MODULE_API_NO >= 20050922
24742473
STANDARD_MODULE_HEADER_EX,
24752474
NULL,
24762475
snmp_module_deps,
2477-
#else
2478-
STANDARD_MODULE_HEADER,
2479-
#endif
24802476
"snmp",
24812477
snmp_functions,
24822478
PHP_MINIT(snmp),

ext/soap/php_soap.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
#include <libxml/parser.h>
3636
#include <libxml/xpath.h>
3737

38-
#ifndef PHP_HAVE_STREAMS
39-
# error You lose - must be compiled against PHP 4.3.0 or later
40-
#endif
38+
#define PHP_SOAP_VERSION PHP_VERSION
4139

4240
#ifndef PHP_WIN32
4341
# define TRUE 1

ext/soap/soap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ zend_module_entry soap_module_entry = {
460460
NULL,
461461
PHP_MINFO(soap),
462462
#ifdef STANDARD_MODULE_HEADER
463-
NO_VERSION_YET,
463+
PHP_SOAP_VERSION,
464464
#endif
465465
STANDARD_MODULE_PROPERTIES,
466466
};

ext/sockets/php_sockets.h

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
# include "windows_common.h"
3636
#endif
3737

38+
#define PHP_SOCKETS_VERSION PHP_VERSION
39+
3840
extern zend_module_entry sockets_module_entry;
3941
#define phpext_sockets_ptr &sockets_module_entry
4042

ext/sockets/sockets.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ zend_module_entry sockets_module_entry = {
360360
NULL,
361361
PHP_RSHUTDOWN(sockets),
362362
PHP_MINFO(sockets),
363-
NO_VERSION_YET,
363+
PHP_SOCKETS_VERSION,
364364
PHP_MODULE_GLOBALS(sockets),
365365
PHP_GINIT(sockets),
366366
NULL,

ext/spl/php_spl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ zend_module_entry spl_module_entry = {
956956
PHP_RINIT(spl),
957957
PHP_RSHUTDOWN(spl),
958958
PHP_MINFO(spl),
959-
"0.2",
959+
PHP_SPL_VERSION,
960960
PHP_MODULE_GLOBALS(spl),
961961
PHP_GINIT(spl),
962962
NULL,

ext/spl/php_spl.h

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include "php.h"
2323
#include <stdarg.h>
2424

25+
#define PHP_SPL_VERSION PHP_VERSION
26+
2527
#if 0
2628
#define SPL_DEBUG(x) x
2729
#else

ext/standard/basic_functions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3372,7 +3372,7 @@ zend_module_entry basic_functions_module = { /* {{{ */
33723372
PHP_RINIT(basic), /* request startup */
33733373
PHP_RSHUTDOWN(basic), /* request shutdown */
33743374
PHP_MINFO(basic), /* extension info */
3375-
PHP_VERSION, /* extension version */
3375+
PHP_STANDARD_VERSION, /* extension version */
33763376
STANDARD_MODULE_PROPERTIES
33773377
};
33783378
/* }}} */

ext/standard/php_standard.h

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
#include "php_type.h"
6161
#include "php_password.h"
6262

63+
#include "php_version.h"
64+
#define PHP_STANDARD_VERSION PHP_VERSION
65+
6366
#define phpext_standard_ptr basic_functions_module_ptr
6467
PHP_MINIT_FUNCTION(standard_filters);
6568
PHP_MSHUTDOWN_FUNCTION(standard_filters);

ext/sysvmsg/php_sysvmsg.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry sysvmsg_module_entry;
2727
#define phpext_sysvmsg_ptr &sysvmsg_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_SYSVMSG_VERSION PHP_VERSION
31+
2932
#ifndef __USE_GNU
3033
/* we want to use mtype instead of __mtype */
3134
#define __USE_GNU

ext/sysvmsg/sysvmsg.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ zend_module_entry sysvmsg_module_entry = {
110110
NULL,
111111
NULL,
112112
PHP_MINFO(sysvmsg),
113-
NO_VERSION_YET,
113+
PHP_SYSVMSG_VERSION,
114114
STANDARD_MODULE_PROPERTIES
115115
};
116116
/* }}} */

ext/sysvsem/php_sysvsem.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry sysvsem_module_entry;
2727
#define sysvsem_module_ptr &sysvsem_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_SYSVSEM_VERSION PHP_VERSION
31+
2932
PHP_MINIT_FUNCTION(sysvsem);
3033
PHP_FUNCTION(sem_get);
3134
PHP_FUNCTION(sem_acquire);

ext/sysvsem/sysvsem.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ zend_module_entry sysvsem_module_entry = {
100100
NULL,
101101
NULL,
102102
NULL,
103-
NO_VERSION_YET,
103+
PHP_SYSVSEM_VERSION,
104104
STANDARD_MODULE_PROPERTIES
105105
};
106106
/* }}} */

ext/sysvshm/php_sysvshm.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry sysvshm_module_entry;
2727
#define sysvshm_module_ptr &sysvshm_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_SYSVSHM_VERSION PHP_VERSION
31+
2932
#include <sys/types.h>
3033
#include <sys/ipc.h>
3134
#include <sys/shm.h>

ext/sysvshm/sysvshm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ zend_module_entry sysvshm_module_entry = {
101101
NULL,
102102
NULL,
103103
NULL,
104-
NO_VERSION_YET,
104+
PHP_SYSVSHM_VERSION,
105105
STANDARD_MODULE_PROPERTIES
106106
};
107107
/* }}} */

ext/tidy/php_tidy.h

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
extern zend_module_entry tidy_module_entry;
2525
#define phpext_tidy_ptr &tidy_module_entry
2626

27+
#include "php_version.h"
28+
#define PHP_TIDY_VERSION PHP_VERSION
29+
2730
#define TIDY_METHOD_MAP(name, func_name, arg_types) \
2831
ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
2932
#define TIDY_NODE_METHOD(name) PHP_FUNCTION(tnm_ ##name)

ext/tidy/tidy.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
#define TIDY_CALL
3939
#endif
4040

41-
#define PHP_TIDY_MODULE_VERSION "2.0"
42-
4341
/* {{{ ext/tidy macros
4442
*/
4543
#define FIX_BUFFER(bptr) do { if ((bptr)->size) { (bptr)->bp[(bptr)->size-1] = '\0'; } } while(0)
@@ -458,7 +456,7 @@ zend_module_entry tidy_module_entry = {
458456
PHP_RINIT(tidy),
459457
NULL,
460458
PHP_MINFO(tidy),
461-
PHP_TIDY_MODULE_VERSION,
459+
PHP_TIDY_VERSION,
462460
PHP_MODULE_GLOBALS(tidy),
463461
NULL,
464462
NULL,
@@ -1077,7 +1075,7 @@ static PHP_MINFO_FUNCTION(tidy)
10771075
php_info_print_table_start();
10781076
php_info_print_table_header(2, "Tidy support", "enabled");
10791077
php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
1080-
php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id$)");
1078+
php_info_print_table_row(2, "Extension Version", PHP_TIDY_VERSION " ($Id$)");
10811079
php_info_print_table_end();
10821080

10831081
DISPLAY_INI_ENTRIES();

ext/tokenizer/php_tokenizer.h

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
extern zend_module_entry tokenizer_module_entry;
2525
#define phpext_tokenizer_ptr &tokenizer_module_entry
2626

27+
#include "php_version.h"
28+
#define PHP_TOKENIZER_VERSION PHP_VERSION
29+
2730
#ifdef ZTS
2831
#include "TSRM.h"
2932
#endif

ext/tokenizer/tokenizer.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,15 @@ const zend_function_entry tokenizer_functions[] = {
6161
/* {{{ tokenizer_module_entry
6262
*/
6363
zend_module_entry tokenizer_module_entry = {
64-
#if ZEND_MODULE_API_NO >= 20010901
6564
STANDARD_MODULE_HEADER,
66-
#endif
6765
"tokenizer",
6866
tokenizer_functions,
6967
PHP_MINIT(tokenizer),
7068
NULL,
7169
NULL,
7270
NULL,
7371
PHP_MINFO(tokenizer),
74-
#if ZEND_MODULE_API_NO >= 20010901
75-
"0.1", /* Replace with version number for your extension */
76-
#endif
72+
PHP_TOKENIZER_VERSION,
7773
STANDARD_MODULE_PROPERTIES
7874
};
7975
/* }}} */

ext/wddx/php_wddx.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry wddx_module_entry;
2727
#define wddx_module_ptr &wddx_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_WDDX_VERSION PHP_VERSION
31+
2932
PHP_FUNCTION(wddx_serialize_value);
3033
PHP_FUNCTION(wddx_serialize_vars);
3134
PHP_FUNCTION(wddx_packet_start);

0 commit comments

Comments
 (0)