changeset 13099:f4aae3195883

sys_time: avoid compiler warnings sys/time uses #if/#else/#endif, and is therefore not subject to the gcc optimization. The #pragma GCC system_header must occur up front. * lib/sys_time.in.h (includes): Ensure gcc pragma is unconditional, fixing regression from 2010-03-29. Reported by Simon Josefsson. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Wed, 31 Mar 2010 07:57:51 -0600
parents 8d61d11c6cf0
children 61dece5578fb
files ChangeLog lib/sys_time.in.h
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 29 16:43:00 2010 +0200
+++ b/ChangeLog	Wed Mar 31 07:57:51 2010 -0600
@@ -1,3 +1,10 @@
+2010-03-31  Eric Blake  <eblake@redhat.com>
+
+	sys_time: avoid compiler warnings
+	* lib/sys_time.in.h (includes): Ensure gcc pragma is
+	unconditional, fixing regression from 2010-03-29.
+	Reported by Simon Josefsson.
+
 2010-03-28  Jose E. Marchesi  <jemarch@gnu.org>
 
 	maint.mk: s/_header_without_use/_sc_header_without_use/
--- a/lib/sys_time.in.h	Mon Mar 29 16:43:00 2010 +0200
+++ b/lib/sys_time.in.h	Wed Mar 31 07:57:51 2010 -0600
@@ -18,12 +18,12 @@
 
 /* Written by Paul Eggert.  */
 
-#if defined _GL_SYS_TIME_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+#if defined _GL_SYS_TIME_H
+
 /* Simply delegate to the system's header, without adding anything.  */
 # if @HAVE_SYS_TIME_H@
 #  @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@