[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: arpa/inet.h inclusion warning under FreeBSD 4.x
From: |
jas |
Subject: |
Re: [PATCH]: arpa/inet.h inclusion warning under FreeBSD 4.x |
Date: |
Fri, 28 Jul 2006 18:47:35 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
address@hidden writes:
> Yoann Vandoorselaere <address@hidden> writes:
>
>> On Fri, 2006-07-28 at 14:13 +0200, Bruno Haible wrote:
>>> Yoann Vandoorselaere wrote:
>>> >
>>> > #include <sys/types.h>
>>> > #include <sys/socket.h>
>>> > +
>>> > +#ifdef HAVE_NETINET_IN_H
>>> > +# include <netinet/in.h>
>>> > +#endif
>>> > +
>>> > #ifdef HAVE_ARPA_INET_H
>>> > # include <arpa/inet.h>
>>> > #endif
>>>
>>> Also, how about using #if instead of #ifdef, like in the rest of gnulib?
>>
>> Sound good, although I guess you can also update the HAVE_ARPA_INET_H
>> check then. :-)
>
> I've installed your patch.
On second thought, it seems as if inet_?to? should depend on the
arpa_inet module, to avoid the need for the HAVE_ARPA_INET_H checks.
/Simon
Index: lib/inet_ntop.h
===================================================================
RCS file: /sources/gnulib/gnulib/lib/inet_ntop.h,v
retrieving revision 1.7
diff -u -p -r1.7 inet_ntop.h
--- lib/inet_ntop.h 28 Jul 2006 16:28:08 -0000 1.7
+++ lib/inet_ntop.h 28 Jul 2006 16:46:50 -0000
@@ -20,9 +20,7 @@
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
-#if HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
+#include <arpa/inet.h>
/* Converts an internet address from internal format to a printable,
presentable format.
Index: lib/inet_pton.h
===================================================================
RCS file: /sources/gnulib/gnulib/lib/inet_pton.h,v
retrieving revision 1.2
diff -u -p -r1.2 inet_pton.h
--- lib/inet_pton.h 28 Jul 2006 16:28:08 -0000 1.2
+++ lib/inet_pton.h 28 Jul 2006 16:46:50 -0000
@@ -20,9 +20,7 @@
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
-#if HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
+#include <arpa/inet.h>
#if !HAVE_DECL_INET_PTON
extern int inet_pton (int af, const char *restrict src, void *restrict dst);
Index: lib/ChangeLog
===================================================================
RCS file: /sources/gnulib/gnulib/lib/ChangeLog,v
retrieving revision 1.1231
diff -u -p -r1.1231 ChangeLog
--- lib/ChangeLog 28 Jul 2006 16:28:08 -0000 1.1231
+++ lib/ChangeLog 28 Jul 2006 16:46:51 -0000
@@ -1,3 +1,8 @@
+2006-07-28 Simon Josefsson <address@hidden>
+
+ * inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
+ #include's.
+
2006-07-28 Bruno Haible <address@hidden>
* inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
Index: ChangeLog
===================================================================
RCS file: /sources/gnulib/gnulib/ChangeLog,v
retrieving revision 1.577
diff -u -p -r1.577 ChangeLog
--- ChangeLog 25 Jul 2006 11:32:36 -0000 1.577
+++ ChangeLog 28 Jul 2006 16:46:51 -0000
@@ -1,3 +1,8 @@
+2006-07-28 Simon Josefsson <address@hidden>
+
+ * modules/inet_ntop (Depends-on): Depend on arpa_inet.
+ * modules/inet_pton (Depends-on): Likewise.
+
2006-07-25 Bruno Haible <address@hidden>
* modules/version-etc (Depends-on): Add stdarg.
Index: modules/inet_ntop
===================================================================
RCS file: /sources/gnulib/gnulib/modules/inet_ntop,v
retrieving revision 1.5
diff -u -p -r1.5 inet_ntop
--- modules/inet_ntop 6 Jul 2006 13:53:54 -0000 1.5
+++ modules/inet_ntop 28 Jul 2006 16:46:51 -0000
@@ -10,6 +10,7 @@ Depends-on:
restrict
socklen
sys_socket
+arpa_inet
configure.ac:
gl_INET_NTOP
Index: modules/inet_pton
===================================================================
RCS file: /sources/gnulib/gnulib/modules/inet_pton,v
retrieving revision 1.2
diff -u -p -r1.2 inet_pton
--- modules/inet_pton 6 Jul 2006 13:53:54 -0000 1.2
+++ modules/inet_pton 28 Jul 2006 16:46:51 -0000
@@ -10,6 +10,7 @@ Depends-on:
restrict
socklen
sys_socket
+arpa_inet
configure.ac:
gl_INET_PTON