summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epoc/epocish.h1
-rw-r--r--perl.h8
-rw-r--r--unixish.h3
-rw-r--r--util.c6
-rw-r--r--vms/vmsish.h2
5 files changed, 15 insertions, 5 deletions
diff --git a/epoc/epocish.h b/epoc/epocish.h
index 31da472bd4..551d1f51d7 100644
--- a/epoc/epocish.h
+++ b/epoc/epocish.h
@@ -141,3 +141,4 @@ double epoc_atof( const char *ptr);
#define init_os_extras Perl_init_os_extras
+#define NO_ENVIRON_ARRAY
diff --git a/perl.h b/perl.h
index 8f19950bbf..6873da2893 100644
--- a/perl.h
+++ b/perl.h
@@ -1628,7 +1628,11 @@ typedef struct ptr_tbl PTR_TBL_t;
# endif
# endif
# endif
-#endif
+#endif
+
+#ifndef NO_ENVIRON_ARRAY
+# define USE_ENVIRON_ARRAY
+#endif
#ifndef PERL_SYS_INIT3
# define PERL_SYS_INIT3(argvp,argcp,envp) PERL_SYS_INIT(argvp,argcp)
@@ -2279,7 +2283,7 @@ EXT char *** environ_pointer;
# endif
#else
/* VMS and some other platforms don't use the environ array */
-# if !defined(VMS)
+# ifdef USE_ENVIRON_ARRAY
# if !defined(DONT_DECLARE_STD) || \
(defined(__svr4__) && defined(__GNUC__) && defined(sun)) || \
defined(__sgi) || \
diff --git a/unixish.h b/unixish.h
index 7b8ef164c0..5815a19ea7 100644
--- a/unixish.h
+++ b/unixish.h
@@ -145,3 +145,6 @@
#define BIT_BUCKET "/dev/null"
#define dXSUB_SYS
+
+#define USE_ENVIRON_ARRAY
+
diff --git a/util.c b/util.c
index 2548f509c9..0c26f8310b 100644
--- a/util.c
+++ b/util.c
@@ -1934,9 +1934,9 @@ Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args)
}
}
-#if !defined( VMS) && !defined(EPOC)
- /* VMS' and EPOC's my_setenv() is in VMS.c */
-#if !defined(WIN32) && !defined(__CYGWIN__) &&
+#ifdef USE_ENVIRON_ARRAY
+ /* VMS' and EPOC's my_setenv() is in vms.c and epoc.c */
+#if !defined(WIN32) && !defined(__CYGWIN__)
void
Perl_my_setenv(pTHX_ char *nam, char *val)
{
diff --git a/vms/vmsish.h b/vms/vmsish.h
index 104eabce1e..49e53e74e2 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -777,4 +777,6 @@ typedef char __VMS_SEPYTOTORP__;
# undef fileno
#endif
+#define NO_ENVIRON_ARRAY
+
#endif /* __vmsish_h_included */