This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.h: explicitly declare "environ" in more places
authorAaron Crane <arc@cpan.org>
Wed, 18 Oct 2017 18:34:45 +0000 (19:34 +0100)
committerAaron Crane <arc@cpan.org>
Sat, 21 Oct 2017 15:59:39 +0000 (16:59 +0100)
commita54aca4b73c9f1159b75e9f3eb04745eb58cb485
tree0b4d67d21acd7229524906d7b56f3707fcadce7b
parentadf7d503e55721c500f0bf66560b8f5df7966fe7
perl.h: explicitly declare "environ" in more places

Some systems declare environ in some situations; others never do. (BSD
systems seem to fall into the latter category, for example.)

Previously, we declared environ in the absence of the DONT_DECLARE_STD cpp
symbol, but that symbol has now been removed (on the grounds that redeclaring
system functions is typically unhelpful). But it probably shouldn't have been
used to avoid declaring environ, because very few systems actually provide
declarations for that variable.

This change adds the environ declaration almost everywhere, on the grounds
that even where the system headers do declare it, an additional declaration
won't in fact hurt.
perl.h