Tue Mar 8 03:20:16 2011 UTC ()
Add a comment to the patch to document use of the openssl SHA1 API.


(brook)
diff -r1.1.1.1 -r1.2 pkgsrc/databases/postgresql-uuid/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/databases/postgresql-uuid/patches/patch-uuid.c

cvs diff -r1.1.1.1 -r1.2 pkgsrc/databases/postgresql-uuid/Attic/distinfo (switch to unified diff)

--- pkgsrc/databases/postgresql-uuid/Attic/distinfo 2011/03/05 17:54:35 1.1.1.1
+++ pkgsrc/databases/postgresql-uuid/Attic/distinfo 2011/03/08 03:20:16 1.2
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.1.1.1 2011/03/05 17:54:35 brook Exp $ 1$NetBSD: distinfo,v 1.2 2011/03/08 03:20:16 brook Exp $
2 2
3SHA1 (uuid-freebsd-1.0.2.tgz) = c472fc8b3a2ca7c325db1f2e6a289566260ce494 3SHA1 (uuid-freebsd-1.0.2.tgz) = c472fc8b3a2ca7c325db1f2e6a289566260ce494
4RMD160 (uuid-freebsd-1.0.2.tgz) = 90264bf8258f165b038c14d1eed3485121fcc2a6 4RMD160 (uuid-freebsd-1.0.2.tgz) = 90264bf8258f165b038c14d1eed3485121fcc2a6
5Size (uuid-freebsd-1.0.2.tgz) = 3055 bytes 5Size (uuid-freebsd-1.0.2.tgz) = 3055 bytes
6SHA1 (patch-Makefile) = 2ec9a8318c521e507ed839141474efdee0aef580 6SHA1 (patch-Makefile) = 2ec9a8318c521e507ed839141474efdee0aef580
7SHA1 (patch-uuid.c) = 59fe4b25bc310b3a3b190569ffbbf7d86516ccd3 7SHA1 (patch-uuid.c) = 957cd42d900886c70ca0bfc1642ad97ac074148c

cvs diff -r1.1.1.1 -r1.2 pkgsrc/databases/postgresql-uuid/patches/Attic/patch-uuid.c (switch to unified diff)

--- pkgsrc/databases/postgresql-uuid/patches/Attic/patch-uuid.c 2011/03/05 17:54:35 1.1.1.1
+++ pkgsrc/databases/postgresql-uuid/patches/Attic/patch-uuid.c 2011/03/08 03:20:16 1.2
@@ -1,32 +1,34 @@ @@ -1,32 +1,34 @@
1$NetBSD: patch-uuid.c,v 1.1.1.1 2011/03/05 17:54:35 brook Exp $ 1$NetBSD: patch-uuid.c,v 1.2 2011/03/08 03:20:16 brook Exp $
 2
 3Use the openssl SHA1 API instead of the FreeBSD API.
2 4
3--- uuid.c.orig 2010-03-14 03:04:29.000000000 -0600 5--- uuid.c.orig 2010-03-14 03:04:29.000000000 -0600
4+++ uuid.c 2011-02-12 10:51:10.000000000 -0700 6+++ uuid.c 2011-02-12 10:51:10.000000000 -0700
5@@ -40,7 +40,7 @@ 7@@ -40,7 +40,7 @@
6 #undef uuid_hash 8 #undef uuid_hash
7  9
8 #include <md5.h> 10 #include <md5.h>
9-#include <sha.h> 11-#include <sha.h>
10+#include <sha1.h> 12+#include <sha1.h>
11  13
12 PG_MODULE_MAGIC; 14 PG_MODULE_MAGIC;
13  15
14@@ -158,13 +158,13 @@ 16@@ -158,13 +158,13 @@
15  17
16 case 5: /* namespace-based SHA1 uuids */ 18 case 5: /* namespace-based SHA1 uuids */
17 { 19 {
18- SHA_CTX ctx; 20- SHA_CTX ctx;
19+ SHA1_CTX ctx; 21+ SHA1_CTX ctx;
20 unsigned char buf[20]; 22 unsigned char buf[20];
21  23
22- SHA1_Init(&ctx); 24- SHA1_Init(&ctx);
23- SHA1_Update(&ctx, ns, 16); 25- SHA1_Update(&ctx, ns, 16);
24- SHA1_Update(&ctx, (unsigned char *)ptr, len); 26- SHA1_Update(&ctx, (unsigned char *)ptr, len);
25- SHA1_Final(buf, &ctx); 27- SHA1_Final(buf, &ctx);
26+ SHA1Init(&ctx); 28+ SHA1Init(&ctx);
27+ SHA1Update(&ctx, ns, 16); 29+ SHA1Update(&ctx, ns, 16);
28+ SHA1Update(&ctx, (unsigned char *)ptr, len); 30+ SHA1Update(&ctx, (unsigned char *)ptr, len);
29+ SHA1Final(buf, &ctx); 31+ SHA1Final(buf, &ctx);
30  32
31 sprintf(strbuf, 33 sprintf(strbuf,
32 "%02x%02x%02x%02x-" 34 "%02x%02x%02x%02x-"