Simon Josefsson wrote: > 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.
Yes, this is the case that can cause trouble. Some very old systems fall in this category. > Do you think we should only test for it in sys/types.h + sys/socket.h? Yes. > 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. > 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. Bruno _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib