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 #define PERL_SYS_INIT(a, c)
35 main(int argc, char **argv, char **env)
40 /* XXX this _may_ be a problem on some compilers (e.g. Borland) that
41 * want to free() argv after main() returns. As luck would have it,
42 * Borland's CRT does the right thing to argv[0] already. */
43 char szModuleName[MAX_PATH];
46 GetModuleFileName(NULL, szModuleName, sizeof(szModuleName));
47 (void)win32_longpath(szModuleName);
48 argv[0] = szModuleName;
51 if (!host.PerlCreate())
54 exitstatus = host.PerlParse(xs_init, argc, argv, NULL);
57 exitstatus = host.PerlRun();
64 #else /* PERL_OBJECT */
68 * GNU C does not do __declspec()
70 #define __declspec(foo)
72 /* Mingw32 defaults to globing command line
73 * This is inconsistent with other Win32 ports and
74 * seems to cause trouble with passing -DXSVERSION=\"1.6\"
75 * So we turn it off like this:
82 __declspec(dllimport) int RunPerl(int argc, char **argv, char **env, void *ios);
85 main(int argc, char **argv, char **env)
88 /* XXX this _may_ be a problem on some compilers (e.g. Borland) that
89 * want to free() argv after main() returns. As luck would have it,
90 * Borland's CRT does the right thing to argv[0] already. */
91 char szModuleName[MAX_PATH];
94 GetModuleFileName(NULL, szModuleName, sizeof(szModuleName));
95 (void)win32_longpath(szModuleName);
96 argv[0] = szModuleName;
98 return RunPerl(argc, argv, env, (void*)0);
101 #endif /* PERL_OBJECT */