You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
4.5 KiB
113 lines
4.5 KiB
Index: Makefile.in |
|
--- Makefile.in.orig 2008-03-08 19:31:40.000000000 +0100 |
|
+++ Makefile.in 2015-01-12 18:31:58.826389476 +0100 |
|
@@ -112,7 +112,7 @@ |
|
@$(LIBTOOL) --mode=compile $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< |
|
|
|
$(LIB_NAME): $(LIB_OBJS) |
|
- @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \ |
|
+ @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) $(LIBS) -rpath $(libdir) \ |
|
-version-info `$(SHTOOL) version -l c -d libtool $(S)/uuid_vers.h` |
|
|
|
$(DCE_NAME): $(DCE_OBJS) |
|
Index: perl/Makefile.PL |
|
--- perl/Makefile.PL.orig 2007-01-01 19:13:18.000000000 +0100 |
|
+++ perl/Makefile.PL 2015-01-12 18:31:58.826389476 +0100 |
|
@@ -61,7 +61,7 @@ |
|
NO_META => 1, |
|
# cruel hack to workaround the conflict between OSSP uuid's |
|
# uuid_create() function and one from FreeBSD's libc |
|
- (( "$Config{'osname'}$Config{'osvers'}" =~ m/^freebsd[56]\./ |
|
+ (( "$Config{'osname'}$Config{'osvers'}" =~ m/^freebsd/ |
|
and $Config{'ld'} =~ m/cc$/ and -f "/usr/include/uuid.h") ? |
|
( LDDLFLAGS => $Config{'lddlflags'} . ' -Wl,-Bsymbolic') : ()) |
|
); |
|
Index: perl/uuid_compat.pm |
|
--- perl/uuid_compat.pm.orig 2008-07-04 23:41:37.000000000 +0200 |
|
+++ perl/uuid_compat.pm 2015-01-12 18:31:58.826389476 +0100 |
|
@@ -93,7 +93,9 @@ |
|
$uuid->import('str', |
|
$str =~ /^0x/ |
|
? join '-', unpack('x2 a8 a4 a4 a4 a12', $str) |
|
- : $str |
|
+ : $str =~ /-/ |
|
+ ? $str |
|
+ : join '-', unpack('A8 A4 A4 A4 A12', $str) |
|
); |
|
return $uuid->export('bin'); |
|
} |
|
@@ -157,6 +159,12 @@ |
|
return $self->to_b64string($self->create); |
|
} |
|
|
|
+sub create_bin { |
|
+ my ($self) = @_; |
|
+ return $self->create($self); |
|
+} |
|
+ |
|
+ |
|
sub create_from_name_str { |
|
my $self = shift; |
|
return $self->to_string($self->create_from_name(@_)); |
|
Index: perl/uuid_compat.ts |
|
--- perl/uuid_compat.ts.orig 2007-01-01 19:13:22.000000000 +0100 |
|
+++ perl/uuid_compat.ts 2015-01-12 18:31:58.826389476 +0100 |
|
@@ -28,7 +28,7 @@ |
|
## uuid_compat.ts: Data::UUID Backward Compatibility Perl API (Perl test suite part) |
|
## |
|
|
|
-use Test::More tests => 14; |
|
+use Test::More tests => 16; |
|
|
|
BEGIN { |
|
use_ok('Data::UUID'); |
|
@@ -53,3 +53,5 @@ |
|
ok($uuid8 = $ug->from_string("6ba7b811-9dad-11d1-80b4-00c04fd430c8")); |
|
ok($ug->compare($uuid7, $uuid8) == 0); |
|
|
|
+ok($uuid9 = $ug->from_string("6ba7b8119dad11d180b400c04fd430c8")); |
|
+ok($ug->compare($uuid7, $uuid9) == 0); |
|
Index: uuid_cli.c |
|
--- uuid_cli.c.orig 2008-03-07 11:49:59.000000000 +0100 |
|
+++ uuid_cli.c 2015-01-12 18:31:58.826389476 +0100 |
|
@@ -140,11 +140,12 @@ |
|
i = strtol(optarg, &p, 10); |
|
if (*p != '\0') |
|
usage("invalid argument to option 'v'"); |
|
+ version &= ~(UUID_MAKE_V1|UUID_MAKE_V3|UUID_MAKE_V4|UUID_MAKE_V5); |
|
switch (i) { |
|
- case 1: version = UUID_MAKE_V1; break; |
|
- case 3: version = UUID_MAKE_V3; break; |
|
- case 4: version = UUID_MAKE_V4; break; |
|
- case 5: version = UUID_MAKE_V5; break; |
|
+ case 1: version |= UUID_MAKE_V1; break; |
|
+ case 3: version |= UUID_MAKE_V3; break; |
|
+ case 4: version |= UUID_MAKE_V4; break; |
|
+ case 5: version |= UUID_MAKE_V5; break; |
|
default: |
|
usage("invalid version on option 'v'"); |
|
break; |
|
@@ -213,10 +214,10 @@ |
|
} |
|
else { |
|
/* encoding */ |
|
- if ( (version == UUID_MAKE_V1 && argc != 0) |
|
- || (version == UUID_MAKE_V3 && argc != 2) |
|
- || (version == UUID_MAKE_V4 && argc != 0) |
|
- || (version == UUID_MAKE_V5 && argc != 2)) |
|
+ if ( (version & UUID_MAKE_V1 && argc != 0) |
|
+ || (version & UUID_MAKE_V3 && argc != 2) |
|
+ || (version & UUID_MAKE_V4 && argc != 0) |
|
+ || (version & UUID_MAKE_V5 && argc != 2)) |
|
usage("invalid number of arguments"); |
|
if ((rc = uuid_create(&uuid)) != UUID_RC_OK) |
|
error(1, "uuid_create: %s", uuid_error(rc)); |
|
@@ -232,7 +233,7 @@ |
|
if ((rc = uuid_load(uuid, "nil")) != UUID_RC_OK) |
|
error(1, "uuid_load: %s", uuid_error(rc)); |
|
} |
|
- if (version == UUID_MAKE_V3 || version == UUID_MAKE_V5) { |
|
+ if (version & UUID_MAKE_V3 || version & UUID_MAKE_V5) { |
|
if ((rc = uuid_create(&uuid_ns)) != UUID_RC_OK) |
|
error(1, "uuid_create: %s", uuid_error(rc)); |
|
if ((rc = uuid_load(uuid_ns, argv[0])) != UUID_RC_OK) {
|
|
|