Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: gcrypt

socklen_t usage in gcrypt.h

 

 

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded


gcrypt-devel at mlists

Jan 21, 2005, 4:14 PM

Post #1 of 3 (1629 views)
Permalink
socklen_t usage in gcrypt.h

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?

--
albert chin (china [at] thewrittenword)


jas at extundo

Jan 21, 2005, 4:29 PM

Post #2 of 3 (1548 views)
Permalink
Re: socklen_t usage in gcrypt.h [In reply to]

Albert Chin <gcrypt-devel [at] mlists> 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


marcus.brinkmann at ruhr-uni-bochum

Oct 10, 2006, 11:06 AM

Post #3 of 3 (1519 views)
Permalink
Re: socklen_t usage in gcrypt.h [In reply to]

At Fri, 21 Jan 2005 17:14:50 -0600,
Albert Chin <gcrypt-devel [at] mlists> wrote:
>
> 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?

I have put a fix for this in SVN rev 1180. I would be happy to hear
from you if this helps, or if more is needed.

See also https://bugs.g10code.com/gnupg/issue698 for more details.

Thanks,
Marcus


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.