diff options
author | Gurusamy Sarathy <gsar@engin.umich.edu> | 1997-04-05 23:31:11 -0500 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-04 00:00:00 +0000 |
commit | dcb2879abe1a588042098f71cb130a72def08afb (patch) | |
tree | c07f969dda8b0f17c99a9ca1aa22548927abb147 /win32 | |
parent | 5b54f415353cb889898fb25391f5dff73990f3f2 (diff) | |
download | perl-dcb2879abe1a588042098f71cb130a72def08afb.tar.gz |
perlwin-97a_4: win32 environ fix
private-msgid: 199704060431.XAA23400@aatma.engin.umich.edu
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 6 | ||||
-rw-r--r-- | win32/win32io.c | 7 | ||||
-rw-r--r-- | win32/win32io.h | 1 | ||||
-rw-r--r-- | win32/win32iop.h | 3 |
4 files changed, 17 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index 7bb003d169..ed24251ba6 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -756,6 +756,12 @@ win32_errno(void) return (pIOSubSystem->pfnerrno()); } +DllExport char *** +win32_environ(void) +{ + return (pIOSubSystem->pfnenviron()); +} + /* the rest are the remapped stdio routines */ DllExport FILE * win32_stderr(void) diff --git a/win32/win32io.c b/win32/win32io.c index b4f58242cf..c9cc8e24e2 100644 --- a/win32/win32io.c +++ b/win32/win32io.c @@ -31,6 +31,12 @@ dummy_errno(void) return (&(errno)); } +static char *** +dummy_environ(void) +{ + return (&(_environ)); +} + /* the rest are the remapped stdio routines */ static FILE * dummy_stderr(void) @@ -184,6 +190,7 @@ __declspec(dllexport) WIN32_IOSUBSYSTEM win32stdio = { 12345678L, /* begin of structure; */ dummy_errno, /* (*pfunc_errno)(void); */ + dummy_environ, /* (*pfunc_environ)(void); */ dummy_stdin, /* (*pfunc_stdin)(void); */ dummy_stdout, /* (*pfunc_stdout)(void); */ dummy_stderr, /* (*pfunc_stderr)(void); */ diff --git a/win32/win32io.h b/win32/win32io.h index f73eea1322..4955973564 100644 --- a/win32/win32io.h +++ b/win32/win32io.h @@ -4,6 +4,7 @@ typedef struct { int signature_begin; int * (*pfnerrno)(void); +char ***(*pfnenviron)(void); FILE* (*pfnstdin)(void); FILE* (*pfnstdout)(void); FILE* (*pfnstderr)(void); diff --git a/win32/win32iop.h b/win32/win32iop.h index d699e03ab6..eadc08f812 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -10,6 +10,7 @@ * function prototypes for our own win32io layer */ EXT int * win32_errno(); +EXT char *** win32_environ(); EXT FILE* win32_stdin(void); EXT FILE* win32_stdout(void); EXT FILE* win32_stderr(void); @@ -77,6 +78,7 @@ void * SetIOSubSystem(void *piosubsystem); */ #ifndef WIN32IO_IS_STDIO #undef errno +#undef environ #undef stderr #undef stdin #undef stdout @@ -89,6 +91,7 @@ void * SetIOSubSystem(void *piosubsystem); #define feof(f) win32_feof(f) #define ferror(f) win32_ferror(f) #define errno (*win32_errno()) +#define environ (*win32_environ()) #define strerror win32_strerror /* |