From 7fc902373e4388c1d17a79211d0216ceea057e06 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Fri, 13 Mar 2009 03:08:59 +0000 Subject: [PATCH] Fix for a possible ubuntu problem. Will have to check with users to see if this works. --- ext/f2c_libs/err.c | 9 +++++++++ ext/f2c_libs/util.c | 15 +++++++++++++++ 2 files changed, 24 insertions(+) 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