From 9aeb4897af76c65f27f670aae24d0976631d6ee1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 22 Jan 2013 19:05:13 +0000 Subject: support Pd < 0.44 which doesn't have sys_open(), sys_fopen(), sys_fclose() svn path=/trunk/externals/miXed/; revision=16961 --- shared/common/mifi.c | 1 + shared/common/os.c | 1 + shared/common/port.c | 1 + shared/shared.h | 7 +++++++ 4 files changed, 10 insertions(+) diff --git a/shared/common/mifi.c b/shared/common/mifi.c index 306e427..2e216f5 100644 --- a/shared/common/mifi.c +++ b/shared/common/mifi.c @@ -14,6 +14,7 @@ #include #include "m_pd.h" #include "mifi.h" +#include "shared.h" /* this is for GNU/Linux and also Debian GNU/Hurd and GNU/kFreeBSD */ #if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__GLIBC__) diff --git a/shared/common/os.c b/shared/common/os.c index 40358b3..8b58cce 100644 --- a/shared/common/os.c +++ b/shared/common/os.c @@ -13,6 +13,7 @@ #include #include "m_pd.h" #include "os.h" +#include "shared.h" static int ospath_doabsolute(char *path, char *cwd, char *result) { diff --git a/shared/common/port.c b/shared/common/port.c index 79a8885..3cbba7c 100644 --- a/shared/common/port.c +++ b/shared/common/port.c @@ -25,6 +25,7 @@ #include "common/grow.h" #include "common/binport.h" #include "port.h" +#include "shared.h" #ifdef KRZYSZCZ //#define PORT_DEBUG diff --git a/shared/shared.h b/shared/shared.h index ff010eb..b8c88b8 100644 --- a/shared/shared.h +++ b/shared/shared.h @@ -187,4 +187,11 @@ typedef union _shared_floatint #endif #endif +/* support older Pd versions without sys_open(), sys_fopen(), sys_fclose() */ +#if PD_MAJOR_VERSION == 0 && PD_MINOR_VERSION < 44 +#define sys_open open +#define sys_fopen fopen +#define sys_fclose fclose +#endif + #endif -- cgit v1.2.1