summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jakub.hrozek@posteo.se>2015-02-12 16:10:21 (GMT)
committerAndreas Schneider <asn@cryptomilk.org>2015-02-12 18:07:57 (GMT)
commitd0ef24c83a67a07f0bba34ce46371e704d1c0654 (patch)
treedff01a9753539adb598d2c54aa61a8bd39e8da50
parentfae9be0f837cf515c6ab46a986accbd32b0dec23 (diff)
downloadcmocka-d0ef24c83a67a07f0bba34ce46371e704d1c0654.zip
cmocka-d0ef24c83a67a07f0bba34ce46371e704d1c0654.tar.gz
cmocka-d0ef24c83a67a07f0bba34ce46371e704d1c0654.tar.bz2
cmocka: Include cmocka_private.h after cmocka.h
cmocka_private.h uses WORDSIZE: # if __WORDSIZE == 64 # define __PRI64_PREFIX "l" But on some platforms, like Solaris, cmocka guesses its own WORDSIZE value in cmocka.h. Therefore it's important to include cmocka_private.h after cmocka.h
-rw-r--r--src/cmocka.c2
-rw-r--r--tests/test_alloc.c2
-rw-r--r--tests/test_assert_macros.c2
-rw-r--r--tests/test_assert_macros_fail.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/cmocka.c b/src/cmocka.c
index 626b33e..9d3e704 100644
--- a/src/cmocka.c
+++ b/src/cmocka.c
@@ -54,8 +54,8 @@
# include "cmocka_platform.h"
#endif /* CMOCKA_PLATFORM_INCLUDE */
-#include <cmocka_private.h>
#include <cmocka.h>
+#include <cmocka_private.h>
/* Size of guard bytes around dynamically allocated blocks. */
#define MALLOC_GUARD_SIZE 16
diff --git a/tests/test_alloc.c b/tests/test_alloc.c
index e1642af..babe3a8 100644
--- a/tests/test_alloc.c
+++ b/tests/test_alloc.c
@@ -3,8 +3,8 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
-#include <cmocka_private.h>
#include <cmocka.h>
+#include <cmocka_private.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/tests/test_assert_macros.c b/tests/test_assert_macros.c
index 560f9cf..85b0a38 100644
--- a/tests/test_assert_macros.c
+++ b/tests/test_assert_macros.c
@@ -3,8 +3,8 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
-#include <cmocka_private.h>
#include <cmocka.h>
+#include <cmocka_private.h>
#include <errno.h>
#include <sys/types.h>
diff --git a/tests/test_assert_macros_fail.c b/tests/test_assert_macros_fail.c
index fea3df5..aea919a 100644
--- a/tests/test_assert_macros_fail.c
+++ b/tests/test_assert_macros_fail.c
@@ -3,8 +3,8 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
-#include <cmocka_private.h>
#include <cmocka.h>
+#include <cmocka_private.h>
#include <errno.h>
#include <sys/types.h>