Move _GNU_SOURCE to gmxpre.h
[alexxy/gromacs.git] / src / gromacs / gmxlib / gmx_cpuid.c
index 18109192d9cd1410f7b4119f83aa4e6c1bd2089a..3ea2d42c4032442e9afbc324c83be739edec9689 100644 (file)
  */
 #include "gmxpre.h"
 
+#include "gromacs/legacyheaders/gmx_cpuid.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#ifdef HAVE_SCHED_H
-#  ifndef _GNU_SOURCE
-#    define _GNU_SOURCE 1
-#  endif
-#  include <sched.h>
-#endif
-
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #ifdef GMX_NATIVE_WINDOWS
 /* MSVC definition for __cpuid() */
     #ifdef _MSC_VER
 /* sysinfo functions */
     #include <windows.h>
 #endif
+#ifdef HAVE_SCHED_H
+    #include <sched.h>
+#endif
 #ifdef HAVE_UNISTD_H
 /* sysconf() definition */
     #include <unistd.h>
 #endif
 
-#include "gromacs/legacyheaders/gmx_cpuid.h"
-
-
 
 /* For convenience, and to enable configure-time invocation, we keep all architectures
  * in a single file, but to avoid repeated ifdefs we set the overall architecture here.