applied suggested fix for xhv_array sizing, with portability tweaks
[p5sagit/p5-mst-13.2.git] / win32 / perllib.c
index b1002eb..3bec9c0 100644 (file)
@@ -9,7 +9,7 @@
 
 static void xs_init _((void));
 
-__declspec(dllexport) int
+DllExport int
 RunPerl(int argc, char **argv, char **env, void *iosubsystem)
 {
     int exitstatus;
@@ -18,9 +18,11 @@ RunPerl(int argc, char **argv, char **env, void *iosubsystem)
 #ifdef PERL_GLOBAL_STRUCT
 #define PERLVAR(var,type) /**/
 #define PERLVARI(var,type,init) Perl_Vars.var = init;
+#define PERLVARIC(var,type,init) Perl_Vars.var = init;
 #include "perlvars.h"
 #undef PERLVAR
 #undef PERLVARI
+#undef PERLVARIC
 #endif
 
     PERL_SYS_INIT(&argc,&argv);
@@ -45,7 +47,7 @@ RunPerl(int argc, char **argv, char **env, void *iosubsystem)
     return (exitstatus);
 }
 
-extern HANDLE PerlDllHandle;
+extern HANDLE w32_perldll_handle;
 
 BOOL APIENTRY
 DllMain(HANDLE hModule,                /* DLL module handle */
@@ -64,7 +66,7 @@ DllMain(HANDLE hModule,               /* DLL module handle */
        setmode( fileno( stderr ), O_BINARY );
        _fmode = O_BINARY;
 #endif
-       PerlDllHandle = hModule;
+       w32_perldll_handle = hModule;
        break;
 
        /* The DLL is detaching from a process due to