delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/21/10:58:59

X-Spam-Check-By: sourceware.org
Date: Fri, 21 Apr 2006 16:58:46 +0200
From: Samuel Thibault <samuel DOT thibault AT ens-lyon DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: htonl, htons, ntohl and ntohs types
Message-ID: <20060421145846.GL4189@implementation>
Mail-Followup-To: cygwin AT cygwin DOT com
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> <20060421143237 DOT GB22885 AT calimero DOT vinschen DOT de> <20060421144831 DOT GD16326 AT tuxedo DOT skovlyporten DOT dk>
Mime-Version: 1.0
In-Reply-To: <20060421144831.GD16326@tuxedo.skovlyporten.dk>
User-Agent: Mutt/1.5.11
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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:
> > 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.
> 
> 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.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019