OSDN Git Service

Include config.h before any other headers.
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 10 Feb 2015 14:55:21 +0000 (14:55 +0000)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Thu, 12 Feb 2015 22:10:10 +0000 (14:10 -0800)
The former has a series of defines which in some cases are crusial to be
set before including any system headers.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
src/common_vgaarb.c
src/freebsd_pci.c
src/linux_sysfs.c
src/netbsd_pci.c

index b2e1d8a..7a7d204 100644 (file)
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <limits.h>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "pciaccess.h"
 #include "pciaccess_private.h"
 
index a9304de..f9c1476 100644 (file)
  * \author Eric Anholt <eric@anholt.net>
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/mman.h>
 #include <sys/memrange.h>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "pciaccess.h"
 #include "pciaccess_private.h"
 
index 08c9971..50d94cf 100644 (file)
 
 #define _GNU_SOURCE
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #define iopl(x) -1
 #endif
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #ifdef HAVE_MTRR
 #include <asm/mtrr.h>
 #include <sys/ioctl.h>
index 52591b0..f972f94 100644 (file)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/types.h>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #ifdef HAVE_MTRR
 #include <machine/sysarch.h>
 #include <machine/mtrr.h>