>>>>> "lb" == lars brinkhoff <[EMAIL PROTECTED]> writes:

lb> For comparision, this is what I use in an application of mine.  I
lb> haven't heard any complaints from Solaris users, but I guess they have
lb> just ignored any compilations warnings.

I don't include <sys/types.h>.  The standard says I shouldn't have
to.  But autoconf is about the real world as much as it is about standards...

I don't use caches.  See previous thread on this mailing list
"config.cache considered harmful".

I think checking for size_t as well as int is useful, since they may
indeed be different sizes, which will affect correctness, as well as
compilation warnings.

Obviously, both our examples need improvement to be incorporated into
autoconf.  I'll leave that to the hard-working autoconf maintainers.

lb> dnl HTTPTUNNEL_TYPE_SOCKLEN_T
lb> dnl Check for the existance of type socklen_t.

lb> AC_DEFUN(HTTPTUNNEL_TYPE_SOCKLEN_T,
lb> [AC_CACHE_CHECK([for socklen_t], ac_cv_httptunnel_type_socklen_t,
lb> [
lb>   AC_TRY_COMPILE(
lb>   [#include <sys/types.h>
lb>    #include <sys/socket.h>],
lb>   [socklen_t len = 42; return 0;],
lb>   ac_cv_httptunnel_type_socklen_t=yes,
lb>   ac_cv_httptunnel_type_socklen_t=no)
lb> ])
lb>   if test $ac_cv_httptunnel_type_socklen_t != yes; then
lb>     AC_DEFINE(socklen_t, int)
lb>   fi
lb> ])

Reply via email to