unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* SIN_LEN and SIN_LEN6 in libguile/socket.c
@ 2004-08-24 20:16 Michael Tuexen
  2004-08-25  0:39 ` Kevin Ryde
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Tuexen @ 2004-08-24 20:16 UTC (permalink / raw)


Dear all,

the sin_len and sin_len6 field is not available on all platforms. 
Therefore
the code setting these fields is #ifdefed. But there are not tests in
the configure scripts to test for these fields and depending on that
defining SIN_LEN or SIN_LEN6 or not.

I think something like

AC_MSG_CHECKING(for sin_len)
AC_TRY_COMPILE([#ifdef HAVE_SYS_TYPES_H
                 #include <sys/types.h>
                 #endif
                 #include <netinet/in.h>],
                [struct sockaddr_in x; x.sin_len = 0;],
                [AC_DEFINE(HAVE_SIN_LEN, 1 [Define this if your IPv4 has 
sin_len in sockaddr_in struct.])
                 AC_MSG_RESULT(yes)],
                [AC_MSG_RESULT(no)])

AC_MSG_CHECKING(for sin6_len)
AC_TRY_COMPILE([#ifdef HAVE_SYS_TYPES_H
                 #include <sys/types.h>
                 #endif
                 #include <netinet/in.h>],
                [struct sockaddr_in6 x; x.sin6_len = 0;],
                [AC_DEFINE(HAVE_SIN6_LEN, 1, [Define this if your IPv6 
has sin6_len in sockaddr_in6 struct.])
                 AC_MSG_RESULT(yes)],
                [AC_MSG_RESULT(no)])

should be added to configure.in and SIN_LEN/SIN_LEN6 should be changed 
to HAVE_SIN_LEN/HAVE_SIN6_LEN
to be consistent with other names.

Best regards
Michael



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-27  1:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-24 20:16 SIN_LEN and SIN_LEN6 in libguile/socket.c Michael Tuexen
2004-08-25  0:39 ` Kevin Ryde
2004-08-25  9:40   ` Michael Tuexen
2004-08-27  1:11     ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).