aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 17:14:14 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 17:14:14 +0000
commit44e4dadbfdd1118ff5a64d6195eaa168c29405a3 (patch)
treedcc1567f770147cc60635288818fa626e286f8f4
parenteae942b7b4ed36f5f43edd20ae6abd9e923b96c0 (diff)
replace MSW with proper macro: _WIN32 (http://msdn.microsoft.com/en-us/library/ff540443.aspx)
svn path=/trunk/externals/miXed/; revision=16955
-rw-r--r--cyclone/hammer/testmess.c2
-rw-r--r--cyclone/sickle/overdrive.c2
-rw-r--r--riddle/riddle.c2
-rw-r--r--shared/common/loud.c18
-rw-r--r--shared/common/os.c26
-rw-r--r--shared/common/port.c2
6 files changed, 26 insertions, 26 deletions
diff --git a/cyclone/hammer/testmess.c b/cyclone/hammer/testmess.c
index 46d62b7..cc7aa2b 100644
--- a/cyclone/hammer/testmess.c
+++ b/cyclone/hammer/testmess.c
@@ -7,7 +7,7 @@
#include "m_pd.h"
#include "unstable/fragile.h"
-#ifdef MSW
+#ifdef _WIN32
#define snprintf _snprintf
#endif
diff --git a/cyclone/sickle/overdrive.c b/cyclone/sickle/overdrive.c
index 1625dd4..8490070 100644
--- a/cyclone/sickle/overdrive.c
+++ b/cyclone/sickle/overdrive.c
@@ -7,7 +7,7 @@
#include "sickle/sic.h"
/* FIXME this is unnecessary in vc > 6.0 and darwin? */
-#if defined(MSW) || defined(MACOSX)
+#if defined(_WIN32) || defined(MACOSX)
#define powf pow
#endif
diff --git a/riddle/riddle.c b/riddle/riddle.c
index 1348413..d5f97f9 100644
--- a/riddle/riddle.c
+++ b/riddle/riddle.c
@@ -91,7 +91,7 @@ void riddlebug_post(t_riddle *rd, char *pfx, char *fmt, ...)
}
else fprintf(stderr, "%s \"%s\" (%x)\n",
pfx, class_getname(*(t_pd *)rd), (int)rd);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
diff --git a/shared/common/loud.c b/shared/common/loud.c
index 7129962..d21334e 100644
--- a/shared/common/loud.c
+++ b/shared/common/loud.c
@@ -9,7 +9,7 @@
#include "m_pd.h"
#include "loud.h"
-#ifdef MSW
+#ifdef _WIN32
#define vsnprintf _vsnprintf
#endif
@@ -354,7 +354,7 @@ void loudbug_post(char *fmt, ...)
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
fprintf(stderr, "%s\n", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -367,7 +367,7 @@ void loudbug_startpost(char *fmt, ...)
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
fputs(buf, stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -375,7 +375,7 @@ void loudbug_startpost(char *fmt, ...)
void loudbug_stringpost(char *s)
{
fputs(s, stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -383,7 +383,7 @@ void loudbug_stringpost(char *s)
void loudbug_endpost(void)
{
fputs("\n", stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -395,7 +395,7 @@ void loudbug_postatom(int ac, t_atom *av)
char buf[MAXPDSTRING];
atom_string(av++, buf, MAXPDSTRING);
fprintf(stderr, " %s", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -417,7 +417,7 @@ void loudbug_postbinbuf(t_binbuf *bb)
fprintf(stderr, " %s", buf);
}
else fprintf(stderr, "%s", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
aprev = ap++;
@@ -425,7 +425,7 @@ void loudbug_postbinbuf(t_binbuf *bb)
if (aprev)
{
fputs("\n", stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -439,7 +439,7 @@ void loudbug_bug(char *fmt, ...)
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
fprintf(stderr, "miXed consistency check failed: %s\n", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
bug(buf);
diff --git a/shared/common/os.c b/shared/common/os.c
index 9737949..40358b3 100644
--- a/shared/common/os.c
+++ b/shared/common/os.c
@@ -2,7 +2,7 @@
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-#ifdef MSW
+#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
@@ -28,7 +28,7 @@ static int ospath_doabsolute(char *path, char *cwd, char *result)
path++;
if (*path == '/' || *path == 0)
{
-#ifdef UNIX
+#ifndef _WIN32
char *home = getenv("HOME");
if (home)
{
@@ -49,7 +49,7 @@ static int ospath_doabsolute(char *path, char *cwd, char *result)
}
else if (*path == '/')
{
-#ifdef MSW
+#ifdef _WIN32
/* path is absolute, drive is implicit, LATER UNC? */
if (*cwd && cwd[1] == ':')
{
@@ -72,7 +72,7 @@ static int ospath_doabsolute(char *path, char *cwd, char *result)
}
else
{
-#ifdef MSW
+#ifdef _WIN32
if (path[1] == ':')
{
if (path[2] == '/')
@@ -237,7 +237,7 @@ FILE *filewrite_open(char *filename, t_canvas *cv, int textmode)
struct _osdir
{
-#ifndef MSW
+#ifndef _WIN32
DIR *dir_handle;
struct dirent *dir_entry;
#endif
@@ -248,19 +248,19 @@ struct _osdir
loud_syserror(owner, "cannot open \"%s\"", dirname) */
t_osdir *osdir_open(char *dirname)
{
-#ifndef MSW
+#ifndef _WIN32
DIR *handle = opendir(dirname);
if (handle)
{
#endif
t_osdir *dp = getbytes(sizeof(*dp));
-#ifndef MSW
+#ifndef _WIN32
dp->dir_handle = handle;
dp->dir_entry = 0;
#endif
dp->dir_flags = 0;
return (dp);
-#ifndef MSW
+#ifndef _WIN32
}
else return (0);
#endif
@@ -276,7 +276,7 @@ void osdir_close(t_osdir *dp)
{
if (dp)
{
-#ifndef MSW
+#ifndef _WIN32
closedir(dp->dir_handle);
#endif
freebytes(dp, sizeof(*dp));
@@ -287,7 +287,7 @@ void osdir_rewind(t_osdir *dp)
{
if (dp)
{
-#ifndef MSW
+#ifndef _WIN32
rewinddir(dp->dir_handle);
dp->dir_entry = 0;
#endif
@@ -296,7 +296,7 @@ void osdir_rewind(t_osdir *dp)
char *osdir_next(t_osdir *dp)
{
-#ifndef MSW
+#ifndef _WIN32
if (dp)
{
while (dp->dir_entry = readdir(dp->dir_handle))
@@ -315,7 +315,7 @@ char *osdir_next(t_osdir *dp)
int osdir_isfile(t_osdir *dp)
{
-#ifndef MSW
+#ifndef _WIN32
return (dp && dp->dir_entry && dp->dir_entry->d_type == DT_REG);
#else
return (0);
@@ -324,7 +324,7 @@ int osdir_isfile(t_osdir *dp)
int osdir_isdir(t_osdir *dp)
{
-#ifndef MSW
+#ifndef _WIN32
return (dp && dp->dir_entry && dp->dir_entry->d_type == DT_DIR);
#else
return (0);
diff --git a/shared/common/port.c b/shared/common/port.c
index bcfddf3..ffce677 100644
--- a/shared/common/port.c
+++ b/shared/common/port.c
@@ -45,7 +45,7 @@ enum { PORT_OK, /* MESSTREE_CONTINUE */
#define A_INT A_DEFFLOAT
/* without access to sys_defaultfont, we just mimic defs from s_main.c */
-#ifdef MSW
+#ifdef _WIN32
#define PORT_DEFFONTSIZE 12.
#else
#define PORT_DEFFONTSIZE 10.