all: include config.h only when available and use its defines
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 27 Jul 2014 13:46:45 +0000 (14:46 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 1 Sep 2014 15:06:01 +0000 (16:06 +0100)
... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
14 files changed:
intel/test_decode.c
libkms/api.c
libkms/dumb.c
libkms/exynos.c
libkms/intel.c
libkms/linux.c
libkms/nouveau.c
libkms/radeon.c
libkms/vmwgfx.c
tests/drmstat.c
tests/modetest/buffers.c
tests/modetest/cursor.c
tests/modetest/modetest.c
tests/vbltest/vbltest.c

index b710f34..bef9d99 100644 (file)
@@ -21,7 +21,9 @@
  * IN THE SOFTWARE.
  */
 
-#define _GNU_SOURCE
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <string.h>
 #include <stdlib.h>
@@ -33,7 +35,6 @@
 #include <sys/mman.h>
 #include <err.h>
 
-#include "config.h"
 #include "intel_bufmgr.h"
 #include "intel_chipset.h"
 
index 5befaa0..b512c42 100644 (file)
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
index 440efb3..794282f 100644 (file)
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
index 93e36a1..243915b 100644 (file)
@@ -11,7 +11,9 @@
  * option) any later version.
  */
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
index abae452..92f1cf2 100644 (file)
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
index 9b4f29e..17e1d58 100644 (file)
@@ -30,7 +30,9 @@
  */
 
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
index 608092f..2de827d 100644 (file)
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
index f5e382a..29375c4 100644 (file)
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
index d594b3b..598f383 100644 (file)
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
index c51cbc6..5935d07 100644 (file)
@@ -28,7 +28,9 @@
  * 
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
index 8206ce3..29b520d 100644 (file)
@@ -24,7 +24,9 @@
  * IN THE SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <errno.h>
index 7077f20..60f240a 100644 (file)
@@ -22,7 +22,9 @@
  * IN THE SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <errno.h>
index 7d436b5..92efb82 100644 (file)
@@ -37,7 +37,9 @@
  * TODO: use cairo to write the mode info on the selected output once
  *       the mode has been programmed, along with possible test patterns.
  */
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <ctype.h>
index 2a09d28..50e29dc 100644 (file)
@@ -37,7 +37,9 @@
  * TODO: use cairo to write the mode info on the selected output once
  *       the mode has been programmed, along with possible test patterns.
  */
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <stdio.h>