+2002-07-05 Ken Raeburn <raeburn@mit.edu>
+
+ * port-sockets.h (SOCKET_WRITEV) [!_WIN32]: Use TMP after setting
+ it, to silence compiler warnings.
+
2002-06-26 Ezra Peisach <epeisach@bu.edu>
* configure.in: Modify test for in6addr_any definition in C
AC_PROG_AWK
AC_PROG_LEX
AC_C_CONST
-AC_CHECK_FUNCS(strdup labs setvbuf memmove bcopy inet_ntoa inet_aton gethostbyname_r gethostbyaddr_r getservbyname_r getservbyport_r seteuid setresuid setreuid setegid setresgid setregid)
+AC_CHECK_FUNCS(strdup labs setvbuf memmove bcopy inet_ntoa inet_aton seteuid setresuid setreuid setegid setresgid setregid)
dnl
dnl Check what the return types for gethostbyname_r and getservbyname_r are.
dnl
+AC_CHECK_FUNC(gethostbyname_r,[
+ac_cv_func_gethostbyname_r=yes
if test "$ac_cv_func_gethostbyname_r" = yes; then
AC_MSG_CHECKING([if gethostbyname_r returns an int])
AC_CACHE_VAL(krb5_cv_gethostbyname_r_returns_int,
AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT, 1, [Define if gethostbyname_r returns int rather than struct hostent * ])
fi
fi
+if test "$ac_cv_func_gethostbyname_r" = yes; then
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1, [Define if gethostbyname_r exists and its return type is known])
+ AC_CHECK_FUNC(gethostbyaddr_r)
+fi
+])
dnl
+AC_CHECK_FUNC(getservbyname_r,[
+ac_cv_func_getservbyname_r=yes
if test "$ac_cv_func_getservbyname_r" = yes; then
AC_MSG_CHECKING([if getservbyname_r returns an int])
AC_CACHE_VAL(krb5_cv_getservbyname_r_returns_int,
AC_DEFINE(GETSERVBYNAME_R_RETURNS_INT, 1, [Define if getservbyname_r returns int rather than struct servent * ])
fi
fi
+if test "$ac_cv_func_getservbyname_r" = yes; then
+ AC_DEFINE(HAVE_GETSERVBYNAME_R, 1, [Define if getservbyname_r exists and its return type is known])
+ AC_CHECK_FUNC(getservbyport_r)
+fi
+])
dnl
HAVE_YYLINENO
CHECK_DIRENT
#endif
#ifdef _WIN32
-#define HAVE_GETADDRINFO
-#define HAVE_GETNAMEINFO
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETNAMEINFO 1
#endif
#define HAVE_FAKE_GETADDRINFO /* was not originally HAVE_GETADDRINFO */
#define HAVE_GETADDRINFO
#undef HAVE_GETNAMEINFO
-#define HAVE_GETNAMEINFO
+#define HAVE_GETNAMEINFO 1
static
char *gai_strerror (int code);
#endif
#ifdef NEED_FAKE_GETADDRINFO
+#include <string.h> /* for strspn */
static inline int translate_h_errno (int h);
#endif
} else {
int herr;
- GET_HOST_BY_ADDR(&sinp->sin_addr, sizeof (struct in_addr),
+ GET_HOST_BY_ADDR((const char *) &sinp->sin_addr,
+ sizeof (struct in_addr),
sa->sa_family, hp, herr);
if (hp == 0) {
if (herr == NO_ADDRESS && !(flags & NI_NAMEREQD)) /* ??? */
/* Use TMP to avoid compiler warnings and keep things consistent with
Windoze version. */
#define SOCKET_WRITEV(FD, SG, LEN, TMP) \
- ((TMP) = writev((FD), (SG), (LEN)))
+ ((TMP) = writev((FD), (SG), (LEN)), (TMP))
#define SHUTDOWN_READ 0
#define SHUTDOWN_WRITE 1