This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: htonl, htons, ntohl and ntohs types


On Apr 21 16:58, Samuel Thibault wrote:
> Lars Munch, le Fri 21 Apr 2006 16:48:31 +0200, a écrit :
> > On Fri, Apr 21, 2006 at 04:32:37PM +0200, Corinna Vinschen wrote:
> > > That's a problem with the code you're working on.  If it relies on the
> > > fact that int32_t resp. uint32_t are typedef'ed as "int", then it
> > > contradicts the purpose of stdint.h, which is, not relying on the
> > > definition of underlying datatypes.
> > 
> > Thanks for the explanation and you are absolutely right, but isn't using
> > long instead of int a potential problem, since long is usually 64bit on
> > a 64bit system whereas int is usually 32 bit and both 32bit and 64bit
> > systems? 
> 
> When 64bits will be supported, there will be an ifdef here.

It's that simple :-)


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]