aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/date.c7
-rw-r--r--src/length.c5
-rw-r--r--src/lpt.c4
-rw-r--r--src/msgfile.c4
-rw-r--r--src/operating_system.c2
-rw-r--r--src/sfplay.c16
-rw-r--r--src/sfrecord.c7
-rw-r--r--src/symbol2list.c4
-rw-r--r--src/tavg~.c10
-rw-r--r--src/time.c6
-rw-r--r--src/z_sigbin.c4
-rw-r--r--src/zexy.h17
12 files changed, 30 insertions, 56 deletions
diff --git a/src/date.c b/src/date.c
index 1961256..54ecf52 100644
--- a/src/date.c
+++ b/src/date.c
@@ -23,17 +23,18 @@
*/
-#ifdef NT
+#include "zexy.h"
+
+#ifdef __WIN32__
# define USE_TIMEB
#endif
-#ifdef MACOSX
+#ifdef __APPLE__
# include <sys/types.h>
/* typedef _BSD_TIME_T_ time_t; */
#endif
-#include "zexy.h"
#include <time.h>
#ifdef USE_TIMEB
diff --git a/src/length.c b/src/length.c
index a476af4..bc35039 100644
--- a/src/length.c
+++ b/src/length.c
@@ -19,11 +19,6 @@
#include "zexy.h"
#include <math.h>
-#ifdef MACOSX
-#define sqrtf sqrt
-#endif
-
-
static t_class *length_class;
typedef struct _length
diff --git a/src/lpt.c b/src/lpt.c
index fbe58ff..238beef 100644
--- a/src/lpt.c
+++ b/src/lpt.c
@@ -40,7 +40,7 @@
#ifdef Z_WANT_LPT
# include <stdlib.h>
-# ifdef NT
+# ifdef __WIN32__
/* on windoze everything is so complicated... */
extern int read_parport(int port);
extern void write_parport(int port, int value);
@@ -77,7 +77,7 @@ static int sys_inb(int port)
{
return inb(port);
}
-# endif /* NT */
+# endif /* __WIN32__ */
#endif /* Z_WANT_LP */
diff --git a/src/msgfile.c b/src/msgfile.c
index 245eea7..01f6736 100644
--- a/src/msgfile.c
+++ b/src/msgfile.c
@@ -28,7 +28,7 @@
#ifdef linux
#include <unistd.h>
#endif
-#ifdef NT
+#ifdef __WIN32__
#include <io.h>
#endif
@@ -525,7 +525,7 @@ static void msgfile_read(t_msgfile *x, t_symbol *filename, t_symbol *format)
t_binbuf *bbuf = binbuf_new();
-#ifdef NT
+#ifdef __WIN32__
rmode |= O_BINARY;
#endif
diff --git a/src/operating_system.c b/src/operating_system.c
index 8ccab49..8876991 100644
--- a/src/operating_system.c
+++ b/src/operating_system.c
@@ -42,7 +42,7 @@ static void operating_system_bang(t_operating_system *x)
s=gensym("linux");
#elif defined __APPLE__
s=gensym("macos");
-#elif defined NT
+#elif defined __WIN32__
s=gensym("windows");
#endif
outlet_symbol(x->x_obj.ob_outlet, s);
diff --git a/src/sfplay.c b/src/sfplay.c
index a46c339..bdf4fc8 100644
--- a/src/sfplay.c
+++ b/src/sfplay.c
@@ -65,12 +65,6 @@ ritsch@iem.kug.ac.at */
#define DACBLKSIZE 64 /* in m_imp.h, but error if it is included it here*/
-#ifdef NT
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#pragma warning( disable : 4018 )
-#endif
-
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
@@ -78,13 +72,13 @@ ritsch@iem.kug.ac.at */
/* ------------------------ sfplay ----------------------------- */
#define MAX_CHANS 8 /* channels for soundfiles 1,2,4,8 */
-#ifdef NT
-#define BINREADMODE "rb"
+#ifdef __WIN32__
+# define BINREADMODE "rb"
#endif
#ifdef unix
-#include <unistd.h>
-#include <sys/mman.h>
-#define BINREADMODE "r"
+# include <unistd.h>
+# include <sys/mman.h>
+# define BINREADMODE "r"
#endif
static t_class *sfplay_class;
diff --git a/src/sfrecord.c b/src/sfrecord.c
index ec66953..c3c7e6c 100644
--- a/src/sfrecord.c
+++ b/src/sfrecord.c
@@ -36,11 +36,6 @@ zmoelnig@iem.kug.ac.at
#define DACBLKSIZE 64 /* in m_imp.h, but error if it is included it here*/
-#ifdef NT
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
@@ -48,7 +43,7 @@ zmoelnig@iem.kug.ac.at
/* ------------------------ sfrecord ----------------------------- */
#define MAX_CHANS 8 /* channels for soundfiles 1,2,4,8 */
-#ifdef NT
+#ifdef __WIN32__
#define BINWRITEMODE "wb"
#endif
#ifdef unix
diff --git a/src/symbol2list.c b/src/symbol2list.c
index b2d2d43..95dc0c4 100644
--- a/src/symbol2list.c
+++ b/src/symbol2list.c
@@ -18,10 +18,6 @@
#include <stdlib.h>
#include <string.h>
-#ifndef NT
-# define STATIC_INLINE static
-#endif
-
/*
* symbol2list: convert a symbol into a list (with given delimiters)
*/
diff --git a/src/tavg~.c b/src/tavg~.c
index eec4399..4896c0d 100644
--- a/src/tavg~.c
+++ b/src/tavg~.c
@@ -17,16 +17,6 @@
#include "zexy.h"
#include <math.h>
-#ifdef NT
-#define sqrtf sqrt
-#endif
-
-#ifdef MACOSX
-#define sqrtf sqrt
-#endif
-
-
-
/* triggered average :: arithmetic mean between last and current BANG */
static t_class *tavg_class;
diff --git a/src/time.c b/src/time.c
index 2d80e95..f0ee46c 100644
--- a/src/time.c
+++ b/src/time.c
@@ -22,18 +22,18 @@
"date" gets the current date from the system
*/
+#include "zexy.h"
-#ifdef NT
+#ifdef __WIN32__
#define USE_TIMEB
#endif
-#ifdef MACOSX
+#ifdef __APPLE__
#include <sys/types.h>
/* typedef _BSD_TIME_T_ time_t; */
#endif
-#include "zexy.h"
#include <time.h>
#ifdef USE_TIMEB
diff --git a/src/z_sigbin.c b/src/z_sigbin.c
index 21a39b6..f3ca3d9 100644
--- a/src/z_sigbin.c
+++ b/src/z_sigbin.c
@@ -23,10 +23,6 @@
#include "zexy.h"
#include <math.h>
-#ifdef NT
-#define fabsf fabs
-#endif
-
typedef struct _misc
{
t_object x_obj;
diff --git a/src/zexy.h b/src/zexy.h
index cbfe00a..cb651e9 100644
--- a/src/zexy.h
+++ b/src/zexy.h
@@ -30,26 +30,33 @@
#ifndef INCLUDE_ZEXY_H__
#define INCLUDE_ZEXY_H__
+#ifdef __WIN32__
+# define NT
+# define MSW
+#endif
+
#include "m_pd.h"
#define VERSION "2.0"
-#ifdef NT
+
+#ifdef __WIN32__
+# pragma warning( disable : 4018 )
# pragma warning( disable : 4244 )
# pragma warning( disable : 4305 )
# define HEARTSYMBOL 3
-# define sqrtf sqrt
-# define fabsf fabs
# define STATIC_INLINE
+//# define sqrtf sqrt
+//# define fabsf fabs
#else
# define HEARTSYMBOL 169
+# define STATIC_INLINE static
#endif
-#ifdef MACOSX
+#ifdef __APPLE__
# define sqrtf sqrt
#endif
-
typedef struct _mypdlist
{
t_object x_obj;