This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_formline: no need to *t = '\0' until end
[perl5.git] / win32 / runperl.c
index 9544607..b76f8ba 100644 (file)
@@ -1,24 +1,26 @@
-/* Say NO to CPP! Hallelujah! */
+#include "EXTERN.h"
+#include "perl.h"
+
 #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:
+ * So we turn it off like this, but only when compiling
+ * perlmain.c: perlmainst.c is linked into the same executable
+ * as win32.c, which also does this, so we mustn't do it twice
+ * otherwise we get a multiple definition error.
  */
+#ifndef PERLDLL
 int _CRT_glob = 0;
-
 #endif
 
-
-__declspec(dllimport) int RunPerl(int argc, char **argv, char **env, void *ios);
+#endif
 
 int
 main(int argc, char **argv, char **env)
 {
-    return RunPerl(argc, argv, env, (void*)0);
+    return RunPerl(argc, argv, env);
 }
+
+