[win32] win32_utime() tweaks to avoid warnings
[p5sagit/p5-mst-13.2.git] / win32 / runperl.c
index 07e2bd6..9544607 100644 (file)
@@ -1,18 +1,24 @@
-#include <stdio.h>
-#include <win32io.h>
+/* Say NO to CPP! Hallelujah! */
+#ifdef __GNUC__
+/*
+ * GNU C does not do __declspec()
+ */
+#define __declspec(foo) 
+
+/* Mingw32 defaults to globing command line 
+ * This is inconsistent with other Win32 ports and 
+ * seems to cause trouble with passing -DXSVERSION=\"1.6\" 
+ * So we turn it off like this:
+ */
+int _CRT_glob = 0;
 
-#ifndef _DLL
-extern WIN32_IOSUBSYSTEM win32stdio;
 #endif
 
-extern int RunPerl(int argc, char **argv, char **env, void *iosubsystem);
+
+__declspec(dllimport) int RunPerl(int argc, char **argv, char **env, void *ios);
 
 int
 main(int argc, char **argv, char **env)
 {
-#ifdef _DLL
-    return (RunPerl(argc, argv, env, NULL));
-#else
-    return (RunPerl(argc, argv, env, &win32stdio));
-#endif
+    return RunPerl(argc, argv, env, (void*)0);
 }