X-Spam-Check-By: sourceware.org Message-ID: <444A24A9.9070002@byu.net> Date: Sat, 22 Apr 2006 06:42:17 -0600 From: Eric Blake User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: htonl, htons, ntohl and ntohs types References: <20060421092508 DOT GA15855 AT tuxedo DOT skovlyporten DOT dk> <20060421100000 DOT GC12661 AT calimero DOT vinschen DOT de> <20060421121151 DOT GA16022 AT tuxedo DOT skovlyporten DOT dk> <20060421121713 DOT GB4189 AT implementation> In-Reply-To: <20060421121713.GB4189@implementation> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Samuel Thibault on 4/21/2006 6:17 AM: >> >> The Xint32_t typedef's uses long instead of int: > > That's on purpose: on windows, ints are 16bits. Maybe in Microsoft, but this is the cygwin list, and in cygwin, ints are 32 bits. And until someone ports cygwin to a 64-bit version of Windows, longs are also 32 bits. Using uint32_t isolates you from whatever size the underlying int or long are while guaranteeing 32-bit semantics; and your code is buggy if it depends on the underlying type of uint32_t. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFESiSp84KuGfSFAYARAnaKAKCLNxPheRrq/wNI1t1zgC+11G0svQCgpWVQ J1GqALOnATNqSDzU3qxrSog= =Qb1n -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/