This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] Include winsup.h prior to including other headers
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 24 Aug 2016 08:20:10 -0000
- Subject: [newlib-cygwin] Include winsup.h prior to including other headers
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=2fd2f308e2504b37a94fa3e3b476ec691ee005c5
commit 2fd2f308e2504b37a94fa3e3b476ec691ee005c5
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Aug 24 10:19:53 2016 +0200
Include winsup.h prior to including other headers
Otherwise _GNU_SOURCE is not set when needed in sys/features.h.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/libc/strptime.cc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/libc/strptime.cc b/winsup/cygwin/libc/strptime.cc
index efa4e5b..62dca6e 100644
--- a/winsup/cygwin/libc/strptime.cc
+++ b/winsup/cygwin/libc/strptime.cc
@@ -29,13 +29,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef __CYGWIN__
+#include "winsup.h"
+#endif
+
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: strptime.c,v 1.28 2008/04/28 20:23:01 martin Exp $");
#endif
#ifdef __CYGWIN__
-#include "winsup.h"
+#include "../locale/setlocale.h"
#else
#include "namespace.h"
#include <sys/localedef.h>
@@ -46,7 +50,6 @@ __RCSID("$NetBSD: strptime.c,v 1.28 2008/04/28 20:23:01 martin Exp $");
#include <string.h>
#include <time.h>
#include <tzfile.h>
-#include "../locale/setlocale.h"
#ifdef __TM_GMTOFF
# define TM_GMTOFF __TM_GMTOFF