cleaning up the version macros

This commit is contained in:
Anatol Belski 2015-03-23 20:13:59 +01:00
parent 88b2a2d405
commit ec89c85054
23 changed files with 46 additions and 26 deletions

View File

@ -118,7 +118,7 @@ zend_module_entry bcmath_module_entry = {
NULL,
NULL,
PHP_MINFO(bcmath),
NO_VERSION_YET,
PHP_BCMATH_VERSION,
PHP_MODULE_GLOBALS(bcmath),
PHP_GINIT(bcmath),
PHP_GSHUTDOWN(bcmath),

View File

@ -26,6 +26,9 @@
extern zend_module_entry bcmath_module_entry;
#define phpext_bcmath_ptr &bcmath_module_entry
#include "php_version.h"
#define PHP_BCMATH_VERSION PHP_VERSION
PHP_MINIT_FUNCTION(bcmath);
PHP_MSHUTDOWN_FUNCTION(bcmath);
PHP_MINFO_FUNCTION(bcmath);

View File

@ -120,7 +120,7 @@ zend_module_entry bz2_module_entry = {
NULL,
NULL,
PHP_MINFO(bz2),
NO_VERSION_YET,
PHP_BZ2_VERSION,
STANDARD_MODULE_PROPERTIES
};

View File

@ -47,6 +47,9 @@ extern zend_module_entry bz2_module_entry;
# define PHP_BZ2_API
#endif
#include "php_version.h"
#define PHP_BZ2_VERSION PHP_VERSION
PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC);
PHP_BZ2_API php_stream *_php_stream_bz2open_from_BZFILE(BZFILE *bz, const char *mode, php_stream *innerstream STREAMS_DC);

View File

@ -161,7 +161,7 @@ zend_module_entry calendar_module_entry = {
NULL,
NULL,
PHP_MINFO(calendar),
NO_VERSION_YET,
PHP_CALENDAR_VERSION,
STANDARD_MODULE_PROPERTIES,
};

View File

@ -4,6 +4,9 @@
extern zend_module_entry calendar_module_entry;
#define calendar_module_ptr &calendar_module_entry
#include "php_version.h"
#define PHP_CALENDAR_VERSION PHP_VERSION
/* Functions */
PHP_MINIT_FUNCTION(calendar);

View File

@ -244,7 +244,7 @@ zend_module_entry com_dotnet_module_entry = {
PHP_RINIT(com_dotnet),
PHP_RSHUTDOWN(com_dotnet),
PHP_MINFO(com_dotnet),
"0.1",
PHP_COM_DOTNET_VERSION,
PHP_MODULE_GLOBALS(com_dotnet),
PHP_GINIT(com_dotnet),
NULL,

View File

@ -36,6 +36,9 @@ extern zend_module_entry com_dotnet_module_entry;
# define PHP_COM_DOTNET_API
#endif
#include "php_version.h"
#define PHP_COM_DOTNET_VERSION PHP_VERSION
PHP_MINIT_FUNCTION(com_dotnet);
PHP_MSHUTDOWN_FUNCTION(com_dotnet);
PHP_RINIT_FUNCTION(com_dotnet);

View File

@ -121,7 +121,7 @@ zend_module_entry ctype_module_entry = {
NULL,
NULL,
PHP_MINFO(ctype),
NO_VERSION_YET,
PHP_CTYPE_VERSION,
STANDARD_MODULE_PROPERTIES
};
/* }}} */

View File

@ -19,6 +19,9 @@
#ifndef PHP_CTYPE_H
#define PHP_CTYPE_H
#include "php_version.h"
#define PHP_CTYPE_VERSION PHP_VERSION
#if HAVE_CTYPE
extern zend_module_entry ctype_module_entry;

View File

@ -486,7 +486,7 @@ zend_module_entry curl_module_entry = {
NULL,
NULL,
PHP_MINFO(curl),
NO_VERSION_YET,
PHP_CURL_VERSION,
STANDARD_MODULE_PROPERTIES
};
/* }}} */

View File

@ -42,6 +42,9 @@
# define PHP_CURL_API
#endif
#include "php_version.h"
#define PHP_CURL_VERSION PHP_VERSION
#include <curl/curl.h>
#include <curl/multi.h>

View File

@ -667,7 +667,7 @@ zend_module_entry date_module_entry = {
PHP_RINIT(date), /* request startup */
PHP_RSHUTDOWN(date), /* request shutdown */
PHP_MINFO(date), /* extension info */
PHP_VERSION, /* extension version */
PHP_DATE_VERSION, /* extension version */
PHP_MODULE_GLOBALS(date), /* globals descriptor */
PHP_GINIT(date), /* globals ctor */
NULL, /* globals dtor */

View File

@ -24,6 +24,9 @@
#include "lib/timelib.h"
#include "Zend/zend_hash.h"
#include "php_version.h"
#define PHP_DATE_VERSION PHP_VERSION
extern zend_module_entry date_module_entry;
#define phpext_date_ptr &date_module_entry

View File

@ -178,7 +178,7 @@ zend_module_entry dba_module_entry = {
NULL,
NULL,
PHP_MINFO(dba),
NO_VERSION_YET,
PHP_DBA_VERSION,
PHP_MODULE_GLOBALS(dba),
PHP_GINIT(dba),
NULL,

View File

@ -21,6 +21,9 @@
#ifndef PHP_DBA_H
#define PHP_DBA_H
#include "php_version.h"
#define PHP_DBA_VERSION PHP_VERSION
#if HAVE_DBA
typedef enum {

View File

@ -151,9 +151,7 @@ zend_function_entry enchant_functions[] = {
/* {{{ enchant_module_entry
*/
zend_module_entry enchant_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"enchant",
enchant_functions,
PHP_MINIT(enchant),
@ -161,9 +159,7 @@ zend_module_entry enchant_module_entry = {
NULL, /* Replace with NULL if there's nothing to do at request start */
NULL, /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(enchant),
#if ZEND_MODULE_API_NO >= 20010901
PHP_ENCHANT_VERSION,
#endif
STANDARD_MODULE_PROPERTIES
};
/* }}} */

View File

@ -128,15 +128,13 @@ const zend_function_entry exif_functions[] = {
};
/* }}} */
#define EXIF_VERSION "1.4 $Id$"
/* {{{ PHP_MINFO_FUNCTION
*/
PHP_MINFO_FUNCTION(exif)
{
php_info_print_table_start();
php_info_print_table_row(2, "EXIF Support", "enabled");
php_info_print_table_row(2, "EXIF Version", EXIF_VERSION);
php_info_print_table_row(2, "EXIF Version", PHP_EXIF_VERSION);
php_info_print_table_row(2, "Supported EXIF Version", "0220");
php_info_print_table_row(2, "Supported filetypes", "JPEG,TIFF");
php_info_print_table_end();
@ -265,18 +263,12 @@ zend_module_entry exif_module_entry = {
PHP_MSHUTDOWN(exif),
NULL, NULL,
PHP_MINFO(exif),
#if ZEND_MODULE_API_NO >= 20010901
EXIF_VERSION,
#endif
#if ZEND_MODULE_API_NO >= 20060613
PHP_EXIF_VERSION,
PHP_MODULE_GLOBALS(exif),
PHP_GINIT(exif),
NULL,
NULL,
STANDARD_MODULE_PROPERTIES_EX
#else
STANDARD_MODULE_PROPERTIES
#endif
};
/* }}} */

View File

@ -20,6 +20,10 @@
/* $Id$ */
#if HAVE_EXIF
#include "php_version.h"
#define PHP_EXIF_VERSION "1.4 $Id: 8bdc0c8f27c2c9dd1f7551f1f9fe3ab57a06a4b1 $"
extern zend_module_entry exif_module_entry;
#define phpext_exif_ptr &exif_module_entry

View File

@ -137,9 +137,7 @@ static const zend_function_entry filter_functions[] = {
/* {{{ filter_module_entry
*/
zend_module_entry filter_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"filter",
filter_functions,
PHP_MINIT(filter),
@ -147,7 +145,7 @@ zend_module_entry filter_module_entry = {
NULL,
PHP_RSHUTDOWN(filter),
PHP_MINFO(filter),
"0.11.0",
PHP_FILTER_VERSION,
STANDARD_MODULE_PROPERTIES
};
/* }}} */

View File

@ -38,6 +38,9 @@ extern zend_module_entry filter_module_entry;
#include "TSRM.h"
#endif
#include "php_version.h"
#define PHP_FILTER_VERSION "0.11.0"
PHP_MINIT_FUNCTION(filter);
PHP_MSHUTDOWN_FUNCTION(filter);
PHP_RINIT_FUNCTION(filter);

View File

@ -292,7 +292,7 @@ zend_module_entry php_ftp_module_entry = {
NULL,
NULL,
PHP_MINFO(ftp),
NO_VERSION_YET,
PHP_FTP_VERSION,
STANDARD_MODULE_PROPERTIES
};

View File

@ -27,6 +27,9 @@
extern zend_module_entry php_ftp_module_entry;
#define php_ftp_module_ptr &php_ftp_module_entry
#include "php_version.h"
#define PHP_FTP_VERSION PHP_VERSION
#define PHP_FTP_OPT_TIMEOUT_SEC 0
#define PHP_FTP_OPT_AUTOSEEK 1
#define PHP_FTP_AUTORESUME -1