* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h.in,v 1.118 2009/09/01 00:22:24 jinmei Exp $ */
+/* $Id: config.h.in,v 1.119 2009/09/01 17:54:16 jinmei Exp $ */
/*! \file */
/* Define to the flags type used by getnameinfo(3). */
#undef IRS_GETNAMEINFO_FLAGS_T
+/* Define to the return type of gai_strerror(3). */
+#undef IRS_GAISTRERROR_RETURN_T
+
/* Define if connect does not honour the permission on the UNIX domain socket.
*/
#undef NEED_SECURE_DIRECTORY
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.474 $)
+AC_REVISION($Revision: 1.475 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])
+#
+# ...and same for gai_strerror().
+#
+AC_MSG_CHECKING(for gai_strerror prototype definitions)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+char *gai_strerror(int ecode);],
+[ return (0); ],
+ [AC_MSG_RESULT(returning char *)
+ AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [char *],
+ [return type of gai_srerror])],
+[AC_MSG_RESULT(not match any subspecies; assume standard definition)])
+AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [const char *])
+
AC_CHECK_FUNC(getipnodebyname,
[ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
[ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: gai_strerror.c,v 1.3 2009/09/01 03:43:27 jinmei Exp $ */
+/* $Id: gai_strerror.c,v 1.4 2009/09/01 17:54:16 jinmei Exp $ */
/*! \file gai_strerror.c
* gai_strerror() returns an error message corresponding to an
* Returns an error message corresponding to an error code returned by
* getaddrinfo() and getnameinfo()
*/
-const char *
+IRS_GAISTRERROR_RETURN_T
gai_strerror(int ecode) {
union {
const char *const_ptr;