aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-02-18 13:21:23 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-02-18 13:21:23 +0000
commit9374577aed19eafbe2406f40a9a1fd3e9360c1c9 (patch)
treec6078e0744aa44cf942c70835f59639509677b6d /src
parent0fffeaff6d8af421b67f43e6ac93b00eac378c70 (diff)
z_close() for closing Pd-opened file descriptors
sys_close() exists since Pd-0.44, so we use it. on older versions we fall back to close() svn path=/trunk/externals/zexy/; revision=17427
Diffstat (limited to 'src')
-rw-r--r--src/zexy.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zexy.h b/src/zexy.h
index 42541a9..aa1e650 100644
--- a/src/zexy.h
+++ b/src/zexy.h
@@ -151,6 +151,13 @@ static void zexy_register(char*object){object=0;}
# define z_verbose
#endif
+#if (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 43)
+# define z_close sys_close
+#else
+# define z_close close
+#endif
+
+
#if (defined __x86_64__) && (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION >= 41)
# define zarray_t t_word
# define zarray_getarray garray_getfloatwords