From 328288bd88a043cf2fefcd10f1efd892414f4a11 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 11 Feb 2015 18:13:55 +0100 Subject: [PATCH] tests: Add io.h for open() and close() on Windows. Signed-off-by: Andreas Schneider --- ConfigureChecks.cmake | 1 + config.h.cmake | 3 +++ tests/test_assert_macros_fail.c | 3 +++ 3 files changed, 7 insertions(+) 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 header file. */ #cmakedefine HAVE_INTTYPES_H 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_IO_H 1 + /* Define to 1 if you have the 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 #endif +#ifdef HAVE_IO_H +#include +#endif #include /************************************** -- 2.7.4