From owner-freebsd-questions Mon Aug 5 12:27:38 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00DF137B400 for ; Mon, 5 Aug 2002 12:27:36 -0700 (PDT) Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2965443E3B for ; Mon, 5 Aug 2002 12:27:35 -0700 (PDT) (envelope-from scott.mitchell@mail.com) Received: from fishballoon.dyndns.org ([80.4.0.215]) by mta03-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020805192734.JQIX23840.mta03-svc.ntlworld.com@fishballoon.dyndns.org>; Mon, 5 Aug 2002 20:27:34 +0100 Received: from tuatara.goatsucker.org (tuatara [192.168.1.6]) by fishballoon.dyndns.org (8.12.3/8.12.3) with ESMTP id g75JRX99092983; Mon, 5 Aug 2002 20:27:33 +0100 (BST) (envelope-from scott@tuatara.goatsucker.org) Received: (from scott@localhost) by tuatara.goatsucker.org (8.12.3/8.12.3/Submit) id g75JRXGP003222; Mon, 5 Aug 2002 20:27:33 +0100 (BST) (envelope-from scott) Date: Mon, 5 Aug 2002 20:27:33 +0100 From: Scott Mitchell To: "Balaji, Pavan" Cc: "'Matthew Seaman'" , "'freebsd-questions@freebsd.org'" Subject: Re: GCC versions!!! Message-ID: <20020805202733.B376@fishballoon.dyndns.org> References: <3D386AED1B47D411A94300508B11F18704AD699A@fmsmsx116.fm.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3D386AED1B47D411A94300508B11F18704AD699A@fmsmsx116.fm.intel.com>; from pavan.balaji@intel.com on Mon, Aug 05, 2002 at 12:11:39PM -0700 X-Operating-System: FreeBSD 4.6-STABLE i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Aug 05, 2002 at 12:11:39PM -0700, Balaji, Pavan wrote: > > That was my guess. But, now how do I set it right, if I'm working on > transferring data between two such machines? > > > Pavan Balaji, > Intel Corporation > Email: pavan.balaji@intel.com The usual solution is to make sure the bytes of your ints/longs/whatever are written to the disk/network/whatever in a known order (usually big-endian, but it doesn't matter, as long as you know what it is), and rearranging them (if necessary) into the native byte order when you read them back again. man htonl for an overview of the library functions that do this for you. HTH, Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott.mitchell@mail.com | 0xAA775B8B | -- Anon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message