aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-07-11 16:40:24 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-07-11 16:40:24 +0000
commit3cc282dcc13295ec6e0cca8ffcf9f78784f09733 (patch)
tree5e62776207373ed1f2428c4745cc7d49637f1cc7
parentd072e37faab2a7253f14165c38c7220dfc3f7685 (diff)
got the lib to compile on MinGW by ifdeffing out the failing objects. These could be ported pretty easily since it's just a question of the open() function, I think. But it's really old, funky code, so why?
svn path=/trunk/externals/moonlib/; revision=8005
-rw-r--r--absolutepath.c2
-rw-r--r--basedir.c3
-rw-r--r--gamme.c4
-rw-r--r--image.c2
-rw-r--r--mknob.c2
-rw-r--r--readsfv~.c7
-rw-r--r--relativepath.c2
-rw-r--r--sfread2~.c9
8 files changed, 21 insertions, 10 deletions
diff --git a/absolutepath.c b/absolutepath.c
index 3e75df6..0b44dcb 100644
--- a/absolutepath.c
+++ b/absolutepath.c
@@ -1,3 +1,4 @@
+#ifndef _WIN32
/*
Copyright (C) 2002 Antoine Rousseau
@@ -138,3 +139,4 @@ void absolutepath_setup(void)
class_addsymbol(absolutepath_class, absolutepath_symbol);
}
+#endif /* NOT _WIN32 */
diff --git a/basedir.c b/basedir.c
index ad2f4f6..61ebcf4 100644
--- a/basedir.c
+++ b/basedir.c
@@ -1,3 +1,4 @@
+#ifndef _WIN32
/*
Copyright (C) 2002 Antoine Rousseau
@@ -70,3 +71,5 @@ void basedir_setup(void)
class_addsymbol(basedir_class, basedir_symbol);
}
+
+#endif /* NOT _WIN32 */
diff --git a/gamme.c b/gamme.c
index d4ddd01..8e30250 100644
--- a/gamme.c
+++ b/gamme.c
@@ -1,4 +1,4 @@
-/*
+emacs /*
Copyright (C) 2002 Antoine Rousseau
This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <m_pd.h>
#include "g_canvas.h"
-#ifdef NT
+#ifdef _MSC_VER
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
diff --git a/image.c b/image.c
index f38078d..a9b5876 100644
--- a/image.c
+++ b/image.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <stdio.h>
-#ifdef NT
+#ifdef _MSC_VER
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
diff --git a/mknob.c b/mknob.c
index 4cf5cbe..1529ab2 100644
--- a/mknob.c
+++ b/mknob.c
@@ -17,7 +17,7 @@
#include "g_all_guis.h"
#include <math.h>
-#ifdef NT
+#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
diff --git a/readsfv~.c b/readsfv~.c
index 6707cf1..195175b 100644
--- a/readsfv~.c
+++ b/readsfv~.c
@@ -1,3 +1,4 @@
+#ifndef _WIN32
/* Copyright (c) 1997-1999 Miller Puckette.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
@@ -25,7 +26,7 @@ for Windows if someone were willing to find a Pthreads package for it. */
#include <fcntl.h>
#endif
#include <pthread.h>
-#ifdef NT
+#ifdef _WIN32
#include <io.h>
#endif
#include <stdio.h>
@@ -152,7 +153,7 @@ typedef struct _aiff
#define OBUFSIZE MAXPDSTRING /* assume MAXPDSTRING is bigger than headers */
-#ifdef NT
+#ifdef _WIN32
#include <fcntl.h>
#define BINCREATE _O_WRONLY | _O_CREAT | _O_BINARY | _O_TRUNC |
#else
@@ -1680,4 +1681,4 @@ void readsfv_tilde_setup(void)
-
+#endif /* NOT _WIN32 */
diff --git a/relativepath.c b/relativepath.c
index f599222..3df0051 100644
--- a/relativepath.c
+++ b/relativepath.c
@@ -1,3 +1,4 @@
+#ifndef _WIN32
/*
Copyright (C) 2002 Antoine Rousseau
@@ -144,3 +145,4 @@ void relativepath_setup(void)
class_addsymbol(relativepath_class, relativepath_symbol);
}
+#endif /* NOT _WIN32 */
diff --git a/sfread2~.c b/sfread2~.c
index aceb39e..c4d7653 100644
--- a/sfread2~.c
+++ b/sfread2~.c
@@ -1,14 +1,16 @@
+#ifndef _WIN32
+
#include <m_pd.h>
//#include <m_imp.h>
#include "g_canvas.h"
-#ifdef NT
+#ifdef _MSC_VER
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
#include <stdio.h>
#include <string.h>
-#ifndef NT
+#ifndef _WIN32
#include <unistd.h>
#include <sys/mman.h>
#else
@@ -21,7 +23,7 @@
/* ------------------------ sfread~ ----------------------------- */
-#ifdef NT
+#ifdef _WIN32
#define BINREADMODE "rb"
#else
#define BINREADMODE "r"
@@ -407,4 +409,5 @@ void sfread2_tilde_setup(void)
+#endif /* NOT _WIN32 */