changeset 17720:42ec2a5efa7a

nl_langinfo: Fix last change. Don't include stdio.h and windows.h twice on MS-Windows. Also, define WIN32_LEAN_AND_MEAN before including windows.h. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eli Zaretskii <eliz@gnu.org>
date Thu, 10 Jul 2014 18:21:00 +0300
parents 41c703805963
children 3431efc25f3c
files ChangeLog lib/nl_langinfo.c
diffstat 2 files changed, 9 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 09 15:26:49 2014 +0530
+++ b/ChangeLog	Thu Jul 10 18:21:00 2014 +0300
@@ -1,3 +1,8 @@
+2014-07-10  Eli Zaretskii <eliz@gnu.org>
+
+	nl_langinfo: Fix last change.
+	* lib/nl_langinfo.c (includes): Drop redundant include.
+
 2014-07-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	error: Fix -Wundef warnings in glibc
--- a/lib/nl_langinfo.c	Wed Jul 09 15:26:49 2014 +0530
+++ b/lib/nl_langinfo.c	Thu Jul 10 18:21:00 2014 +0300
@@ -23,6 +23,7 @@
 #include <locale.h>
 #include <string.h>
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <windows.h>
 # include <stdio.h>
 #endif
@@ -140,22 +141,9 @@
 
 #else
 
-/* Provide nl_langinfo from scratch.  */
-
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-
-/* Native Windows platforms.  */
-
-#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
-#  include <windows.h>
-
-#  include <stdio.h>
-
-# else
-
-/* An old Unix platform without locales, such as Linux libc5 or BeOS.  */
-
-# endif
+/* Provide nl_langinfo from scratch, either for native MS-Windows, or
+   for old Unix platforms without locales, such as Linux libc5 or
+   BeOS.  */
 
 # include <time.h>