This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3688: Somehow, an int is getting involved when getting sizeof a struct sockaddr variable.
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, jap3003+gcc at ksu dot edu, nobody at gcc dot gnu dot org, rodrigc at gcc dot gnu dot org
- Subject: Re: c++/3688: Somehow, an int is getting involved when getting sizeof a struct sockaddr variable.
- From: rodrigc at gcc dot gnu dot org
- Date: 2 Sep 2001 09:03:03 -0000
Synopsis: Somehow, an int is getting involved when getting sizeof a struct sockaddr variable.
State-Changed-From-To: open->feedback
State-Changed-By: rodrigc
State-Changed-When: Sun Sep 2 02:03:03 2001
State-Changed-Why:
I don't think gcc is at fault.
Between Solaris 2.6 and 2.8, the function prototype
of a lot of the socket functions like accept() have
changed to accept socklen_t. This was done in accordance
with the Single Unix Specification, version 2:
http://www.opengroup.org/onlinepubs/007908799/xns/accept.html
The reason for having socklen_t instead of int, is to have
networking code which works correctly on 64-bit and 32-bit
platforms.
You need to report this problem to the mozilla project,
where they need to fix their socket code so that it works
on platforms which use socklen_t, and on platforms without
socklen_t.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3688&database=gcc