All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH 1/8] all: include config.h only when available and use its defines
Date: Sun, 27 Jul 2014 19:25:50 +0100	[thread overview]
Message-ID: <1406485557-10638-2-git-send-email-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <1406485557-10638-1-git-send-email-emil.l.velikov@gmail.com>

... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/test_decode.c       | 5 +++--
 libkms/api.c              | 2 ++
 libkms/dumb.c             | 4 +++-
 libkms/exynos.c           | 4 +++-
 libkms/intel.c            | 4 +++-
 libkms/linux.c            | 2 ++
 libkms/nouveau.c          | 4 +++-
 libkms/radeon.c           | 4 +++-
 libkms/vmwgfx.c           | 4 +++-
 tests/drmstat.c           | 2 ++
 tests/modetest/buffers.c  | 2 ++
 tests/modetest/cursor.c   | 2 ++
 tests/modetest/modetest.c | 2 ++
 tests/vbltest/vbltest.c   | 2 ++
 14 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/intel/test_decode.c b/intel/test_decode.c
index b710f34..bef9d99 100644
--- a/intel/test_decode.c
+++ b/intel/test_decode.c
@@ -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"
 
diff --git a/libkms/api.c b/libkms/api.c
index 5befaa0..b512c42 100644
--- a/libkms/api.c
+++ b/libkms/api.c
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/libkms/dumb.c b/libkms/dumb.c
index 440efb3..794282f 100644
--- a/libkms/dumb.c
+++ b/libkms/dumb.c
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
diff --git a/libkms/exynos.c b/libkms/exynos.c
index 93e36a1..243915b 100644
--- a/libkms/exynos.c
+++ b/libkms/exynos.c
@@ -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>
diff --git a/libkms/intel.c b/libkms/intel.c
index abae452..92f1cf2 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
diff --git a/libkms/linux.c b/libkms/linux.c
index 9b4f29e..17e1d58 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -30,7 +30,9 @@
  */
 
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index 608092f..2de827d 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.c
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
diff --git a/libkms/radeon.c b/libkms/radeon.c
index f5e382a..29375c4 100644
--- a/libkms/radeon.c
+++ b/libkms/radeon.c
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
diff --git a/libkms/vmwgfx.c b/libkms/vmwgfx.c
index d594b3b..598f383 100644
--- a/libkms/vmwgfx.c
+++ b/libkms/vmwgfx.c
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 
-#define HAVE_STDINT_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #define _FILE_OFFSET_BITS 64
 
 #include <errno.h>
diff --git a/tests/drmstat.c b/tests/drmstat.c
index c51cbc6..5935d07 100644
--- a/tests/drmstat.c
+++ b/tests/drmstat.c
@@ -28,7 +28,9 @@
  * 
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index 8206ce3..29b520d 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -24,7 +24,9 @@
  * IN THE SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <errno.h>
diff --git a/tests/modetest/cursor.c b/tests/modetest/cursor.c
index 7077f20..60f240a 100644
--- a/tests/modetest/cursor.c
+++ b/tests/modetest/cursor.c
@@ -22,7 +22,9 @@
  * IN THE SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <errno.h>
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 7d436b5..92efb82 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -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>
diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c
index 2a09d28..50e29dc 100644
--- a/tests/vbltest/vbltest.c
+++ b/tests/vbltest/vbltest.c
@@ -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>
-- 
2.0.2

  reply	other threads:[~2014-07-27 18:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-27 18:25 [PATCH 0/8] Upstreaming the Android build and misc fixes Emil Velikov
2014-07-27 18:25 ` Emil Velikov [this message]
2014-07-27 18:25 ` [PATCH 2/8] libkms: remove explicit define _FILE_OFFSET_BITS 64 Emil Velikov
2014-07-27 18:25 ` [PATCH 3/8] libdrm, freedreno, intel, nouveau, radeon: add Makefile.sources Emil Velikov
2014-07-27 18:25 ` [PATCH 4/8] libdrm,intel: Add Android build Emil Velikov
2014-07-27 18:25 ` [PATCH 5/8] libdrm,intel: rework android header handling Emil Velikov
2014-07-27 18:25 ` [PATCH 6/8] radeon: add Android build support Emil Velikov
2014-07-27 18:25 ` [PATCH 7/8] nouveau: " Emil Velikov
2014-07-27 18:25 ` [PATCH 8/8] freedreno: " Emil Velikov
2014-07-28  2:48 ` [PATCH 0/8] Upstreaming the Android build and misc fixes Emil Velikov
2014-07-28  7:07   ` Daniel Vetter
2014-07-28 12:01     ` Emil Velikov
2014-07-28 15:22       ` Daniel Vetter
2014-07-29 16:14         ` Gore, Tim
2014-07-29 17:10           ` Emil Velikov
2014-07-29 17:27 ` [PATCHv2 " Emil Velikov
2014-07-29 17:27   ` [PATCH 1/8] all: include config.h only when available and use its defines Emil Velikov
2014-07-29 17:27   ` [PATCH 2/8] libkms: remove explicit define _FILE_OFFSET_BITS 64 Emil Velikov
2014-07-29 17:27   ` [PATCH 3/8] libdrm, freedreno, intel, nouveau, radeon: add Makefile.sources Emil Velikov
2014-08-24 18:28     ` [PATCHv3 " Emil Velikov
2014-07-29 17:27   ` [PATCH 4/8] libdrm,intel: Add Android build Emil Velikov
2014-07-29 17:27   ` [PATCH 5/8] libdrm,intel: rework android header handling Emil Velikov
2014-07-29 17:27   ` [PATCH 6/8] radeon: add Android build support Emil Velikov
2014-07-29 17:27   ` [PATCH 7/8] nouveau: " Emil Velikov
2014-07-29 17:27   ` [PATCH 8/8] freedreno: " Emil Velikov
2014-07-31 15:33   ` [PATCHv2 0/8] Upstreaming the Android build and misc fixes Gore, Tim
2014-07-31 18:32     ` Emil Velikov
2014-08-24 18:39       ` Emil Velikov
2014-08-29  9:44         ` Gore, Tim
2014-08-29 10:02           ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406485557-10638-2-git-send-email-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.