diff options
-rw-r--r-- | shared/common/mifi.c | 1 | ||||
-rw-r--r-- | shared/common/os.c | 1 | ||||
-rw-r--r-- | shared/common/port.c | 1 | ||||
-rw-r--r-- | shared/shared.h | 7 |
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 |