tests: Add io.h for open() and close() on Windows.
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 11 Feb 2015 17:13:55 +0000 (18:13 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 11 Feb 2015 17:13:55 +0000 (18:13 +0100)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
ConfigureChecks.cmake
config.h.cmake
tests/test_assert_macros_fail.c

index 7f8c11d..c0dd13d 100644 (file)
@@ -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)
index 1c1c4c1..78cce7a 100644 (file)
@@ -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
 
index 5e83996..fea3df5 100644 (file)
@@ -12,6 +12,9 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
 #include <fcntl.h>
 
 /**************************************