[prev in list] [next in list] [prev in thread] [next in thread]
List: gcrypt-devel
Subject: Re: socklen_t usage in gcrypt.h
From: Simon Josefsson <jas () extundo ! com>
Date: 2005-01-21 23:29:52
Message-ID: ilu1xcewebz.fsf () latte ! josefsson ! org
[Download RAW message or body]
Albert Chin <gcrypt-devel@mlists.thewrittenword.com> writes:
> gcrypt assumes socklen_t exists on the system. This is not the case
> for Solaris 2.6, HP-UX 10.20, and Tru64 UNIX 4.0D. Should I modify
> gcrypt.h accordingly or should callers be expected to provide a
> socklen_t equivalent?
IMHO, since socklen_t is POSIX, callers should provide an equivalent.
I do that successfully in several projects using this snippet (I
sometime use 'int' instead of 'size_t'):
AC_CHECK_TYPE([socklen_t],, [AC_DEFINE([socklen_t], [size_t],
[Define to `size_t' if `socklen_t' is missing.])], [
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
])
Hope this helps,
Simon
_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic