From c09cb8501fa2b4ba994db486219bb8bd79d995ff Mon Sep 17 00:00:00 2001 From: Adam Lindsay Date: Wed, 20 Nov 2002 12:53:14 +0000 Subject: extra defines and makefiles for MacOSX. svn path=/trunk/externals/zexy/; revision=223 --- src/z_coordinates.c | 7 +++++++ src/z_datetime.c | 6 ++++++ src/z_lp.c | 4 ++++ src/z_sfrecord.c | 2 +- src/z_sigaverage.c | 4 ++++ src/z_stat.c | 4 ++++ 6 files changed, 26 insertions(+), 1 deletion(-) (limited to 'src') 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 +/* typedef _BSD_TIME_T_ time_t; */ +#endif + + #include "zexy.h" #include #include 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 #include #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; -- cgit v1.2.1