From patchwork Tue Jul 29 17:27:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 4641611 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8F9B8C0338 for ; Tue, 29 Jul 2014 17:28:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 800E620145 for ; Tue, 29 Jul 2014 17:28:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5F5902012D for ; Tue, 29 Jul 2014 17:28:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8A086E49C; Tue, 29 Jul 2014 10:28:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 953966E108 for ; Tue, 29 Jul 2014 10:28:17 -0700 (PDT) Received: by mail-wi0-f180.google.com with SMTP id n3so926351wiv.1 for ; Tue, 29 Jul 2014 10:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zjeai/ISbQM65lXQGol+lZZd5h9tFUAG66tuk8sUu2E=; b=N53DdQrIqtcM8MIMGMrnusowq+HcW3woED8ISGi9wOJHdWLTeRx4/lk20BhryyxiwF F0bPQLHjzKrLhI9FkRj04vDbOf+ZOvo2fwV5jZsM3isMsMYXOLU0SqBuNSb1NRfYEOmH Vwyb49mXO1f4WC+vciAZThXCiM8IAoLDXnw3OKfZA1bEwBztKq4C5Ibh5TDgc/l84V6R sSD8S388eIHYYB3M697REYMK4ybrYh/hqgK9ytcziVgvSz+JdB4H6Ga6XW41B5czHqWz S4Lq22uE/JJqCrvvyEi70Iu4GQDp9Cnjp+Anj17VJqZpV6RjzO1mEdh6KnZqMNgXUoe3 gaaQ== X-Received: by 10.180.98.165 with SMTP id ej5mr6728188wib.37.1406654895047; Tue, 29 Jul 2014 10:28:15 -0700 (PDT) Received: from localhost.localdomain (cpc20-stap10-2-0-cust563.12-2.cable.virginm.net. [82.20.130.52]) by mx.google.com with ESMTPSA id dc3sm1850278wib.9.2014.07.29.10.28.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Jul 2014 10:28:14 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/8] all: include config.h only when available and use its defines Date: Tue, 29 Jul 2014 18:27:16 +0100 Message-Id: <1406654843-13625-2-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1406654843-13625-1-git-send-email-emil.l.velikov@gmail.com> References: <1406485557-10638-1-git-send-email-emil.l.velikov@gmail.com> <1406654843-13625-1-git-send-email-emil.l.velikov@gmail.com> Cc: Emil Velikov X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE. Signed-off-by: Emil Velikov --- 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 #include @@ -33,7 +35,6 @@ #include #include -#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 #include #include 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 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 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 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 #include #include 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 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 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 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 #include 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 #include 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 #include 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 #include 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 #include