void
CPerlObj::Init(void)
{
-#ifdef WIN32
- New(2904, environ, 1, char*);
- *environ = NULL;
-#endif
}
-#ifdef WIN32
+#ifdef WIN32 /* XXX why are these needed? */
bool
do_exec(char *cmd)
{
copy runperl.c perlmain.c
perlmain$(o) : perlmain.c
- $(CC) $(CFLAGS_O) -UPERLDLL $(EXEOUT_FLAG)$@ -c perlmain.c
+ $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
$(LINK32) -subsystem:console -out:$@ $(LINK_FLAGS) $(LIBFILES) \
copy runperl.c perlmain.c
perlmain$(o) : perlmain.c
- $(CC) $(CFLAGS_O) -UPERLDLL $(EXEOUT_FLAG)$@ -c perlmain.c
+ $(CC) $(CFLAGS_O) -UPERLDLL $(OBJOUT_FLAG)$@ -c perlmain.c
$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(LINK_FLAGS) \
- @$(mktmp c0x32$(o) $(PERLEXE_OBJ)\n \
- $@,\n \
- $(PERLIMPLIB) $(LIBFILES)\n)
+ @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,\\)\n \
+ $(@:s,\,\\),\n \
+ $(LIBFILES) $(PERLIMPLIB)\n)
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -o $@ $(LINK_FLAGS) \
$(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)
};
virtual PerlIO* Popen(const char *command, const char *mode)
{
-#ifdef __BORLANDC__
win32_fflush(stdout);
win32_fflush(stderr);
-#endif
return (PerlIO*)win32_popen(command, mode);
};
virtual int Pclose(PerlIO *stream)
};
inline int PerlParse(int argc, char** argv, char** env)
{
- char* environ = NULL;
int retVal;
try
{
- retVal = pPerl->perl_parse(xs_init, argc, argv, (env == NULL || *env == NULL ? &environ : env));
+ retVal = pPerl->perl_parse(xs_init, argc, argv, env);
}
catch(int x)
{
exit(exitstatus);
- exitstatus = host.PerlParse(argc, argv, env);
+ exitstatus = host.PerlParse(argc, argv, NULL);
if (!exitstatus)
{
#else /* PERL_OBJECT */
-/* Say NO to CPP! Hallelujah! */
#ifdef __GNUC__
/*
* GNU C does not do __declspec()
#define _INC_WIN32_PERL5
#ifdef PERL_OBJECT
-#define ENV_HV_NAME "ENV_HV_NAME"
-#define DYNAMIC_ENV_FETCH
-#define prime_env_iter()
-#ifdef PERL_GLOBAL_STRUCT
-#error PERL_GLOBAL_STRUCT cannot be defined with PERL_OBJECT
-#endif
-#define win32_get_stdlib PerlEnv_lib_path
-#define win32_get_sitelib PerlEnv_sitelib_path
+# define WIN32IO_IS_STDIO /* don't pull in custom stdio layer */
+# ifdef PERL_GLOBAL_STRUCT
+# error PERL_GLOBAL_STRUCT cannot be defined with PERL_OBJECT
+# endif
+# define win32_get_stdlib PerlEnv_lib_path
+# define win32_get_sitelib PerlEnv_sitelib_path
#endif
#ifdef __GNUC__
#undef fileno
#endif
-#ifndef PERL_OBJECT
#define stderr win32_stderr()
#define stdout win32_stdout()
#define stdin win32_stdin()
#define ioctl win32_ioctl
#define utime win32_utime
#define wait win32_wait
-#endif /* PERL_OBJECT */
#ifdef HAVE_DES_FCRYPT
#undef crypt
#endif
#ifndef USE_WIN32_RTL_ENV
-#ifndef PERL_OBJECT
#undef getenv
#define getenv win32_getenv
-#endif /* PERL_OBJECT */
#endif
#endif /* WIN32IO_IS_STDIO */