changeset 10007:bef830fad24f

Make arpa/inet module build under MinGW.
author Simon Josefsson <simon@josefsson.org>
date Tue, 29 Apr 2008 11:26:41 +0200
parents b0a275071b2c
children c476de4b1672
files ChangeLog m4/arpa_inet_h.m4 modules/arpa_inet
diffstat 3 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-29  Simon Josefsson  <simon@josefsson.org>
+
+	* m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Set
+	HAVE_DECL_INET_NTOP and HAVE_DECL_INET_PTON.
+
+	* modules/arpa_inet (arpa/inet.h): Use them.
+
 2008-04-28  Eric Blake  <ebb9@byu.net>
 
 	Test getndelim2.
--- a/m4/arpa_inet_h.m4
+++ b/m4/arpa_inet_h.m4
@@ -32,4 +32,7 @@
 [
   GNULIB_INET_NTOP=0;     AC_SUBST([GNULIB_INET_NTOP])
   GNULIB_INET_PTON=0;     AC_SUBST([GNULIB_INET_PTON])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_INET_NTOP=1;  AC_SUBST([HAVE_DECL_INET_NTOP])
+  HAVE_DECL_INET_PTON=1;  AC_SUBST([HAVE_DECL_INET_PTON])
 ])
--- a/modules/arpa_inet
+++ b/modules/arpa_inet
@@ -24,6 +24,8 @@
 	  sed \
 	      -e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \
 	      -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \
+	      -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
+	      -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
 	      < $(srcdir)/arpa_inet.in.h; \
 	} > $@-t
 	mv $@-t $@