OSSP CVS Repository

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

Check-in Number: 4955
Date: 2005-Jan-13 11:30:40 (local)
2005-Jan-13 10:30:40 (UTC)
User:rse
Branch:
Comment: Fix generation of v3 UUIDs by adding support for 64-bit platforms to the underlying uuid_md5.c code (which internally is based on the RFC reference code which in turn assumes a 32-bit environment).

64-bit platform problem discovered by maintainer of OSSP uuid Debian package: Piotr Roszatycki <Piotr_Roszatycki@netia.net.pl>

Tickets:
Inspections:
Files:
ossp-pkg/uuid/ChangeLog      1.65 -> 1.66     5 inserted, 0 deleted
ossp-pkg/uuid/THANKS      1.5 -> 1.6     1 inserted, 0 deleted
ossp-pkg/uuid/uuid_md5.c      1.8 -> 1.9     19 inserted, 0 deleted

ossp-pkg/uuid/ChangeLog 1.65 -> 1.66

--- ChangeLog    2005/01/13 09:58:14     1.65
+++ ChangeLog    2005/01/13 10:30:40     1.66
@@ -13,6 +13,11 @@
 
   Changes between 1.1.1 and 1.1.2 (18-Nov-2004 to xx-Jan-2005)
 
+   o Fix generation of v3 UUIDs by adding support for 64-bit platforms
+     to the underlying uuid_md5.c code (which internally is based on
+     the RFC reference code which in turn assumes a 32-bit environment).
+     [Ralf S. Engelschall, Piotr Roszatycki <Piotr_Roszatycki@netia.net.pl>]
+
    o Optimize internal md5_store() function by directly finalizing MD5
      calculation on buffer copy instead of finalizing original buffer
      and having to restore it from the buffer copy.


ossp-pkg/uuid/THANKS 1.5 -> 1.6

--- THANKS       2004/02/16 09:13:58     1.5
+++ THANKS       2005/01/13 10:30:41     1.6
@@ -15,6 +15,7 @@
     o  M. Daniel                   <mdaniel@scdi.com>
     o  Fuyuki                      <fuyuki@nigredo.org>
     o  Thomas Lotterer             <thomas@lotterer.net>
+    o  Piotr Roszatycki            <Piotr_Roszatycki@netia.net.pl>
     o  Michael Schloh              <michael@schloh.com>
     o  Guerry Semones              <guerry@tsunamiresearch.com>
 


ossp-pkg/uuid/uuid_md5.c 1.8 -> 1.9

--- uuid_md5.c   2005/01/13 09:58:14     1.8
+++ uuid_md5.c   2005/01/13 10:30:41     1.9
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "config.h"
 #include "uuid_md5.h"
 
 /*
@@ -77,10 +78,28 @@
 typedef unsigned char *POINTER;
 
 /* UINT2 defines a two byte word */
+#if SIZEOF_UNSIGNED_SHORT == 2
 typedef unsigned short int UINT2;
+#elif SIZEOF_UNSIGNED_INT == 2
+typedef unsigned int UINT2;
+#elif SIZEOF_UNSIGNED_LONG == 2
+typedef unsigned long int UINT2;
+#else
+#error ERROR: unable to determine UINT2 type (two byte word)
+#endif
 
 /* UINT4 defines a four byte word */
+#if SIZEOF_UNSIGNED_SHORT == 4
+typedef unsigned short int UINT4;
+#elif SIZEOF_UNSIGNED_INT == 4
+typedef unsigned int UINT4;
+#elif SIZEOF_UNSIGNED_LONG == 4
 typedef unsigned long int UINT4;
+#elif SIZEOF_UNSIGNED_LONG_LONG == 4
+typedef unsigned long long int UINT4;
+#else
+#error ERROR: unable to determine UINT4 type (four byte word)
+#endif
 
 /* MD5 context. */
 typedef struct {

CVSTrac 2.0.1