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];
45 GetModuleFileName(NULL, szModuleName, sizeof(szModuleName));
46 argv[0] = szModuleName;
49 if (!host.PerlCreate())
52 exitstatus = host.PerlParse(xs_init, argc, argv, NULL);
55 exitstatus = host.PerlRun();
62 #else /* PERL_OBJECT */
66 * GNU C does not do __declspec()
68 #define __declspec(foo)
70 /* Mingw32 defaults to globing command line
71 * This is inconsistent with other Win32 ports and
72 * seems to cause trouble with passing -DXSVERSION=\"1.6\"
73 * So we turn it off like this:
80 __declspec(dllimport) int RunPerl(int argc, char **argv, char **env, void *ios);
83 main(int argc, char **argv, char **env)
86 /* XXX this _may_ be a problem on some compilers (e.g. Borland) that
87 * want to free() argv after main() returns. As luck would have it,
88 * Borland's CRT does the right thing to argv[0] already. */
89 char szModuleName[MAX_PATH];
90 GetModuleFileName(NULL, szModuleName, sizeof(szModuleName));
91 argv[0] = szModuleName;
93 return RunPerl(argc, argv, env, (void*)0);
96 #endif /* PERL_OBJECT */