diff --git a/acconfig.h b/acconfig.h
index 87e1d7cc35efc795b6510a89f035165c7a2ee363..cdb353e6630c467fb4680f28078e57ac2c914c24 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -10,8 +10,20 @@
 /* Define cpu-machine-OS */
 #undef OS
 
-/* Number of arguments your gethostbyaddr_r() function accepts */
-#undef GETHOSTBYADDR_R_NARGS
+/* Define if you have the gethostbyaddr_r() function with 5 arguments */
+#undef HAVE_GETHOSTBYADDR_R_5
 
-/* Number of arguments your gethostbyname_r() function accepts */
-#undef GETHOSTBYNAME_R_NARGS
+/* Define if you have the gethostbyaddr_r() function with 7 arguments */
+#undef HAVE_GETHOSTBYADDR_R_7
+
+/* Define if you have the gethostbyaddr_r() function with 8 arguments */
+#undef HAVE_GETHOSTBYADDR_R_8
+
+/* Define if you have the gethostbyname_r() function with 3 arguments */
+#undef HAVE_GETHOSTBYNAME_R_3
+
+/* Define if you have the gethostbyname_r() function with 5 arguments */
+#undef HAVE_GETHOSTBYNAME_R_5
+
+/* Define if you have the gethostbyname_r() function with 6 arguments */
+#undef HAVE_GETHOSTBYNAME_R_6
diff --git a/config.h.in b/config.h.in
index 08de2b8e68e1677afd3d3a7f966a7d150603393e..04119fa4b3a83e72a38763f393fe3f2fc1557b9c 100644
--- a/config.h.in
+++ b/config.h.in
@@ -31,11 +31,23 @@
 /* Define cpu-machine-OS */
 #undef OS
 
-/* Number of arguments your gethostbyaddr_r() function accepts */
-#undef GETHOSTBYADDR_R_NARGS
+/* Define if you have the gethostbyaddr_r() function with 5 arguments */
+#undef HAVE_GETHOSTBYADDR_R_5
 
-/* Number of arguments your gethostbyname_r() function accepts */
-#undef GETHOSTBYNAME_R_NARGS
+/* Define if you have the gethostbyaddr_r() function with 7 arguments */
+#undef HAVE_GETHOSTBYADDR_R_7
+
+/* Define if you have the gethostbyaddr_r() function with 8 arguments */
+#undef HAVE_GETHOSTBYADDR_R_8
+
+/* Define if you have the gethostbyname_r() function with 3 arguments */
+#undef HAVE_GETHOSTBYNAME_R_3
+
+/* Define if you have the gethostbyname_r() function with 5 arguments */
+#undef HAVE_GETHOSTBYNAME_R_5
+
+/* Define if you have the gethostbyname_r() function with 6 arguments */
+#undef HAVE_GETHOSTBYNAME_R_6
 
 /* The number of bytes in a long double.  */
 #undef SIZEOF_LONG_DOUBLE
@@ -259,3 +271,6 @@
 /* Version number of package */
 #undef VERSION
 
+/* Set to explicitly specify we don't want to use thread-safe functions */
+#undef DISABLED_THREADSAFE
+