diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-29 00:57:05 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-29 00:57:05 +0000 |
commit | ab39fa9dbf3b1a1fb7beb555653d0558a089397f (patch) | |
tree | abccfffeff91457eff4ae559229686123c8c6977 | |
parent | 064a70d4cb44455257b8caebe159b9d93a8f9025 (diff) | |
download | perl-ab39fa9dbf3b1a1fb7beb555653d0558a089397f.tar.gz |
[asperl] fix various shenanigans with C<environ>, BC and VC builds now pass
all tests
p4raw-id: //depot/asperl@1049
-rw-r--r-- | globals.c | 6 | ||||
-rw-r--r-- | win32/Makefile | 2 | ||||
-rw-r--r-- | win32/makefile.mk | 8 | ||||
-rw-r--r-- | win32/runperl.c | 8 | ||||
-rw-r--r-- | win32/win32.h | 14 | ||||
-rw-r--r-- | win32/win32iop.h | 4 |
6 files changed, 14 insertions, 28 deletions
@@ -1444,13 +1444,9 @@ CPerlObj::ErrorNo(void) 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) { diff --git a/win32/Makefile b/win32/Makefile index c79367682f..0d94244063 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -556,7 +556,7 @@ perlmain.c : runperl.c 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) \ diff --git a/win32/makefile.mk b/win32/makefile.mk index e482742b00..872ab835d3 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -705,14 +705,14 @@ perlmain.c : runperl.c 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) diff --git a/win32/runperl.c b/win32/runperl.c index ccb88061ed..9f2e5c170d 100644 --- a/win32/runperl.c +++ b/win32/runperl.c @@ -589,10 +589,8 @@ public: }; 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) @@ -922,11 +920,10 @@ public: }; 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) { @@ -995,7 +992,7 @@ main(int argc, char **argv, char **env) exit(exitstatus); - exitstatus = host.PerlParse(argc, argv, env); + exitstatus = host.PerlParse(argc, argv, NULL); if (!exitstatus) { @@ -1024,7 +1021,6 @@ xs_init(CPERLarg) #else /* PERL_OBJECT */ -/* Say NO to CPP! Hallelujah! */ #ifdef __GNUC__ /* * GNU C does not do __declspec() diff --git a/win32/win32.h b/win32/win32.h index 021cc48186..ceee4fe8b6 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -10,14 +10,12 @@ #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__ diff --git a/win32/win32iop.h b/win32/win32iop.h index a17134b0ff..37794f1e1b 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -159,7 +159,6 @@ END_EXTERN_C #undef fileno #endif -#ifndef PERL_OBJECT #define stderr win32_stderr() #define stdout win32_stdout() #define stdin win32_stdin() @@ -256,7 +255,6 @@ END_EXTERN_C #define ioctl win32_ioctl #define utime win32_utime #define wait win32_wait -#endif /* PERL_OBJECT */ #ifdef HAVE_DES_FCRYPT #undef crypt @@ -264,10 +262,8 @@ END_EXTERN_C #endif #ifndef USE_WIN32_RTL_ENV -#ifndef PERL_OBJECT #undef getenv #define getenv win32_getenv -#endif /* PERL_OBJECT */ #endif #endif /* WIN32IO_IS_STDIO */ |