bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: socklen_t


From: Simon Josefsson
Subject: Re: socklen_t
Date: Thu, 01 Sep 2005 12:06:21 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Normally <sys/types.h> and <sys/socket.h> should be sufficient to get
> socklen_t. Which are the systems where it needs <netdb.h>?

I don't know; POSIX says both sys/socket.h and netdb.h should declare
socklen_t, I was thinking of the case where a system doesn't have
sys/socket.h but has netdb.h.  Do you think we should only test for it
in sys/types.h + sys/socket.h?

There is a problem, of course, if it _is_ defined in netdb.h and the
application include that header file, but the test does not look
there.  Then there will be a type conflict.

Perhaps the M4 macro should create a socklen.h that include the proper
header files that is required to get the socklen_t type?  That would
be the most flexible, I think.  But it has the disadvantage that
applications need to include socklen.h, instead of simply using
socklen_t directly without worrying.

Thanks,
Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]