From owner-p4-projects Sat May 25 17:28:42 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8F5DC37B406; Sat, 25 May 2002 17:28:38 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D1E9E37B404 for ; Sat, 25 May 2002 17:28:37 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4Q0Sb392384 for perforce@freebsd.org; Sat, 25 May 2002 17:28:37 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sat, 25 May 2002 17:28:37 -0700 (PDT) Message-Id: <200205260028.g4Q0Sb392384@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar Subject: PERFORCE change 11888 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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