com pecl/networking/uuid: cleanup PHP 4 compat.: config.m4 package.xml php_uuid.h

From: Date: Sun, 05 Apr 2015 09:18:33 +0000
Subject: com pecl/networking/uuid: cleanup PHP 4 compat.: config.m4 package.xml php_uuid.h
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-22025@lists.php.net to get a copy of this message
Commit: 8cc260588e103a50f90eca57c68faeb455d5a0e7 Author: Remi Collet <remi@php.net> Sun, 5 Apr 2015 11:18:33 +0200 Parents: a584eebccef42aa54551290c304258e3e9bb4aa3 Branches: master Link: http://git.php.net/?p=pecl/networking/uuid.git;a=commitdiff;h=8cc260588e103a50f90eca57c68faeb455d5a0e7 Log: cleanup PHP 4 compat. Changed paths: M config.m4 M package.xml M php_uuid.h Diff: diff --git a/config.m4 b/config.m4 index 7e3519a..f62d1a6 100644 --- a/config.m4 +++ b/config.m4 @@ -2,7 +2,7 @@ dnl dnl $ Id: $ dnl -PHP_ARG_WITH(uuid, whether uuid is available,[ --with-uuid[=DIR] With uuid support]) +PHP_ARG_WITH(uuid, whether uuid is available,[ --with-uuid[=DIR] With uuid support]) if test "$PHP_UUID" != "no"; then @@ -30,21 +30,6 @@ if test "$PHP_UUID" != "no"; then PHP_ADD_LIBRARY_WITH_PATH(uuid, $PHP_UUID_DIR/$PHP_LIBDIR, UUID_SHARED_LIBADD) export CPPFLAGS="$OLD_CPPFLAGS" - export OLD_CPPFLAGS="$CPPFLAGS" - export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_UUID" - - AC_MSG_CHECKING(PHP version) - AC_TRY_COMPILE([#include <php_version.h>], [ -#if PHP_VERSION_ID < 40000 -#error this extension requires at least PHP version 4.0.0 -#endif -], -[AC_MSG_RESULT(ok)], -[AC_MSG_ERROR([need at least PHP 4.0.0])]) - - export CPPFLAGS="$OLD_CPPFLAGS" - - PHP_SUBST(UUID_SHARED_LIBADD) AC_DEFINE(HAVE_UUID, 1, [ ]) diff --git a/package.xml b/package.xml index 28dc1d3..8635f8a 100644 --- a/package.xml +++ b/package.xml @@ -72,10 +72,10 @@ http://pear.php.net/dtd/package-2.0.xsd"> <dependencies> <required> <php> - <min>4.0.0</min> + <min>5.3.0</min> </php> <pearinstaller> - <min>1.4.0a1</min> + <min>1.9.0</min> </pearinstaller> <os><name>unix</name></os> </required> diff --git a/php_uuid.h b/php_uuid.h index 628d400..5be75c6 100644 --- a/php_uuid.h +++ b/php_uuid.h @@ -90,99 +90,59 @@ PHP_MINFO_FUNCTION(uuid); PHP_FUNCTION(uuid_create); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_create_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0) ZEND_ARG_INFO(0, uuid_type) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_create_arg_info NULL -#endif PHP_FUNCTION(uuid_is_valid); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_is_valid_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_is_valid_arg_info NULL -#endif PHP_FUNCTION(uuid_compare); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_compare_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 2) ZEND_ARG_INFO(0, uuid1) ZEND_ARG_INFO(0, uuid2) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_compare_arg_info NULL -#endif PHP_FUNCTION(uuid_is_null); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_is_null_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_is_null_arg_info NULL -#endif #if HAVE_UUID_TYPE PHP_FUNCTION(uuid_type); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_type_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_type_arg_info NULL -#endif - #endif /* HAVE_UUID_TYPE */ + #if HAVE_UUID_VARIANT PHP_FUNCTION(uuid_variant); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_variant_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_variant_arg_info NULL -#endif - #endif /* HAVE_UUID_VARIANT */ + PHP_FUNCTION(uuid_time); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_time_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_time_arg_info NULL -#endif PHP_FUNCTION(uuid_mac); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_mac_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_mac_arg_info NULL -#endif PHP_FUNCTION(uuid_parse); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_parse_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_parse_arg_info NULL -#endif PHP_FUNCTION(uuid_unparse); -#if (PHP_MAJOR_VERSION >= 5) ZEND_BEGIN_ARG_INFO_EX(uuid_unparse_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) ZEND_ARG_INFO(0, uuid) ZEND_END_ARG_INFO() -#else /* PHP 4.x */ -#define uuid_unparse_arg_info NULL -#endif #ifdef __cplusplus } // extern "C"

« previous php.pecl.cvs (#22025) next »