aboutsummaryrefslogtreecommitdiff
path: root/sonogram~.c
diff options
context:
space:
mode:
Diffstat (limited to 'sonogram~.c')
-rw-r--r--sonogram~.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sonogram~.c b/sonogram~.c
index 4085b34..18bf3c6 100644
--- a/sonogram~.c
+++ b/sonogram~.c
@@ -44,13 +44,16 @@
#endif
#include <ctype.h>
#include <pthread.h>
-#ifdef UNIX
-#include <unistd.h>
+#include <math.h>
+
+#ifdef _WIN32
+# include <io.h>
+# define random rand
#endif
-#ifdef NT
-#define M_PI 3.14159265358979323846
+
+#ifndef _MSC_VER /* only MSVC doesn't have unistd.h */
+# include <unistd.h>
#endif
-#include <math.h>
#include "m_pd.h"
#include "m_imp.h"