Skip to content

Commit 993167e

Browse files
committed
Added io.h include and check if available through cmake.
* io.h defines chmod on WIN32 systems.
1 parent 870edbf commit 993167e

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
210210
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
211211
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
212212
CHECK_INCLUDE_FILE(process.h HAVE_PROCESS_H)
213+
CHECK_INCLUDE_FILE(io.h HAVE_IO_H)
213214

214215
CHECK_FUNCTION_EXISTS(abs HAVE_ABS)
215216
CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)

include/scl_cf_cmake.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#cmakedefine HAVE_DIRENT_H 1
1212
#cmakedefine HAVE_STDBOOL_H 1
1313
#cmakedefine HAVE_PROCESS_H 1
14+
#cmakedefine HAVE_IO_H 1
1415

1516
#cmakedefine HAVE_ABS 1
1617
#cmakedefine HAVE_MEMCPY 1

src/exppp/exppp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#else
1313
# include <scl_stdbool.h>
1414
#endif
15+
#ifdef HAVE_IO_H
16+
# include <io.h>
17+
#endif
1518

1619
#ifdef __STDC__
1720
#include <stdarg.h>

0 commit comments

Comments
 (0)