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