summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Wedgbury <andrew.wedgbury@realvnc.com>2014-04-07 12:40:35 +0100
committerKristian Høgsberg <krh@bitplanet.net>2014-04-07 10:22:28 -0700
commit9cd661e746708a76761ff1fda361c6276ee71ab1 (patch)
treea69e2745f3d3a64e31a1e9675a25738ec231018c /tests
parentba83db216ca8b84c250f9902fbbd4883cf63912b (diff)
downloadweston-9cd661e746708a76761ff1fda361c6276ee71ab1.tar.gz
Make sure config.h is included before any system headers
There was an issue recently in screen-share.c where config.h was not being included, resulting in the wrong definition for off_t being used on 32 bit systems. I checked and I don't think this problem is happening elsewhere, but to help avoid this sort of problem in the future, I went through and made sure that config.h is included first whenever system headers are included. The config.h header should be included before any system headers, failing to do this can result in the wrong type sizes being defined on certain systems, e.g. off_t from sys/types.h Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bad-buffer-test.c2
-rw-r--r--tests/buffer-count-test.c2
-rw-r--r--tests/button-test.c2
-rw-r--r--tests/config-parser-test.c2
-rw-r--r--tests/matrix-test.c2
-rw-r--r--tests/setbacklight.c2
-rw-r--r--tests/subsurface-test.c2
-rw-r--r--tests/surface-global-test.c2
-rw-r--r--tests/text-test.c2
-rw-r--r--tests/vertex-clip-test.c3
-rw-r--r--tests/weston-test-client-helper.h2
-rw-r--r--tests/weston-test-runner.h2
12 files changed, 25 insertions, 0 deletions
diff --git a/tests/bad-buffer-test.c b/tests/bad-buffer-test.c
index 4f5f8109..6eae313e 100644
--- a/tests/bad-buffer-test.c
+++ b/tests/bad-buffer-test.c
@@ -21,6 +21,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <unistd.h>
#include <sys/types.h>
diff --git a/tests/buffer-count-test.c b/tests/buffer-count-test.c
index dfc4673a..8b1dd5d1 100644
--- a/tests/buffer-count-test.c
+++ b/tests/buffer-count-test.c
@@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <string.h>
#include "weston-test-client-helper.h"
diff --git a/tests/button-test.c b/tests/button-test.c
index dc02fd44..d5ad8134 100644
--- a/tests/button-test.c
+++ b/tests/button-test.c
@@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <linux/input.h>
#include "weston-test-client-helper.h"
diff --git a/tests/config-parser-test.c b/tests/config-parser-test.c
index 4b8fc7e7..4b255b7d 100644
--- a/tests/config-parser-test.c
+++ b/tests/config-parser-test.c
@@ -20,6 +20,8 @@
* OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
diff --git a/tests/matrix-test.c b/tests/matrix-test.c
index 5b0513f3..7b414c9a 100644
--- a/tests/matrix-test.c
+++ b/tests/matrix-test.c
@@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
diff --git a/tests/setbacklight.c b/tests/setbacklight.c
index 92bd4bf3..c8eba436 100644
--- a/tests/setbacklight.c
+++ b/tests/setbacklight.c
@@ -28,6 +28,8 @@
* program.
*/
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/tests/subsurface-test.c b/tests/subsurface-test.c
index 1c2641b6..0670e7f7 100644
--- a/tests/subsurface-test.c
+++ b/tests/subsurface-test.c
@@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <string.h>
#include "weston-test-client-helper.h"
diff --git a/tests/surface-global-test.c b/tests/surface-global-test.c
index b496635c..edc5d9f6 100644
--- a/tests/surface-global-test.c
+++ b/tests/surface-global-test.c
@@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <assert.h>
#include "../src/compositor.h"
diff --git a/tests/text-test.c b/tests/text-test.c
index 1f10b1bb..c838a5d2 100644
--- a/tests/text-test.c
+++ b/tests/text-test.c
@@ -20,6 +20,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "config.h"
+
#include <string.h>
#include <stdio.h>
#include <linux/input.h>
diff --git a/tests/vertex-clip-test.c b/tests/vertex-clip-test.c
index 6d44aa2a..1a09437e 100644
--- a/tests/vertex-clip-test.c
+++ b/tests/vertex-clip-test.c
@@ -19,6 +19,9 @@
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+
+#include "config.h"
+
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
index 6670ab37..4bfc3fac 100644
--- a/tests/weston-test-client-helper.h
+++ b/tests/weston-test-client-helper.h
@@ -23,6 +23,8 @@
#ifndef _WESTON_TEST_CLIENT_HELPER_H_
#define _WESTON_TEST_CLIENT_HELPER_H_
+#include "config.h"
+
#include <assert.h>
#include "weston-test-runner.h"
#include "wayland-test-client-protocol.h"
diff --git a/tests/weston-test-runner.h b/tests/weston-test-runner.h
index 457cf31c..e1db0409 100644
--- a/tests/weston-test-runner.h
+++ b/tests/weston-test-runner.h
@@ -24,6 +24,8 @@
#ifndef _WESTON_TEST_RUNNER_H_
#define _WESTON_TEST_RUNNER_H_
+#include "config.h"
+
#include <stdlib.h>
#ifdef NDEBUG