aboutsummaryrefslogtreecommitdiff
path: root/pd/src/s_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'pd/src/s_entry.c')
-rw-r--r--pd/src/s_entry.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pd/src/s_entry.c b/pd/src/s_entry.c
index eb49cfc1..5cef73cc 100644
--- a/pd/src/s_entry.c
+++ b/pd/src/s_entry.c
@@ -3,7 +3,11 @@ that externs can link back to functions defined in pd. */
int sys_main(int argc, char **argv);
-#ifdef MSW
+/*
+ * gcc does not support the __try stuff, only MSVC. Also, MinGW allows you to
+ * use main() instead of WinMain(). <hans@at.or.at>
+ */
+#if defined(_MSC_VER) && !defined(COMMANDVERSION)
#include <windows.h>
#include <stdio.h>
@@ -21,11 +25,11 @@ int WINAPI WinMain(HINSTANCE hInstance,
}
}
-#else /* not MSW */
+#else /* not _MSC_VER ... */
int main(int argc, char **argv)
{
return (sys_main(argc, argv));
}
-#endif
+#endif /* _MSC_VER */