14 char *staticlinkmodules[] = {
19 EXTERN_C void boot_DynaLoader _((CV* cv _CPERLarg));
24 char *file = __FILE__;
26 newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
32 main(int argc, char **argv, char **env)
37 /* XXX this _may_ be a problem on some compilers (e.g. Borland) that
38 * want to free() argv after main() returns. As luck would have it,
39 * Borland's CRT does the right thing to argv[0] already. */
40 char szModuleName[MAX_PATH];
43 GetModuleFileName(NULL, szModuleName, sizeof(szModuleName));
44 (void)win32_longpath(szModuleName);
45 argv[0] = szModuleName;
48 PERL_SYS_INIT(&argc,&argv);
50 if (!host.PerlCreate())
53 exitstatus = host.PerlParse(xs_init, argc, argv, NULL);
56 exitstatus = host.PerlRun();
63 #else /* PERL_OBJECT */
67 * GNU C does not do __declspec()
69 #define __declspec(foo)
71 /* Mingw32 defaults to globing command line
72 * This is inconsistent with other Win32 ports and
73 * seems to cause trouble with passing -DXSVERSION=\"1.6\"
74 * So we turn it off like this:
81 __declspec(dllimport) int RunPerl(int argc, char **argv, char **env, void *ios);
84 main(int argc, char **argv, char **env)
87 /* XXX this _may_ be a problem on some compilers (e.g. Borland) that
88 * want to free() argv after main() returns. As luck would have it,
89 * Borland's CRT does the right thing to argv[0] already. */
90 char szModuleName[MAX_PATH];
93 GetModuleFileName(NULL, szModuleName, sizeof(szModuleName));
94 (void)win32_longpath(szModuleName);
95 argv[0] = szModuleName;
97 return RunPerl(argc, argv, env, (void*)0);
100 #endif /* PERL_OBJECT */