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 14:11, Lars Munch wrote:
> My code still gives me warnings due to a problem with stdint.h.
> 
> The Xint32_t typedef's uses long instead of int:
> 
> >From stdint.h:
> 
> typedef long int32_t;
> typedef unsigned long uint32_t;
> 
> I think they should be:
> 
> typedef int int32_t;
> typedef unsigned int uint32_t;

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.


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]