cvs: pecl /uuid config.m4 package.xml uuid.c

From: Date: Tue, 25 Mar 2008 22:53:20 +0000
Subject: cvs: pecl /uuid config.m4 package.xml uuid.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-10078@lists.php.net to get a copy of this message
hholzgra Tue Mar 25 22:53:20 2008 UTC Modified files: /pecl/uuid config.m4 package.xml uuid.c Log: - should now work on solaris, too ("make test" will fail though) - converted package.xml to V2.0 format - 1.0.1 release

http://cvs.php.net/viewvc.cgi/pecl/uuid/config.m4?r1=1.2&r2=1.3&diff_format=u Index: pecl/uuid/config.m4 diff -u pecl/uuid/config.m4:1.2 pecl/uuid/config.m4:1.3 --- pecl/uuid/config.m4:1.2 Wed Nov 27 14:32:05 2002 +++ pecl/uuid/config.m4 Tue Mar 25 22:53:20 2008 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.2 2002/11/27 14:32:05 wez Exp $ +dnl $Id: config.m4,v 1.3 2008/03/25 22:53:20 hholzgra Exp $ dnl config.m4 for extension uuid dnl Comments in this file start with the string 'dnl'. @@ -13,6 +13,8 @@ if test "$PHP_UUID" != "no"; then AC_DEFINE(HAVE_UUID, 1, [ ]) PHP_ADD_LIBRARY(uuid, 1, UUID_SHARED_LIBADD) + PHP_CHECK_FUNC_LIB(uuid_type, uuid) + PHP_CHECK_FUNC_LIB(uuid_variant, uuid) PHP_NEW_EXTENSION(uuid, uuid.c, $ext_shared) PHP_SUBST(UUID_SHARED_LIBADD) fi http://cvs.php.net/viewvc.cgi/pecl/uuid/package.xml?r1=1.3&r2=1.4&diff_format=u Index: pecl/uuid/package.xml diff -u pecl/uuid/package.xml:1.3 pecl/uuid/package.xml:1.4 --- pecl/uuid/package.xml:1.3 Sat Mar 27 13:23:02 2004 +++ pecl/uuid/package.xml Tue Mar 25 22:53:20 2008 @@ -1,58 +1,95 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<!DOCTYPE package SYSTEM "../../package.dtd"> -<package> +<?xml version="1.0" encoding="UTF-8"?> +<package packagerversion="1.7.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 +http://pear.php.net/dtd/tasks-1.0.xsd +http://pear.php.net/dtd/package-2.0 +http://pear.php.net/dtd/package-2.0.xsd"> <name>uuid</name> + <channel>pecl.php.net</channel> <summary>UUID support functions</summary> - <description> - This extension provides functions to generate and analyse - universally unique identifiers (UUIDs). It depends on the - external libuuid. This library is available on most linux - systems, its source is bundled with the ext2fs tools. + <description>This extension provides functions to generate and analyse +universally unique identifiers (UUIDs). It depends on the +external libuuid. This library is available on most linux +systems (its source is there bundled with the ext2fs tools) +and on Solaris. </description> - <license>PHP License</license> - - <maintainers> - <maintainer> - <user>hholzgra</user> - <name>Hartmut Holzgraefe</name> - <email>hholzgra@php.net</email> - <role>lead</role> - </maintainer> - </maintainers> - - <release> - <version>1.0</version> - <date>2004-03-27</date> - <state>stable</state> - <notes> - Official 1.0 stable release - </notes> - </release> - - <filelist> - <file role="doc" name="CREDITS"/> - <file role="doc" name="uuid.xml"/> - <file role="src" name="config.m4"/> - <file role="src" name="uuid.c"/> - <file role="src" name="php_uuid.h"/> - <file role="test" name="tests/uuid_mac.phpt"/> - <file role="test" name="tests/uuid_time.phpt"/> - <file role="test" name="tests/uuid_type.phpt"/> - <file role="test" name="tests/uuid_variant.phpt"/> - <file role="test" name="tests/uuid_is_null.phpt"/> - <file role="test" name="tests/uuid_create.phpt"/> - <file role="test" name="tests/uuid_compare.phpt"/> - <file role="test" name="tests/uuid_is_valid.phpt"/> - </filelist> - + <lead> + <name>Hartmut Holzgraefe</name> + <user>hholzgra</user> + <email>hholzgra@php.net</email> + <active>yes</active> + </lead> + <date>2008-03-25</date> + <time>23:51:21</time> + <version> + <release>1.0.1</release> + <api>1.0.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.php.net/license">PHP License</license> + <notes>Now works with Solaris libuuid implementation, too + </notes> + <contents> + <dir name="/"> + <dir name="tests"> + <file name="uuid_compare.phpt" role="test" /> + <file name="uuid_create.phpt" role="test" /> + <file name="uuid_is_null.phpt" role="test" /> + <file name="uuid_is_valid.phpt" role="test" /> + <file name="uuid_mac.phpt" role="test" /> + <file name="uuid_time.phpt" role="test" /> + <file name="uuid_type.phpt" role="test" /> + <file name="uuid_variant.phpt" role="test" /> + </dir> <!-- //tests --> + <file name="config.m4" role="src" /> + <file name="CREDITS" role="doc" /> + <file name="php_uuid.h" role="src" /> + <file name="uuid.c" role="src" /> + <file name="uuid.xml" role="doc" /> + </dir> <!-- / --> + </contents> + <dependencies> + <required> + <php> + <min>4.0.0</min> + </php> + <pearinstaller> + <min>1.4.0b1</min> + </pearinstaller> + </required> + </dependencies> + <providesextension>uuid</providesextension> + <extsrcrelease /> <changelog> <release> - <version>0.9</version> + <version> + <release>0.9</release> + <api>0.9</api> + </version> + <stability> + <release>beta</release> + <api>beta</api> + </stability> <date>2003-02-10</date> - <state>beta</state> - <notes> - Initial 'official' beta release. + <license uri="http://www.php.net/license">PHP License</license> + <notes>Initial &apos;official&apos; beta release. </notes> </release> - </changelog> + <release> + <version> + <release>1.0</release> + <api>1.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2004-03-27</date> + <license uri="http://www.php.net/license">PHP License</license> + <notes>Official 1.0 stable release + </notes> + </release> + </changelog> </package> http://cvs.php.net/viewvc.cgi/pecl/uuid/uuid.c?r1=1.5&r2=1.6&diff_format=u Index: pecl/uuid/uuid.c diff -u pecl/uuid/uuid.c:1.5 pecl/uuid/uuid.c:1.6 --- pecl/uuid/uuid.c:1.5 Tue Mar 30 18:10:06 2004 +++ pecl/uuid/uuid.c Tue Mar 25 22:53:20 2008 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <hartmut@php.net> | +----------------------------------------------------------------------+ - $Id: uuid.c,v 1.5 2004/03/30 18:10:06 hholzgra Exp $ + $Id: uuid.c,v 1.6 2008/03/25 22:53:20 hholzgra Exp $ */ #ifdef HAVE_CONFIG_H @@ -61,7 +61,7 @@ NULL, NULL, PHP_MINFO(uuid), - "0.1", + "1.0.1", STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -74,17 +74,25 @@ */ PHP_MINIT_FUNCTION(uuid) { - REGISTER_LONG_CONSTANT("UUID_VARIANT_NCS", UUID_VARIANT_NCS, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UUID_VARIANT_DCE", UUID_VARIANT_DCE, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UUID_VARIANT_MICROSOFT", UUID_VARIANT_MICROSOFT, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UUID_VARIANT_OTHER", UUID_VARIANT_OTHER, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UUID_TYPE_TIME", UUID_TYPE_TIME, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UUID_TYPE_DCE", UUID_TYPE_DCE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UUID_TYPE_NAME", UUID_TYPE_NAME, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UUID_TYPE_RANDOM", UUID_TYPE_RANDOM, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UUID_TYPE_NULL", UUID_TYPE_NULL, CONST_CS | CONST_PERSISTENT); +#ifdef UUID_VARIANT_NCS + REGISTER_LONG_CONSTANT("UUID_VARIANT_NCS", UUID_VARIANT_NCS, CONST_CS | CONST_PERSISTENT); +#endif +#ifdef UUID_VARIANT_DCE + REGISTER_LONG_CONSTANT("UUID_VARIANT_DCE", UUID_VARIANT_DCE, CONST_CS | CONST_PERSISTENT); +#endif +#ifdef UUID_VARIANT_MICROSOFT + REGISTER_LONG_CONSTANT("UUID_VARIANT_MICROSOFT", UUID_VARIANT_MICROSOFT, CONST_CS | CONST_PERSISTENT); +#endif +#ifdef UUID_VARIANT_OTHER + REGISTER_LONG_CONSTANT("UUID_VARIANT_OTHER", UUID_VARIANT_OTHER, CONST_CS | CONST_PERSISTENT); +#endif + return SUCCESS; } /* }}} */ @@ -201,6 +209,7 @@ } /* }}} */ +#if HAVE_UUID_VARIANT /* {{{ proto int uuid_variant(string uuid) Get UUID variant */ PHP_FUNCTION(uuid_variant) @@ -218,7 +227,9 @@ RETURN_LONG(uuid_variant(u)); } /* }}} */ +#endif +#if HAVE_UUID_TYPE /* {{{ proto int uuid_type(string uuid) Get UUID type */ PHP_FUNCTION(uuid_type) @@ -238,6 +249,7 @@ RETURN_LONG(uuid_type(u)); } /* }}} */ +#endif /* {{{ proto int uuid_time(string uuid) Get UUID creation time as UNIX timestamp */ @@ -252,9 +264,12 @@ return; if(uuid_parse(uuid, u)) RETURN_FALSE; +#if HAVE_UUID_VARIANT if(uuid_variant(u) != 1) RETURN_FALSE; +#endif +#if HAVE_UUID_TYPE if(uuid_type(u) != 1) RETURN_FALSE; - +#endif RETURN_LONG(uuid_time(u, NULL)); } /* }}} */ @@ -273,8 +288,12 @@ return; if(uuid_parse(uuid, u)) RETURN_FALSE; +#if HAVE_UUID_VARIANT if(uuid_variant(u) != 1) RETURN_FALSE; +#endif +#if HAVE_UUID_TYPE if(uuid_type(u) != 1) RETURN_FALSE; +#endif if(uuid[10]&0x80) RETURN_FALSE; uuid_unparse(u, uuid_str);
« previous php.pecl.cvs (#10078) next »