aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Lindsay <adamlindsay@users.sourceforge.net>2002-11-20 12:53:14 +0000
committerAdam Lindsay <adamlindsay@users.sourceforge.net>2002-11-20 12:53:14 +0000
commitc09cb8501fa2b4ba994db486219bb8bd79d995ff (patch)
tree30fb02836d009c8a0d1df57da65fd80acf504ed2
parentad39a18539c6be62a45152ff2005ac1573517682 (diff)
extra defines and makefiles for MacOSX.
svn path=/trunk/externals/zexy/; revision=223
-rw-r--r--src/z_coordinates.c7
-rw-r--r--src/z_datetime.c6
-rw-r--r--src/z_lp.c4
-rw-r--r--src/z_sfrecord.c2
-rw-r--r--src/z_sigaverage.c4
-rw-r--r--src/z_stat.c4
6 files changed, 26 insertions, 1 deletions
diff --git a/src/z_coordinates.c b/src/z_coordinates.c
index 3efcf8f..59bd6aa 100644
--- a/src/z_coordinates.c
+++ b/src/z_coordinates.c
@@ -10,6 +10,13 @@
#define cosf cos
#endif
+#ifdef MACOSX
+#define atan2f atan2
+#define sqrtf sqrt
+#define sinf sin
+#define cosf cos
+#endif
+
/* ----------------------- deg/rad utils ----------------- */
t_class *deg2rad_class, *rad2deg_class;
typedef struct _deg2rad
diff --git a/src/z_datetime.c b/src/z_datetime.c
index af93209..efe9d8c 100644
--- a/src/z_datetime.c
+++ b/src/z_datetime.c
@@ -11,6 +11,12 @@
#pragma warning( disable : 4305 )
#endif
+#ifdef MACOSX
+#include <sys/types.h>
+/* typedef _BSD_TIME_T_ time_t; */
+#endif
+
+
#include "zexy.h"
#include <sys/timeb.h>
#include <time.h>
diff --git a/src/z_lp.c b/src/z_lp.c
index c9dba09..71421c0 100644
--- a/src/z_lp.c
+++ b/src/z_lp.c
@@ -5,6 +5,8 @@
extended to write to any port (if we do have permissions)
*/
+#ifndef MACOSX
+
#define BASE0 0x3bc
#define BASE1 0x378
#define BASE2 0x278
@@ -130,3 +132,5 @@ void z_lp_setup(void)
class_addmethod(lp_class, (t_method)helper, gensym("help"), 0);
class_sethelpsymbol(lp_class, gensym("zexy/lp"));
}
+
+#endif /* MACOSX */
diff --git a/src/z_sfrecord.c b/src/z_sfrecord.c
index 027a246..53f46a3 100644
--- a/src/z_sfrecord.c
+++ b/src/z_sfrecord.c
@@ -35,7 +35,7 @@ zmoelnig@iem.kug.ac.at
#ifdef NT
#define BINWRITEMODE "wb"
#endif
-#ifdef linux
+#ifdef unix
#include <unistd.h>
#include <sys/mman.h>
#define BINWRITEMODE "w"
diff --git a/src/z_sigaverage.c b/src/z_sigaverage.c
index 3ceb29c..3e3e261 100644
--- a/src/z_sigaverage.c
+++ b/src/z_sigaverage.c
@@ -7,6 +7,10 @@
#define sqrtf sqrt
#endif
+#ifdef MACOSX
+#define sqrtf sqrt
+#endif
+
/* ---------------- envrms~ - simple envelope follower. ----------------- */
/* this is exactly the same as msp's env~-object, but does not output dB but RMS !! */
/* i found env~+dbtorms most inconvenient (and expensive...) */
diff --git a/src/z_stat.c b/src/z_stat.c
index 5b3a5e6..d667a5a 100644
--- a/src/z_stat.c
+++ b/src/z_stat.c
@@ -7,6 +7,10 @@
#define sqrtf sqrt
#endif
+#ifdef MACOSX
+#define sqrtf sqrt
+#endif
+
/* mean :: the mean of a list of floats */
static t_class *mean_class;