aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 19:05:13 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 19:05:13 +0000
commit9aeb4897af76c65f27f670aae24d0976631d6ee1 (patch)
treeed9829ebea46ac8f0c93f7233e79d03c72eacc95
parent469238676dd466a55b3808461e262f5645f888d1 (diff)
support Pd < 0.44 which doesn't have sys_open(), sys_fopen(), sys_fclose()
svn path=/trunk/externals/miXed/; revision=16961
-rw-r--r--shared/common/mifi.c1
-rw-r--r--shared/common/os.c1
-rw-r--r--shared/common/port.c1
-rw-r--r--shared/shared.h7
4 files changed, 10 insertions, 0 deletions
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 <errno.h>
#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 <string.h>
#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