[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] arpa/inet: fix mingw compilation warning
From: |
Eric Blake |
Subject: |
[PATCH] arpa/inet: fix mingw compilation warning |
Date: |
Wed, 24 Mar 2010 17:29:16 -0600 |
Mingw doesn't have <arpa/inet.h>, so a conditional use of
warning about duplicate declarations under -Wredundant-decls.
Making the #pragma unconditional (as was already done in at
least fcntl.in.h) shuts up gcc.
* lib/arpa_inet.in.h (system_header): Hoist to be unconditional.
Reported by Matthew Bolte.
Signed-off-by: Eric Blake <address@hidden>
---
I'm working on a followup patch to make all remaining replacement
headers consistently place #pragma GCC system_header first,
before any include guards, but ran out of time today. Once that
is done, I'll post it and push along with this one.
ChangeLog | 6 ++++++
lib/arpa_inet.in.h | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0c5dc24..4783773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-24 Eric Blake <address@hidden>
+
+ arpa/inet: fix mingw compilation warning
+ * lib/arpa_inet.in.h (system_header): Hoist to be unconditional.
+ Reported by Matthew Bolte.
+
2010-03-22 Eric Blake <address@hidden>
glob: test previous patch
diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h
index a120691..c1d088b 100644
--- a/lib/arpa_inet.in.h
+++ b/lib/arpa_inet.in.h
@@ -16,6 +16,10 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+# if __GNUC__ >= 3
address@hidden@
+# endif
+
#ifndef _GL_ARPA_INET_H
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
@@ -27,10 +31,6 @@
#if @HAVE_ARPA_INET_H@
-# if __GNUC__ >= 3
address@hidden@
-# endif
-
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
--
1.6.6.1
- [PATCH] arpa/inet: fix mingw compilation warning,
Eric Blake <=
- [PATCH 2/2] maint: use pragma consistently across replacement headers, Eric Blake, 2010/03/25
- Re: [PATCH 2/2] maint: use pragma consistently across replacement headers, Bruno Haible, 2010/03/25
- Re: [PATCH 2/2] maint: use pragma consistently across replacement headers, Eric Blake, 2010/03/26
- Re: [PATCH 2/2] maint: use pragma consistently across replacement headers, Bruno Haible, 2010/03/28
- Re: [PATCH 2/2] maint: use pragma consistently across replacement headers, Eric Blake, 2010/03/29
- Re: [PATCH 2/2] maint: use pragma consistently across replacement headers, Bruno Haible, 2010/03/29
- Re: [PATCH 2/2] maint: use pragma consistently across replacement headers, Jim Meyering, 2010/03/30