Hello community,
here is the log from the commit of package perl-Data-UUID
checked in at Mon Sep 18 13:13:52 CEST 2006.
--------
--- perl-Data-UUID/perl-Data-UUID.changes 2006-01-25 21:39:37.000000000 +0100
+++ perl-Data-UUID/perl-Data-UUID.changes 2006-09-18 13:00:14.000000000 +0200
@@ -1,0 +2,21 @@
+Mon Sep 18 04:24:47 CEST 2006 - lmuelle@suse.de
+
+- Update to version 0.143.
+ - more tick-tracking fixes (rt #21486) -- thanks MERIJNB!
+ - fix incorrect initialization of tick-tracking (rt #2481)
+ - partial fix for compilation under MSVC (thanks Alex Ciornii!)
+ - added use strict
+ - added tests to shut up stupid Kwalitee tests
+ - fixed compilation errors on Mac OS X: bugs 12389, 15829
+ - avoid hanging under CPAN tools by using EUMM prompt(): bug 8046
+ (thanks, Schwern)
+ - fix problems with "long" type on 64 big platforms: bug 14163
+ (thanks, Kevin Rosenberg)
+ - improve compilation on Cygwin: bug 7088 (thanks, maxb)
+ - improve compilation on Win32: bug 14082 (thanks, Christopher Laco)
+ - fixed link to UUID draft: bug 12169 (thanks, kcivey)
+ - fixed UUID collision on SMP machines: bug 15042 (thanks, Chia-liang Kao)
+ - reformatted POD documentation as per David Wheeler
+ - added ref. links to articles on database keys reengineering problem
+
+-------------------------------------------------------------------
Old:
----
Data-UUID-0.11.tar.gz
New:
----
Data-UUID-0.143.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Data-UUID.spec ++++++
--- /var/tmp/diff_new_pack.Nci7F8/_old 2006-09-18 13:13:44.000000000 +0200
+++ /var/tmp/diff_new_pack.Nci7F8/_new 2006-09-18 13:13:44.000000000 +0200
@@ -1,11 +1,11 @@
#
-# spec file for package perl-Data-UUID (Version 0.11)
+# spec file for package perl-Data-UUID (Version 0.143)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://www.suse.de/feedback/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
@@ -17,8 +17,8 @@
Requires: perl = %{perl_version}
Autoreqprov: on
Summary: Perl extension for generating Globally/Universally Unique Identifiers (GUIDs/UUIDs)
-Version: 0.11
-Release: 2
+Version: 0.143
+Release: 1
Source: http://cpan.org/modules/by-module/Data/Data-UUID-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -66,6 +66,24 @@
/var/adm/perl-modules/%{name}
%changelog -n perl-Data-UUID
+* Mon Sep 18 2006 - lmuelle@suse.de
+- Update to version 0.143.
+- more tick-tracking fixes (rt #21486) -- thanks MERIJNB!
+- fix incorrect initialization of tick-tracking (rt #2481)
+- partial fix for compilation under MSVC (thanks Alex Ciornii!)
+- added use strict
+- added tests to shut up stupid Kwalitee tests
+- fixed compilation errors on Mac OS X: bugs 12389, 15829
+- avoid hanging under CPAN tools by using EUMM prompt(): bug 8046
+ (thanks, Schwern)
+- fix problems with "long" type on 64 big platforms: bug 14163
+ (thanks, Kevin Rosenberg)
+- improve compilation on Cygwin: bug 7088 (thanks, maxb)
+- improve compilation on Win32: bug 14082 (thanks, Christopher Laco)
+- fixed link to UUID draft: bug 12169 (thanks, kcivey)
+- fixed UUID collision on SMP machines: bug 15042 (thanks, Chia-liang Kao)
+- reformatted POD documentation as per David Wheeler
+- added ref. links to articles on database keys reengineering problem
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Feb 16 2005 - schwab@suse.de
++++++ Data-UUID-0.11.tar.gz -> Data-UUID-0.143.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/Changes new/Data-UUID-0.143/Changes
--- old/Data-UUID-0.11/Changes 2003-08-27 22:04:39.000000000 +0200
+++ new/Data-UUID-0.143/Changes 2006-09-18 04:13:11.000000000 +0200
@@ -1,44 +1,71 @@
Revision history for Perl extension Data::UUID.
-0.01 Thu Oct 25 16:19:30 2001
- - original version; created by h2xs 1.21 with options
- -f -nData::UUID -v0.01
+0.143 Sun Sep 17 22:12 2006
+ - more tick-tracking fixes (rt #21486) -- thanks MERIJNB!
-0.02 Wed Oct 31 12:11:00 2001
- - fixed from_string/from_hexstring bug, which caused
- problems on little endian machines (linux)
+0.142 Tue Sep 5 22:41 2006
+ - fix incorrect initialization of tick-tracking (rt #2481)
-0.03 Mon Nov 5 12:47:00 2001
- - fixed padding problem in from_b64string
- - re-tested with Cygwin v2.78.2.15
+0.141 Tue Sep 5 22:16 2006
+ - partial fix for compilation under MSVC (thanks Alex Ciornii!)
-0.04 Tue Dec 11 12:03:00 2001
- - fixed padding in create_b64/to_b64string
- - added advisory locking for state storage
+0.14 Sat Mar 18 08:40 2006
+ - added use strict
+ - added tests to shut up stupid Kwalitee tests
+
+0.13 Sat Feb 25 15:20 2006
+ - fixed compilation errors on Mac OS X: bugs 12389, 15829
+ - avoid hanging under CPAN tools by using EUMM prompt(): bug 8046
+ (thanks, Schwern)
+ - fix problems with "long" type on 64 big platforms: bug 14163
+ (thanks, Kevin Rosenberg)
+ - improve compilation on Cygwin: bug 7088 (thanks, maxb)
+ - improve compilation on Win32: bug 14082 (thanks, Christopher Laco)
+ - fixed link to UUID draft: bug 12169 (thanks, kcivey)
+ - fixed UUID collision on SMP machines: bug 15042 (thanks, Chia-liang Kao)
-0.05 Tue Feb 12 09:46:00 2002
- - added custom OS defines
- - added LOCK/UNLOCK defines for Darwin OS
+0.11 Wed Aug 27 16:05:00 2003
+ - reformatted POD documentation as per David Wheeler
+ - added ref. links to articles on database keys reengineering problem
-0.06 Sun Mar 2 01:41:00 2002
- - added code to fix ccflags on HP (as per Lincoln Baxter)
- - fixed state/nodeid sharing problem (as per Lincoln Baxter)
- - fixed most compiler warnings (as per Lincoln Baxter)
- - replaced Base64-encode algorithm to fix buffer overflow
- (as per Lincoln Baxter).
- - fixed count of tests in test.pl (as per Lincoln Baxter)
- - added ok() to every line of test.pl (as per Lincoln Baxter)
+0.10 Thu Jul 17 17:12:00 2003
+ - added support for PERL_MM_USE_DEFAULT as per Heath Malstrom
+ - replaced GetSystemTimeAsFileTime with QueryPerformanceCounter as per Paul
+ Stodghill
+
+0.08 Fri Nov 29 12:12:00 2002
+ - added default umask for state storage files (as per James A. Duncan,
+ Fotango.com)
0.07 Wed Jun 12 17:31:00 2002
- - changed get_system_time to use I64 ints (CPAN Ticket #737 - Incorrect Time based UUIDs)
+ - changed get_system_time to use I64 ints (CPAN Ticket #737 - Incorrect Time
+ based UUIDs)
-0.08 Fri Nov 29 12:12:00 2002
- - added default umask for state storage files (as per James A. Duncan, Fotango.com)
+0.06 Sun Mar 2 01:41:00 2002
+ - added code to fix ccflags on HP (as per Lincoln Baxter)
+ - fixed state/nodeid sharing problem (as per Lincoln Baxter)
+ - fixed most compiler warnings (as per Lincoln Baxter)
+ - replaced Base64-encode algorithm to fix buffer overflow
+ (as per Lincoln Baxter).
+ - fixed count of tests in test.pl (as per Lincoln Baxter)
+ - added ok() to every line of test.pl (as per Lincoln Baxter)
-0.10 Thu Jul 17 17:12:00 2003
- - added support for PERL_MM_USE_DEFAULT as per Heath Malstrom
- - replaced GetSystemTimeAsFileTime with QueryPerformanceCounter as per Paul Stodghill
+0.05 Tue Feb 12 09:46:00 2002
+ - added custom OS defines
+ - added LOCK/UNLOCK defines for Darwin OS
-0.11 Wed Aug 27 16:05:00 2003
- - reformatted POD documentation as per David Wheeler
- - added ref. links to articles on database keys reengineering problem
+0.04 Tue Dec 11 12:03:00 2001
+ - fixed padding in create_b64/to_b64string
+ - added advisory locking for state storage
+
+0.03 Mon Nov 5 12:47:00 2001
+ - fixed padding problem in from_b64string
+ - re-tested with Cygwin v2.78.2.15
+
+0.02 Wed Oct 31 12:11:00 2001
+ - fixed from_string/from_hexstring bug, which caused problems on little
+ endian machines (linux)
+
+0.01 Thu Oct 25 16:19:30 2001
+ - original version; created by h2xs 1.21 with options
+ -f -nData::UUID -v0.01
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/MANIFEST new/Data-UUID-0.143/MANIFEST
--- old/Data-UUID-0.11/MANIFEST 2003-08-27 21:38:35.000000000 +0200
+++ new/Data-UUID-0.143/MANIFEST 2006-09-18 04:15:37.000000000 +0200
@@ -2,10 +2,13 @@
Makefile.PL
MANIFEST
README
-test.pl
+t/basic.t
+t/pod.t
+t/pod-coverage.t
UUID.h
UUID.pm
UUID.xs
md5.c
md5.h
typemap
+META.yml Module meta-data (added by MakeMaker)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/META.yml new/Data-UUID-0.143/META.yml
--- old/Data-UUID-0.11/META.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/Data-UUID-0.143/META.yml 2006-09-18 04:15:37.000000000 +0200
@@ -0,0 +1,10 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: Data-UUID
+version: 0.143
+version_from: UUID.pm
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/Makefile.PL new/Data-UUID-0.143/Makefile.PL
--- old/Data-UUID-0.11/Makefile.PL 2003-08-27 21:38:35.000000000 +0200
+++ new/Data-UUID-0.143/Makefile.PL 2006-08-14 19:03:22.000000000 +0200
@@ -14,7 +14,7 @@
sub const_cccmd {
my ($self) = shift;
local($_) = $self->SUPER::const_cccmd(@_);
- # are we using the non-bundled hpux compiler?
+ # are we using the non-bundled hpux compiler?
if ($os eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
print "Changing -Aa to -Ae for HP-UX in ccmd to allow for long long.\n"
if s/-Aa\b/-Ae/g; # allow "long long" in UUID.h
@@ -30,37 +30,38 @@
print "Changing -Aa to -Ae for HP-UX in cflags.\n"
if s/-Aa\b/-Ae/g; # allow "long long" in UUID.h
}
- $_;
+ $_;
}
};
WriteMakefile(
- 'NAME' => 'Data::UUID',
- 'VERSION_FROM' => 'UUID.pm', # finds $VERSION
- 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'UUID.pm', # retrieve abstract from module
- AUTHOR => 'A. U. Thor ') : ()),
- 'LIBS' => ['-lsocket'], # e.g., '-lm'
- 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
- # Insert -I. if you add *.h files later:
- 'INC' => '', # e.g., '-I/usr/include/other'
- # Un-comment this if you add C files to link with later:
- 'OBJECT' => '$(O_FILES)', # link all the C files too
- 'CONFIGURE' =>
- sub {
- my ($d, $m);
- # automate installations - as per Heath Malmstrom
- if(!$ENV{PERL_MM_USE_DEFAULT}) {
- do { print "UUID state storage (/var/tmp): ";
- } while !($d = <STDIN>, chop $d, -d $d || !$d);
- do { print "default umask (0007): ";
- } while !($m = <STDIN>, chop $m, ($m =~ /[0-7]{3}/) || !$m);
- }
- chmod(0666, sprintf("%s/%s", $d||"/var/tmp", ".UUID_NODEID"));
- chmod(0666, sprintf("%s/%s", $d||"/var/tmp", ".UUID_STATE"));
- return { 'DEFINE' => qq(-D_STDIR=\\").($d||"/var/tmp").qq(\\").
- qq( -D__$Config{osname}__).
- qq( -D_DEFAULT_UMASK=).($m||"0007")};
- }
+ ($] >= 5.005 ## Add these new keywords supported since 5.005
+ ? (ABSTRACT_FROM => 'UUID.pm', # retrieve abstract from module
+ AUTHOR => 'A. U. Thor ')
+ : ()),
+
+ NAME => 'Data::UUID',
+ VERSION_FROM => 'UUID.pm', # finds $VERSION
+ PREREQ_PM => {}, # e.g., Module::Name => 1.1
+ LIBS => ['-lsocket'], # e.g., '-lm'
+ DEFINE => '', # e.g., '-DHAVE_SOMETHING'
+ # Insert -I. if you add *.h files later:
+ INC => '', # e.g., '-I/usr/include/other'
+ # Un-comment this if you add C files to link with later:
+ OBJECT => '$(O_FILES)', # link all the C files too
+ CONFIGURE => sub {
+ my $d = eval { require File::Spec; File::Spec->tmpdir; } || '/var/tmp';
+ $d = prompt("UUID state storage", $d);
+
+ my $m = '0007';
+ $m = prompt("default umask", $m);
+
+ chmod(0666, sprintf("%s/%s", $d, ".UUID_NODEID"));
+ chmod(0666, sprintf("%s/%s", $d, ".UUID_STATE"));
+ return {
+ DEFINE => qq(-D_STDIR=\\"$d\\")
+ . qq( -D__$Config{osname}__)
+ . qq( -D_DEFAULT_UMASK=$m)
+ };
+ }
);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/UUID.h new/Data-UUID-0.143/UUID.h
--- old/Data-UUID-0.11/UUID.h 2003-08-27 21:38:35.000000000 +0200
+++ new/Data-UUID-0.143/UUID.h 2006-09-06 04:16:06.000000000 +0200
@@ -4,7 +4,13 @@
#include
#include
#include
+#ifndef WIN32
#include
+#endif
+#ifndef _MSC_VER
+// No unistd.h in MS VC
+#include
+#endif
#include
#include "md5.h"
@@ -59,12 +65,17 @@
#define CHECK(f1, f2) if (f1 != f2) RETVAL = f1 < f2 ? -1 : 1;
-typedef unsigned long unsigned32;
+typedef unsigned int unsigned32;
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
typedef unsigned char byte;
+#ifndef _MSC_VER
typedef unsigned long long unsigned64_t;
-typedef unsigned64_t uuid_time_t;
+# else
+typedef unsigned __int64 unsigned64_t;
+// http://msdn2.microsoft.com/en-us/library/296az74e.aspx - Integer Limits
+#endif
+typedef unsigned64_t perl_uuid_time_t;
#if defined __solaris__ || defined __linux__
# define LOCK(f) lockf(fileno(f),F_LOCK,0);
@@ -77,23 +88,23 @@
# define UNLOCK(f)
#endif
-#undef uuid_t
+#undef perl_uuid_t
typedef struct _uuid_node_t {
char nodeID[6];
} uuid_node_t;
-typedef struct _uuid_t {
+typedef struct _perl_uuid_t {
unsigned32 time_low;
unsigned16 time_mid;
unsigned16 time_hi_and_version;
unsigned8 clock_seq_hi_and_reserved;
unsigned8 clock_seq_low;
byte node[6];
-} uuid_t;
+} perl_uuid_t;
typedef struct _uuid_state_t {
- uuid_time_t ts;
+ perl_uuid_time_t ts;
uuid_node_t node;
unsigned16 cs;
} uuid_state_t;
@@ -101,22 +112,22 @@
typedef struct _uuid_context_t {
uuid_state_t state;
uuid_node_t nodeid;
- uuid_time_t next_save;
+ perl_uuid_time_t next_save;
} uuid_context_t;
static void format_uuid_v1(
- uuid_t *uuid,
+ perl_uuid_t *uuid,
unsigned16 clockseq,
- uuid_time_t timestamp,
+ perl_uuid_time_t timestamp,
uuid_node_t node
);
static void format_uuid_v3(
- uuid_t *uuid,
+ perl_uuid_t *uuid,
unsigned char hash[16]
);
-static void get_current_time(uuid_time_t * timestamp);
+static void get_current_time(perl_uuid_time_t * timestamp);
static unsigned16 true_random(void);
-static void get_system_time(uuid_time_t *uuid_time);
+static void get_system_time(perl_uuid_time_t *perl_uuid_time);
static void get_random_info(unsigned char seed[16]);
static char *base64 =
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/UUID.pm new/Data-UUID-0.143/UUID.pm
--- old/Data-UUID-0.11/UUID.pm 2003-08-27 22:06:06.000000000 +0200
+++ new/Data-UUID-0.143/UUID.pm 2006-09-18 04:14:14.000000000 +0200
@@ -1,5 +1,7 @@
package Data::UUID;
+use strict;
+
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
@@ -17,7 +19,7 @@
NameSpace_URL
NameSpace_X500
);
-$VERSION = '0.11';
+$VERSION = '0.143';
# Preloaded methods go here.
@@ -33,18 +35,17 @@
croak "& not defined" if $constname eq 'constant';
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
- if ($! =~ /Invalid/ || $!{EINVAL}) {
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- }
- else {
- croak "Your vendor has not defined Data::UUID macro $constname";
- }
+ if ($! =~ /Invalid/ || $!{EINVAL}) {
+ $AutoLoader::AUTOLOAD = $AUTOLOAD;
+ goto &AutoLoader::AUTOLOAD;
+ } else {
+ croak "Your vendor has not defined Data::UUID macro $constname";
+ }
}
{
- no strict 'refs';
- # Fixed between 5.005_53 and 5.005_61
- *$AUTOLOAD = sub { $val };
+ no strict 'refs';
+ # Fixed between 5.005_53 and 5.005_61
+ *$AUTOLOAD = sub { $val };
}
goto &$AUTOLOAD;
}
@@ -91,11 +92,11 @@
The algorithm for UUID generation, used by this extension, is described in the
Internet Draft "UUIDs and GUIDs" by Paul J. Leach and Rich Salz
-(Lhttp://www.globecom.net/ietf/draft/draft-leach-uuids-guids-01.html). It
-provides reasonably efficient and reliable framework for generating UUIDs and
-supports fairly high allocation rates -- 10 million per second per machine --
-and therefore is suitable for identifying both extremely short-lived and very
-persistent objects on a given system as well as across the network.
+(Lhttp://hegel.ittc.ku.edu/topics/internet/internet-drafts/draft-l/draft-leach...).
+It provides reasonably efficient and reliable framework for generating UUIDs
+and supports fairly high allocation rates -- 10 million per second per machine
+-- and therefore is suitable for identifying both extremely short-lived and
+very persistent objects on a given system as well as across the network.
This modules provides several methods to create a UUID:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/UUID.xs new/Data-UUID-0.143/UUID.xs
--- old/Data-UUID-0.11/UUID.xs 2003-08-27 21:38:35.000000000 +0200
+++ new/Data-UUID-0.143/UUID.xs 2006-09-18 04:10:24.000000000 +0200
@@ -3,28 +3,28 @@
#include "XSUB.h"
#include "UUID.h"
-static uuid_t NameSpace_DNS = { /* 6ba7b810-9dad-11d1-80b4-00c04fd430c8 */
+static perl_uuid_t NameSpace_DNS = { /* 6ba7b810-9dad-11d1-80b4-00c04fd430c8 */
0x6ba7b810,
0x9dad,
0x11d1,
0x80, 0xb4, { 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 }
};
-static uuid_t NameSpace_URL = { /* 6ba7b811-9dad-11d1-80b4-00c04fd430c8 */
+static perl_uuid_t NameSpace_URL = { /* 6ba7b811-9dad-11d1-80b4-00c04fd430c8 */
0x6ba7b811,
0x9dad,
0x11d1,
0x80, 0xb4, { 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 }
};
-static uuid_t NameSpace_OID = { /* 6ba7b812-9dad-11d1-80b4-00c04fd430c8 */
+static perl_uuid_t NameSpace_OID = { /* 6ba7b812-9dad-11d1-80b4-00c04fd430c8 */
0x6ba7b812,
0x9dad,
0x11d1,
0x80, 0xb4, { 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8 }
};
-uuid_t NameSpace_X500 = { /* 6ba7b814-9dad-11d1-80b4-00c04fd430c8 */
+perl_uuid_t NameSpace_X500 = { /* 6ba7b814-9dad-11d1-80b4-00c04fd430c8 */
0x6ba7b814,
0x9dad,
0x11d1,
@@ -32,9 +32,9 @@
};
static void format_uuid_v1(
- uuid_t *uuid,
+ perl_uuid_t *uuid,
unsigned16 clock_seq,
- uuid_time_t timestamp,
+ perl_uuid_time_t timestamp,
uuid_node_t node
) {
uuid->time_low = (unsigned long)(timestamp & 0xFFFFFFFF);
@@ -49,14 +49,14 @@
memcpy(&uuid->node, &node, sizeof uuid->node);
}
-static void get_current_time(uuid_time_t * timestamp) {
- uuid_time_t time_now;
- static uuid_time_t time_last;
+static void get_current_time(perl_uuid_time_t * timestamp) {
+ perl_uuid_time_t time_now;
+ static perl_uuid_time_t time_last;
static unsigned16 uuids_this_tick;
static int inited = 0;
if (!inited) {
- get_system_time(&time_now);
+ get_system_time(&time_last);
uuids_this_tick = UUIDS_PER_TICK;
inited = 1;
};
@@ -65,6 +65,7 @@
if (time_last != time_now) {
uuids_this_tick = 0;
+ time_last = time_now;
break;
};
if (uuids_this_tick < UUIDS_PER_TICK) {
@@ -77,7 +78,7 @@
static unsigned16 true_random(void) {
static int inited = 0;
- uuid_time_t time_now;
+ perl_uuid_time_t time_now;
if (!inited) {
get_system_time(&time_now);
@@ -89,10 +90,10 @@
}
static void format_uuid_v3(
- uuid_t *uuid,
+ perl_uuid_t *uuid,
unsigned char hash[16]
) {
- memcpy(uuid, hash, sizeof(uuid_t));
+ memcpy(uuid, hash, sizeof(perl_uuid_t));
uuid->time_low = ntohl(uuid->time_low);
uuid->time_mid = ntohs(uuid->time_mid);
@@ -104,8 +105,8 @@
uuid->clock_seq_hi_and_reserved |= 0x80;
}
-static void get_system_time(uuid_time_t *uuid_time) {
-#if defined __CYGWIN__ || __MINGW32__
+static void get_system_time(perl_uuid_time_t *perl_uuid_time) {
+#if defined __CYGWIN__ || __MINGW32__ || WIN32
/* ULARGE_INTEGER time; */
LARGE_INTEGER time;
@@ -117,19 +118,19 @@
(unsigned __int64) (60 * 60 * 24) *
(unsigned __int64) (17+30+31+365*18+5);
- *uuid_time = time.QuadPart;
+ *perl_uuid_time = time.QuadPart;
#else
struct timeval tp;
gettimeofday(&tp, (struct timezone *)0);
- *uuid_time = (tp.tv_sec * I64(10000000)) + (tp.tv_usec * I64(10)) +
+ *perl_uuid_time = (tp.tv_sec * I64(10000000)) + (tp.tv_usec * I64(10)) +
I64(0x01B21DD213814000);
#endif
}
static void get_random_info(unsigned char seed[16]) {
MD5_CTX c;
-#if defined __CYGWIN__ || __MINGW32__
+#if defined __CYGWIN__ || __MINGW32__ || WIN32
typedef struct {
MEMORYSTATUS m;
SYSTEM_INFO s;
@@ -150,7 +151,7 @@
MD5Init(&c);
-#if defined __CYGWIN__ || __MINGW32__
+#if defined __CYGWIN__ || __MINGW32__ || WIN32
GlobalMemoryStatus(&r.m);
GetSystemInfo(&r.s);
GetSystemTimeAsFileTime(&r.t);
@@ -168,7 +169,7 @@
MD5Final(seed, &c);
}
-SV* make_ret(const uuid_t u, int type) {
+SV* make_ret(const perl_uuid_t u, int type) {
char buf[BUFSIZ];
unsigned char *from, *to;
STRLEN len;
@@ -177,8 +178,8 @@
memset(buf, 0x00, BUFSIZ);
switch(type) {
case F_BIN:
- memcpy(buf, (void*)&u, sizeof(uuid_t));
- len = sizeof(uuid_t);
+ memcpy(buf, (void*)&u, sizeof(perl_uuid_t));
+ len = sizeof(perl_uuid_t);
break;
case F_STR:
sprintf(buf, "%8.8X-%4.4X-%4.4X-%2.2X%2.2X-", (unsigned int)u.time_low, u.time_mid,
@@ -237,7 +238,7 @@
SV *sv
char *s = SvPV(sv, len);
PPCODE:
- pv = 0; len = sizeof(uuid_t);
+ pv = 0; len = sizeof(perl_uuid_t);
if (strEQ(s,"NameSpace_DNS"))
pv = (char*)&NameSpace_DNS;
if (strEQ(s,"NameSpace_URL"))
@@ -255,7 +256,7 @@
PREINIT:
FILE *fd;
unsigned char seed[16];
- uuid_time_t timestamp;
+ perl_uuid_time_t timestamp;
mode_t mask;
CODE:
Newz(0,RETVAL,1,uuid_context_t);
@@ -266,8 +267,11 @@
RETVAL->next_save = timestamp;
}
if ((fd = fopen(UUID_NODEID_NV_STORE, "rb"))) {
+ pid_t *hate = (pid_t *) &(RETVAL->nodeid);
fread(&(RETVAL->nodeid), sizeof(uuid_node_t), 1, fd );
fclose(fd);
+
+ *hate += getpid();
} else {
get_random_info(seed);
seed[0] |= 0x80;
@@ -292,9 +296,9 @@
Data::UUID::create_hex = F_HEX
Data::UUID::create_b64 = F_B64
PREINIT:
- uuid_time_t timestamp;
+ perl_uuid_time_t timestamp;
unsigned16 clockseq;
- uuid_t uuid;
+ perl_uuid_t uuid;
FILE *fd;
mode_t mask;
PPCODE:
@@ -327,7 +331,7 @@
void
create_from_name(self,nsid,name)
uuid_context_t *self;
- uuid_t *nsid;
+ perl_uuid_t *nsid;
char *name;
ALIAS:
Data::UUID::create_from_name_bin = F_BIN
@@ -337,8 +341,8 @@
PREINIT:
MD5_CTX c;
unsigned char hash[16];
- uuid_t net_nsid;
- uuid_t uuid;
+ perl_uuid_t net_nsid;
+ perl_uuid_t uuid;
PPCODE:
net_nsid = *nsid;
net_nsid.time_low = htonl(net_nsid.time_low);
@@ -346,7 +350,7 @@
net_nsid.time_hi_and_version = htons(net_nsid.time_hi_and_version);
MD5Init(&c);
- MD5Update(&c, (unsigned char*)&net_nsid, sizeof(uuid_t));
+ MD5Update(&c, (unsigned char*)&net_nsid, sizeof(perl_uuid_t));
MD5Update(&c, (unsigned char*)name, strlen(name));
MD5Final(hash, &c);
@@ -357,8 +361,8 @@
int
compare(self,u1,u2)
uuid_context_t *self;
- uuid_t *u1;
- uuid_t *u2;
+ perl_uuid_t *u1;
+ perl_uuid_t *u2;
PREINIT:
int i;
CODE:
@@ -380,7 +384,7 @@
void
to_string(self,uuid)
uuid_context_t *self;
- uuid_t *uuid;
+ perl_uuid_t *uuid;
ALIAS:
Data::UUID::to_hexstring = F_HEX
Data::UUID::to_b64string = F_B64
@@ -396,7 +400,7 @@
Data::UUID::from_hexstring = F_HEX
Data::UUID::from_b64string = F_B64
PREINIT:
- uuid_t uuid;
+ perl_uuid_t uuid;
char *from, *to;
int i, c;
unsigned char buf[4];
@@ -406,10 +410,10 @@
case F_STR:
case F_HEX:
from = str;
- memset(&uuid, 0x00, sizeof(uuid_t));
+ memset(&uuid, 0x00, sizeof(perl_uuid_t));
if ( from[0] == '0' && from[1] == 'x' )
from += 2;
- for (i = 0; i < sizeof(uuid_t); i++) {
+ for (i = 0; i < sizeof(perl_uuid_t); i++) {
if (*from == '-')
from++;
if (sscanf(from, "%2x", &c) != 1)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/t/basic.t new/Data-UUID-0.143/t/basic.t
--- old/Data-UUID-0.11/t/basic.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Data-UUID-0.143/t/basic.t 2006-09-06 04:39:11.000000000 +0200
@@ -0,0 +1,35 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 56;
+
+BEGIN { use_ok('Data::UUID'); }
+
+my $ug = Data::UUID->new;
+isa_ok($ug, 'Data::UUID');
+
+ok(my $uuid1 = $ug->create(), "create a new uuid");
+ok(my $uuid2 = $ug->to_hexstring($uuid1), "hexstringify it");
+ok(my $uuid3 = $ug->from_string($uuid2), "create a uuid from that string");
+ok(!$ug->compare($uuid1, $uuid3), "they compare as equal");
+
+ok(my $uuid4 = $ug->to_b64string($uuid1), "get base64 string of original uuid");
+ok(my $uuid5 = $ug->to_b64string($uuid3), "get base64 string of from_string");
+is($uuid4, $uuid5, "those base64 strings are equal");
+
+ok(my $uuid6 = $ug->from_b64string($uuid5), "make uuid from the base64 string");
+ok(!$ug->compare($uuid6,$uuid1), "and it compares at equal, too");
+
+# some basic "all unique" tests
+my $HOW_MANY = 10;
+
+my @uuids;
+push @uuids, $ug->to_b64string($ug->create) for 0 .. ($HOW_MANY - 1);
+
+for my $i (0 .. ($HOW_MANY - 2)) {
+ for my $j ($i+1 .. ($HOW_MANY -1)) {
+ isnt($uuids[$i], $uuids[$j], "$uuids[$i] ne $uuids[$j]");
+ }
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/t/pod-coverage.t new/Data-UUID-0.143/t/pod-coverage.t
--- old/Data-UUID-0.11/t/pod-coverage.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Data-UUID-0.143/t/pod-coverage.t 2006-08-14 19:03:22.000000000 +0200
@@ -0,0 +1,32 @@
+use strict;
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.06";
+plan skip_all => "Test::Pod::Coverage 1.06 required for testing POD coverage"
+ if $@;
+
+# Doesn't this show you why the pod-coverage Kwalitee metric is bull?
+
+my $covered = [ map { qr/\A$_\z/ } qw(
+ compare
+ constant
+ create
+ create_b64
+ create_bin
+ create_from_name
+ create_from_name_b64
+ create_from_name_bin
+ create_from_name_hex
+ create_from_name_str
+ create_hex
+ create_str
+ from_b64string
+ from_hexstring
+ from_string
+ new
+ to_b64string
+ to_hexstring
+ to_string
+)];
+
+all_pod_coverage_ok({also_private => $covered });
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/t/pod.t new/Data-UUID-0.143/t/pod.t
--- old/Data-UUID-0.11/t/pod.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Data-UUID-0.143/t/pod.t 2006-08-14 19:03:22.000000000 +0200
@@ -0,0 +1,5 @@
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD"
+ if $@;
+all_pod_files_ok();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/test.pl new/Data-UUID-0.143/test.pl
--- old/Data-UUID-0.11/test.pl 2003-08-27 21:38:35.000000000 +0200
+++ new/Data-UUID-0.143/test.pl 1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-#########################
-
-# change 'tests => 1' to 'tests => last_test_to_print';
-
-use Test;
-BEGIN { plan tests => 11 };
-use Data::UUID;
-ok(1); # If we made it this far, we're ok.
-
-#########################
-
-# Insert your test code below, the Test module is use()ed here so read
-# its man page ( perldoc Test ) for help writing this test script.
-
-ok($ug = new Data::UUID);
-
-ok($uuid1 = $ug->create()); #3
-ok($uuid2 = $ug->to_hexstring($uuid1));
-ok($uuid3 = $ug->from_string($uuid2));
-ok(!$ug->compare($uuid1,$uuid3)); #6
-
-ok($uuid4 = $ug->to_b64string($uuid1));
-ok($uuid5 = $ug->to_b64string($uuid3));
-ok($uuid4 eq $uuid5);
-
-ok($uuid6 = $ug->from_b64string($uuid5));
-ok(!$ug->compare($uuid6,$uuid1)); #11
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Data-UUID-0.11/typemap new/Data-UUID-0.143/typemap
--- old/Data-UUID-0.11/typemap 2003-08-27 21:38:35.000000000 +0200
+++ new/Data-UUID-0.143/typemap 2006-08-14 19:03:22.000000000 +0200
@@ -1,4 +1,4 @@
-uuid_t* T_PV
+perl_uuid_t* T_PV
uuid_context_t* T_PTRUUID
INPUT
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org