X-Spam-Check-By: sourceware.org
Message-ID: <444A24A9.9070002@byu.net>
Date: Sat, 22 Apr 2006 06:42:17 -0600
From: Eric Blake <ebb9@byu.net>
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: htonl, htons, ntohl and ntohs types
References: <20060421092508.GA15855@tuxedo.skovlyporten.dk> <20060421100000.GC12661@calimero.vinschen.de> <20060421121151.GA16022@tuxedo.skovlyporten.dk> <20060421121713.GB4189@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@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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@byu.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/

