Date: Sat, 25 May 2002 17:28:37 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 11888 for review Message-ID: <200205260028.g4Q0Sb392384@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=11888 Change 11888 by marcel@marcel_vaio on 2002/05/25 17:27:48 Properly deal with byte-order the timestamp is little-endian, whereas the clock sequence is big-endian. Make this work on BE machines as well. Affected files ... ... //depot/projects/ia64/usr.bin/uuidgen/uuidgen.c#2 edit Differences ... ==== //depot/projects/ia64/usr.bin/uuidgen/uuidgen.c#2 (text+ko) ==== @@ -47,8 +47,9 @@ void uuid_print(uuid_t *uuid) { - printf("%08x-%04x-%04x-%04x-", uuid->time_low, uuid->time_med, - uuid->time_hi, uuid->seq); + printf("%08x-%04x-%04x-%04x-", le32toh(uuid->time_low), + le16toh(uuid->time_med), le16toh(uuid->time_hi), + be16toh(uuid->seq)); printf("%02x%02x%02x%02x%02x%02x\n", uuid->node[0], uuid->node[1], uuid->node[2], uuid->node[3], uuid->node[4], uuid->node[5]); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205260028.g4Q0Sb392384>