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 13:30:27 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

>> 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.
>
> We need to somehow avoid the type conflict in that case. The goal should
> be that
>   #include "config.h"
>   #include <sys/types.h>
>   #include <sys/socket.h>
> defines socklen_t.
>
> Like we do with EILSEQ: There are some systems which define it in <wchar.h>
> but not in <errno.h>. So we needed to somehow transport the definition from
> <wchar.h> to config.h, so that
>   #include "config.h"
>   #include <errno.h>
> is sufficient to define EILSEQ.

Where is the EILSEQ code?  I don't find anything in gnulib.

>> 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.
>
> It is the most flexible, yes. But unless needed, I would prefer the
> solution that is simpler for the application programs.

Agreed.  Perhaps Albert's code would work.

Thanks,
Simon




reply via email to

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