Albert Chin <[EMAIL PROTECTED]> writes: > We created the following macro for curl. It's been tested on the > following systems:
Has the copyright been assigned to the FSF? > dnl Check for socklen_t: historically on BSD it is an int, and in > dnl POSIX 1g it is a type of its own, but some platforms use different > dnl types for the argument to getsockopt, getpeername, etc. So we > dnl have to test to find something that will work. > AC_DEFUN([TYPE_SOCKLEN_T], > [ > AC_CHECK_TYPE([socklen_t], ,[ > AC_MSG_CHECKING([for socklen_t equivalent]) > AC_CACHE_VAL([socklen_t_equiv], > [ > # Systems have either "struct sockaddr *" or > # "void *" as the second argument to getpeername > socklen_t_equiv= > for arg2 in "struct sockaddr" void; do > for t in int size_t unsigned long "unsigned long"; do > AC_TRY_COMPILE([ > #include <sys/types.h> > #include <sys/socket.h> > > int getpeername (int, $arg2 *, $t *); A bit weird approach of checking for a compatible type, perhaps, but if it works, then I'm all for it. Bruno, what do you think? Thanks, Simon _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib