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 <[email protected]> Reviewed-by: Alan Coopersmith <[email protected]> --- src/common_vgaarb.c | 8 ++++---- src/freebsd_pci.c | 8 ++++---- src/linux_sysfs.c | 8 ++++---- src/netbsd_pci.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c index b2e1d8a..7a7d204 100644 --- a/src/common_vgaarb.c +++ b/src/common_vgaarb.c @@ -25,6 +25,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <string.h> #include <unistd.h> @@ -33,10 +37,6 @@ #include <stdlib.h> #include <limits.h> -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index a9304de..f9c1476 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -33,6 +33,10 @@ * \author Eric Anholt <[email protected]> */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -45,10 +49,6 @@ #include <sys/mman.h> #include <sys/memrange.h> -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "pciaccess.h" #include "pciaccess_private.h" diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 08c9971..50d94cf 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -34,6 +34,10 @@ #define _GNU_SOURCE +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <string.h> #include <stdio.h> @@ -57,10 +61,6 @@ #define iopl(x) -1 #endif -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifdef HAVE_MTRR #include <asm/mtrr.h> #include <sys/ioctl.h> diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c index 52591b0..f972f94 100644 --- a/src/netbsd_pci.c +++ b/src/netbsd_pci.c @@ -16,15 +16,15 @@ * 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> -- 2.2.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
