Index: ossp-pkg/uuid/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/ChangeLog,v rcsdiff -q -kk '-r1.23' '-r1.24' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/ChangeLog,v' 2>/dev/null --- ChangeLog 2004/01/16 15:55:13 1.23 +++ ChangeLog 2004/01/17 14:21:57 1.24 @@ -11,6 +11,11 @@ This is a list of all changes to OSSP uuid. For a more brief summary please have a look at the NEWS file. + Changes between 0.9.3 and 0.9.4 (16-Jan-2004 to xx-Jan-2004) + + o Recognize special "Nil UUID" on decoding in uuid_dump(). + [Ralf S. Engelschall] + Changes between 0.9.2 and 0.9.3 (15-Jan-2004 to 16-Jan-2004) o Tested OSSP uuid on 16 particular Unix platforms and list Index: ossp-pkg/uuid/uuid.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.c,v rcsdiff -q -kk '-r1.32' '-r1.33' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.c,v' 2>/dev/null --- uuid.c 2004/01/16 12:20:45 1.32 +++ uuid.c 2004/01/17 14:21:57 1.33 @@ -781,6 +781,7 @@ time_t t_sec; char buf[19+1]; /* YYYY-MM-DD HH:MM:SS */ struct tm *tm; + int r; /* sanity check argument(s) */ if (uuid == NULL || str == NULL) @@ -794,6 +795,14 @@ uuid_format(uuid, &s); str_rsprintf(str, "UUID: %s\n", s); + /* short-circuit special case of 'nil UUID' */ + if (uuid_isnil(uuid, &r), r) { + str_rsprintf(str, "variant: [none]\n" + "version: [none]\n" + "content: Nil UUID\n"); + return UUID_RC_OK; + } + /* decode UUID variant */ variant = "unknown"; tmp8 = uuid->obj.clock_seq_hi_and_reserved;