git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Pavel Roskin <proski@gnu.org>
Cc: Horst von Brand <vonbrand@inf.utfsm.cl>, git <git@vger.kernel.org>
Subject: Re: [PATCH] Fix gcc-4 warning in accept() call
Date: Thu, 29 Sep 2005 21:46:18 -0700	[thread overview]
Message-ID: <433CC31A.9090808@zytor.com> (raw)
In-Reply-To: <20050930000917.rrwggw4g0gogs8w4@webmail.spamcop.net>

Pavel Roskin wrote:
> Quoting Horst von Brand <vonbrand@inf.utfsm.cl>:
> 
> 
>>>+				unsigned int sslen = sizeof(ss);
>>
>>Shouldn't this be size_t?
> 
> 
> No.  That would actually break things on big-endian 64-bit platforms.
> 
> You can see "info libc" for the whole story.  My (limited!) understanding is
> that it should be 32-bit for compatibility reasons, so socklen_t was a trick to
> fool size_t proponents from the POSIX committee :-)
> 

Formally it should be "socklen_t" or "int".  It should *not* be 
"unsigned int"!

	-hpa

  reply	other threads:[~2005-09-30  4:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-29 21:05 [PATCH] Fix gcc-4 warning in accept() call Pavel Roskin
2005-09-29 23:11 ` Horst von Brand
2005-09-30  4:09   ` Pavel Roskin
2005-09-30  4:46     ` H. Peter Anvin [this message]
2005-09-30  5:49 ` Junio C Hamano
2005-09-30  5:53   ` H. Peter Anvin
2005-09-30  5:58     ` H. Peter Anvin
2005-09-30  6:21       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=433CC31A.9090808@zytor.com \
    --to=hpa@zytor.com \
    --cc=git@vger.kernel.org \
    --cc=proski@gnu.org \
    --cc=vonbrand@inf.utfsm.cl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).