Simon Josefsson wrote: > > - sys/socket.h is currently included. It is not needed on OpenBSD 3.4. > > But it is needed for 'socklen_t' to be defined portably, I think - look > > at socklen.m4. > > Strictly, I don't believe it is needed -- arpa/inet.h must provide a > prototype for inet_ntop and consequently also make sure socklen_t is > available.
The "consequently" is a false deduction. Look how glibc does it is numerous places: They define a private equivalent of the type - would be __socklen_t here - and use this private equivalent in the function prototypes. So you can have a prototype with a type identical to socklen_t but socklen_t is nevertheless not visible. > Hence, all code that use > socklen_t will need to include that file, conditioned on > HAVE_SYS_SOCKET_H. Perhaps this: > > #ifdef HAVE_SYS_SOCKET_H > # include <sys/socket.h> > #endif > > should go into modules/socklen's Include statement then? Yes, I agree. Similarly, I propose to modify modules/ssize as follows: *** modules/ssize_t 15 Aug 2005 12:12:53 -0000 1.2 --- modules/ssize_t 9 Jan 2006 20:42:54 -0000 *************** *** 12,17 **** --- 12,18 ---- Makefile.am: Include: + #include <sys/types.h> License: unlimited Bruno _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib