From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
Subject: Re: libc
Date: Mon, 21 Jul 1997 21:41:05 -0600 (MDT) [thread overview]
Message-ID: <199707220341.VAA16915@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <33D4B218.7137@home.com>
>
> I am running RedHat-4.2 an an Alpha box. The problem is with libc.
> Whenever I compile something with socket code I get warnings about
> incompatable pointer types in accept() and a few other important calls.
Never, NEVER, provide your own declarations for functions declared
in system headers.
> The network functions in question use size_t rather then int as
> they should.
Headers, i.e. <sys/socket.h> say:
extern int __connect __P ((int __fd,
__CONST_SOCKADDR_ARG __addr, size_t __len));
extern int connect __P ((int __fd,
__CONST_SOCKADDR_ARG __addr, size_t __len));
while indeed manpage says that the third argument is int. But
system headers have a precedence. This is what libraries really expect.
The same goes for other socket functions.
> This causes some
> network programs to be really broken.
Not really. If you avoid shoddy programming practices and include proper
headers, instead of second-guessing them, they work like advertised.
I strongly suspect that size_t above is a POSIX requirement although
I do not know that for sure. Anybody can confirm/refute?
Manpages indeed should be fixed to agree with what is in headers.
Michal
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next parent reply other threads:[~1997-07-22 3:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <33D4B218.7137@home.com>
1997-07-22 3:41 ` Michal Jaegermann [this message]
1997-07-22 5:52 ` libc Richard Henderson
1997-07-22 3:45 libc Greg Lindahl
1997-07-22 12:40 ` libc Michael Alan Dorman
-- strict thread matches above, loose matches on Subject: below --
1997-07-22 13:14 libc Ryan Benigno
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox