OSSP CVS Repository

ossp - Check-in [4373]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4373
Date: 2004-Jan-18 21:19:23 (local)
2004-Jan-18 20:19:23 (UTC)
User:rse
Branch:
Comment: Add version support to API via UUID_VERSION (compile-time) and uuid_version() (link-time).
Tickets:
Inspections:
Files:
ossp-pkg/uuid/.cvsignore      1.2 -> 1.3     1 inserted, 0 deleted
ossp-pkg/uuid/ChangeLog      1.27 -> 1.28     4 inserted, 0 deleted
ossp-pkg/uuid/README      1.9 -> 1.10     1 inserted, 1 deleted
ossp-pkg/uuid/TODO      1.16 -> 1.17     0 inserted, 1 deleted
ossp-pkg/uuid/VERSION      1.6->removed
ossp-pkg/uuid/configure.ac      1.4 -> 1.5     4 inserted, 2 deleted
ossp-pkg/uuid/devtool.conf      1.1 -> 1.2     4 inserted, 4 deleted
ossp-pkg/uuid/uuid.c      1.36 -> 1.37     7 inserted, 0 deleted
ossp-pkg/uuid/uuid.h      1.13 -> 1.14     4 inserted, 0 deleted
ossp-pkg/uuid/uuid.h.in      added-> 1.1
ossp-pkg/uuid/uuid_vers.h      added-> 1.1

ossp-pkg/uuid/.cvsignore 1.2 -> 1.3

--- .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


ossp-pkg/uuid/ChangeLog 1.27 -> 1.28

--- 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


ossp-pkg/uuid/README 1.9 -> 1.10

--- 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
 


ossp-pkg/uuid/TODO 1.16 -> 1.17

--- 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


ossp-pkg/uuid/VERSION 1.6 -> 1.7



ossp-pkg/uuid/configure.ac 1.4 -> 1.5

--- 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
 


ossp-pkg/uuid/devtool.conf 1.1 -> 1.2

--- 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 >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/
 


ossp-pkg/uuid/uuid.c 1.36 -> 1.37

--- 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);
+}
+


ossp-pkg/uuid/uuid.h 1.13 -> 1.14

--- 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
 


ossp-pkg/uuid/uuid.h.in -> 1.1

*** /dev/null    Fri Nov 22 14:54:08 2024
--- -    Fri Nov 22 14:54:08 2024
***************
*** 0 ****
--- 1,103 ----
+ /*
+ **  OSSP uuid - Universally Unique Identifier
+ **  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ **
+ **  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__ */
+ 


ossp-pkg/uuid/uuid_vers.h -> 1.1

*** /dev/null    Fri Nov 22 14:54:08 2024
--- -    Fri Nov 22 14:54:08 2024
***************
*** 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: OSSP uuid 0.9.4 (18-Jan-2004) $"
+ };
+ 
+ #endif /* _UUID_VERS_H_AS_HEADER_ */
+ 

CVSTrac 2.0.1