diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-02-11 18:13:55 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-02-11 18:13:55 +0100 |
commit | 328288bd88a043cf2fefcd10f1efd892414f4a11 (patch) | |
tree | 2510ed128b3f4abe0424740707acc707ee184f71 | |
parent | f7a55ba7805b6f41c640e86f33394bbe48d595e5 (diff) | |
download | cmocka-328288bd88a043cf2fefcd10f1efd892414f4a11.zip cmocka-328288bd88a043cf2fefcd10f1efd892414f4a11.tar.gz cmocka-328288bd88a043cf2fefcd10f1efd892414f4a11.tar.bz2 |
tests: Add io.h for open() and close() on Windows.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | ConfigureChecks.cmake | 1 | ||||
-rw-r--r-- | config.h.cmake | 3 | ||||
-rw-r--r-- | tests/test_assert_macros_fail.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 7f8c11d..c0dd13d 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -49,6 +49,7 @@ endif (SOLARIS) # HEADER FILES check_include_file(assert.h HAVE_ASSERT_H) check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(io.h HAVE_IO_H) check_include_file(malloc.h HAVE_MALLOC_H) check_include_file(memory.h HAVE_MEMORY_H) check_include_file(setjmp.h HAVE_SETJMP_H) diff --git a/config.h.cmake b/config.h.cmake index 1c1c4c1..78cce7a 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -23,6 +23,9 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #cmakedefine HAVE_INTTYPES_H 1 +/* Define to 1 if you have the <io.h> header file. */ +#cmakedefine HAVE_IO_H 1 + /* Define to 1 if you have the <malloc.h> header file. */ #cmakedefine HAVE_MALLOC_H 1 diff --git a/tests/test_assert_macros_fail.c b/tests/test_assert_macros_fail.c index 5e83996..fea3df5 100644 --- a/tests/test_assert_macros_fail.c +++ b/tests/test_assert_macros_fail.c @@ -12,6 +12,9 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif +#ifdef HAVE_IO_H +#include <io.h> +#endif #include <fcntl.h> /************************************** |