This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: use our own environ implementation
[perl5.git] / perl.h
diff --git a/perl.h b/perl.h
index 9178dfc..9ff2015 100644 (file)
--- a/perl.h
+++ b/perl.h
 /* If this causes problems, set i_unistd=undef in the hint file.  */
 #ifdef I_UNISTD
 #   include <unistd.h>
+#   if defined(__amigaos4__)
+/* Under AmigaOS 4 newlib.library provides an environ.  However using
+ * it doesn't give us enough control over inheritance of variables by
+ * subshells etc. so replace with custom version based on abc-shell
+ * code. */
+extern char **myenviron;
+#       undef environ
+#       define environ myenviron
+#   endif
 #endif
 
 /* for WCOREDUMP */