diff --git a/ext/f2c_libs/err.c b/ext/f2c_libs/err.c index d93e80d05..18de588d2 100644 --- a/ext/f2c_libs/err.c +++ b/ext/f2c_libs/err.c @@ -10,6 +10,15 @@ extern char *malloc(); #endif #include "fio.h" #include "fmt.h" /* for struct syl */ + +#ifndef NON_POSIX_STDIO +#ifdef MSDOS +#include "io.h" +#else +#include "unistd.h" /* for access */ +#endif +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/ext/f2c_libs/util.c b/ext/f2c_libs/util.c index f4b3aef2c..09009816b 100644 --- a/ext/f2c_libs/util.c +++ b/ext/f2c_libs/util.c @@ -1,6 +1,21 @@ #include "sysdep1.h" /* here to get stat64 on some badly designed Linux systems */ #include "f2c.h" #include "fio.h" +#ifndef KR_headers +#undef abs +#undef min +#undef max +#include +#endif + +#ifndef NON_POSIX_STDIO +#ifdef MSDOS +#include "io.h" +#else +#include "unistd.h" /* for access */ +#endif +#endif + #ifdef __cplusplus extern "C" { #endif