Index: ossp-pkg/uuid/.cvsignore RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/.cvsignore,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/.cvsignore,v' 2>/dev/null --- .cvsignore 2004/01/15 12:55:51 1.2 +++ .cvsignore 2004/01/18 20:19:23 1.3 @@ -11,4 +11,5 @@ uuid-config.1 uuid.1 uuid.3 +uuid.h uuid Index: ossp-pkg/uuid/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/ChangeLog,v rcsdiff -q -kk '-r1.27' '-r1.28' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/ChangeLog,v' 2>/dev/null --- ChangeLog 2004/01/18 19:59:12 1.27 +++ ChangeLog 2004/01/18 20:19:23 1.28 @@ -13,6 +13,10 @@ Changes between 0.9.3 and 0.9.4 (16-Jan-2004 to xx-Jan-2004) + o Add version support to API via UUID_VERSION (compile-time) + and uuid_version() (link-time). + [Ralf S. Engelschall] + o Refactor the API by merging uuid_{unpack,pack,parse,format,dump}() functions into unified uuid_{import,export}() functions. This allows us to easily add support for other formats (e.g. XML) in the Index: ossp-pkg/uuid/README RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/README,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/README,v' 2>/dev/null --- README 2004/01/16 15:55:13 1.9 +++ README 2004/01/18 20:19:23 1.10 @@ -5,7 +5,7 @@ |_|_|_| \___/|____/____/|_| \__,_|\__,_|_|\__,_| OSSP uuid - Universally Unique Identifier - Version 0.9.3 (16-Jan-2004) + Version 0.9.4 (18-Jan-2004) ABSTRACT Index: ossp-pkg/uuid/TODO RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/TODO,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/TODO,v' 2>/dev/null --- TODO 2004/01/18 20:00:08 1.16 +++ TODO 2004/01/18 20:19:23 1.17 @@ -1,5 +1,4 @@ TODO -- add versioning to API itself - why are nanoseconds always "1"?! - check UUID_LEN_STR+1 handling for consistency CANDO Index: ossp-pkg/uuid/VERSION RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/VERSION,v co -q -kk -p'1.6' '/v/ossp/cvs/ossp-pkg/uuid/Attic/VERSION,v' | diff -u - /dev/null -L'ossp-pkg/uuid/VERSION' 2>/dev/null --- ossp-pkg/uuid/VERSION +++ /dev/null 2024-05-16 18:15:37.000000000 +0200 @@ -1,6 +0,0 @@ - - VERSION -- Version Information for OSSP uuid (syntax: Text) - [automatically generated and maintained by GNU shtool] - - This is OSSP uuid, Version 0.9.3 (16-Jan-2004) - Index: ossp-pkg/uuid/configure.ac RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/configure.ac,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/configure.ac,v' 2>/dev/null --- configure.ac 2004/01/13 10:02:26 1.4 +++ configure.ac 2004/01/18 20:19:23 1.5 @@ -29,9 +29,11 @@ AC_PREREQ(2.53) AC_INIT -UUID_VERSION_STR=`./shtool version -l txt -d long VERSION` +UUID_VERSION_STR=`./shtool version -l c -d long uuid_vers.h` +UUID_VERSION_HEX=`./shtool version -l c -d hex uuid_vers.h` ./shtool echo -e "Configuring %BOSSP uuid%b (Universally Unique Identifier), version %B${UUID_VERSION_STR}%b" AC_SUBST(UUID_VERSION_STR) +AC_SUBST(UUID_VERSION_HEX) AC_PROG_MAKE_SET AC_PROG_CC @@ -48,7 +50,7 @@ UUID_CHECK_ALL AC_CONFIG_HEADERS(config.h) -AC_CONFIG_FILES([Makefile uuid-config]) +AC_CONFIG_FILES([Makefile uuid-config uuid.h]) AC_CONFIG_COMMANDS([adjustment], [chmod a+x uuid-config]) AC_OUTPUT Index: ossp-pkg/uuid/devtool.conf RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/devtool.conf,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/devtool.conf,v' 2>/dev/null --- devtool.conf 2004/01/06 20:14:28 1.1 +++ devtool.conf 2004/01/18 20:19:23 1.2 @@ -20,8 +20,8 @@ "$@" %version - ./shtool version -l txt -n "OSSP uuid" -e VERSION - V=`./shtool version -l txt -d long VERSION` + ./shtool version -l c -n "OSSP uuid" -p _uuid_ -e uuid_vers.h + V=`./shtool version -l c -d long uuid_vers.h` sed -e "s/Version .*/Version $V/g" README.n mv README.n README @@ -40,7 +40,7 @@ echo "+++ fixing" ./shtool fixperm -v . echo "+++ rolling" - V=`./shtool version -l txt -d short VERSION` + V=`./shtool version -l c -d short uuid_vers.h` ./shtool tarball -o uuid-${V}.tar.gz -d uuid-${V} -u ossp -g ossp \ -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz,^#.*,.*~$' -c 'gzip --best' . ls -l uuid-${V}.tar.gz @@ -51,6 +51,6 @@ %upload echo "+++ copying to ftp://ftp.ossp.org/pkg/lib/uuid/" - V=`./shtool version -l txt -d short VERSION` + V=`./shtool version -l c -d short uuid_vers.h` scp uuid-${V}.tar.gz master.ossp.org:/e/ossp/ftp/pkg/lib/uuid/ Index: ossp-pkg/uuid/uuid.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.c,v rcsdiff -q -kk '-r1.36' '-r1.37' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.c,v' 2>/dev/null --- uuid.c 2004/01/18 19:59:12 1.36 +++ uuid.c 2004/01/18 20:19:23 1.37 @@ -43,6 +43,7 @@ /* own headers */ #include "config.h" #include "uuid.h" +#include "uuid_vers.h" #include "uuid_md5.h" #include "uuid_prng.h" #include "uuid_mac.h" @@ -1010,3 +1011,9 @@ return str; } +/* OSSP uuid version (link-time information) */ +unsigned long uuid_version(void) +{ + return (unsigned long)(_UUID_VERSION); +} + Index: ossp-pkg/uuid/uuid.h RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.h,v rcsdiff -q -kk '-r1.13' '-r1.14' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.h,v' 2>/dev/null --- uuid.h 2004/01/18 19:59:12 1.13 +++ uuid.h 2004/01/18 20:19:23 1.14 @@ -30,6 +30,9 @@ #ifndef __UUID_H__ #define __UUID_H__ +/* OSSP uuid version (compile-time information) */ +#define UUID_VERSION 0x009204 + /* minimum C++ support */ #ifdef __cplusplus #define DECLARATION_BEGIN extern "C" { @@ -92,6 +95,7 @@ /* library error handling */ extern char *uuid_error (uuid_rc_t _rc); +extern unsigned long uuid_version (void); DECLARATION_END Index: ossp-pkg/uuid/uuid.h.in RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.h.in,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.h.in,v' | diff -u /dev/null - -L'ossp-pkg/uuid/uuid.h.in' 2>/dev/null --- ossp-pkg/uuid/uuid.h.in +++ - 2024-05-16 18:17:11.842522293 +0200 @@ -0,0 +1,103 @@ +/* +** OSSP uuid - Universally Unique Identifier +** Copyright (c) 2004 Ralf S. Engelschall +** Copyright (c) 2004 The OSSP Project +** +** This file is part of OSSP uuid, a library for the generation +** of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/ +** +** Permission to use, copy, modify, and distribute this software for +** any purpose with or without fee is hereby granted, provided that +** the above copyright notice and this permission notice appear in all +** copies. +** +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +** SUCH DAMAGE. +** +** uuid.h: library API definition +*/ + +#ifndef __UUID_H__ +#define __UUID_H__ + +/* OSSP uuid version (compile-time information) */ +#define UUID_VERSION @UUID_VERSION_HEX@ + +/* minimum C++ support */ +#ifdef __cplusplus +#define DECLARATION_BEGIN extern "C" { +#define DECLARATION_END } +#else +#define DECLARATION_BEGIN /*nop*/ +#define DECLARATION_END /*nop*/ +#endif + +DECLARATION_BEGIN + +/* encoding octet stream lengths */ +#define UUID_LEN_BIN (128 / 8 /*bytes*/) +#define UUID_LEN_STR (128 / 4 /*nibbles*/ + 4 /*hyphens*/) + +/* return codes */ +typedef enum { + UUID_RC_OK = 0, + UUID_RC_ARG = 1, + UUID_RC_MEM = 2, + UUID_RC_SYS = 3, + UUID_RC_INT = 4, + UUID_RC_IMP = 5 +} uuid_rc_t; + +/* generation mode flags */ +enum { + UUID_VERSION1 = (1 << 0), + UUID_VERSION3 = (1 << 1), + UUID_VERSION4 = (1 << 2), + UUID_MCASTRND = (1 << 3) +}; + +/* import/export formats */ +typedef enum { + UUID_FMT_BIN = 0, /* import/export */ + UUID_FMT_STR = 1, /* import/export */ + UUID_FMT_TXT = 2 /* export only */ +} uuid_fmt_t; + +/* abstract data type */ +struct uuid_st; +typedef struct uuid_st uuid_t; + +/* object handling */ +extern uuid_rc_t uuid_create (uuid_t **_uuid); +extern uuid_rc_t uuid_destroy (uuid_t *_uuid); + +/* UUID generation */ +extern uuid_rc_t uuid_nil (uuid_t *_uuid); +extern uuid_rc_t uuid_generate (uuid_t *_uuid, unsigned int _mode, ...); + +/* UUID comparison */ +extern uuid_rc_t uuid_isnil (uuid_t *_uuid, int *_result); +extern uuid_rc_t uuid_compare (uuid_t *_uuid, uuid_t *_uuid2, int *_result); + +/* UUID import/export */ +extern uuid_rc_t uuid_import (uuid_t *_uuid, uuid_fmt_t _fmt, const void *_data_ptr, size_t _data_len); +extern uuid_rc_t uuid_export (uuid_t *_uuid, uuid_fmt_t _fmt, void **_data_ptr, size_t *_data_len); + +/* library error handling */ +extern char *uuid_error (uuid_rc_t _rc); +extern unsigned long uuid_version (void); + +DECLARATION_END + +#endif /* __UUID_H__ */ + Index: ossp-pkg/uuid/uuid_vers.h RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_vers.h,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_vers.h,v' | diff -u /dev/null - -L'ossp-pkg/uuid/uuid_vers.h' 2>/dev/null --- ossp-pkg/uuid/uuid_vers.h +++ - 2024-05-16 18:17:11.845262653 +0200 @@ -0,0 +1,46 @@ +/* +** uuid_vers.h -- Version Information for OSSP uuid (syntax: C/C++) +** [automatically generated and maintained by GNU shtool] +*/ + +#ifdef _UUID_VERS_H_AS_HEADER_ + +#ifndef _UUID_VERS_H_ +#define _UUID_VERS_H_ + +#define _UUID_VERSION 0x009204 + +typedef struct { + const int v_hex; + const char *v_short; + const char *v_long; + const char *v_tex; + const char *v_gnu; + const char *v_web; + const char *v_sccs; + const char *v_rcs; +} _uuid_version_t; + +extern _uuid_version_t _uuid_version; + +#endif /* _UUID_VERS_H_ */ + +#else /* _UUID_VERS_H_AS_HEADER_ */ + +#define _UUID_VERS_H_AS_HEADER_ +#include "uuid_vers.h" +#undef _UUID_VERS_H_AS_HEADER_ + +_uuid_version_t _uuid_version = { + 0x009204, + "0.9.4", + "0.9.4 (18-Jan-2004)", + "This is OSSP uuid, Version 0.9.4 (18-Jan-2004)", + "OSSP uuid 0.9.4 (18-Jan-2004)", + "OSSP uuid/0.9.4", + "@(#)OSSP uuid 0.9.4 (18-Jan-2004)", + "$Id$" +}; + +#endif /* _UUID_VERS_H_AS_HEADER_ */ +