summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f27f957)
The changes of r69564 making "environ" declaration unconditional broke
MinGW 4.6 build, presumably because "environ" is declared differently (as DLL
exported?) there, so avoid declaring it under MSW, we don't need to do it
there anyhow as it's always defined in system headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69927
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Both POSIX and Single UNIX Specification say that this variable must
// exist but not that it must be declared anywhere and, indeed, it's not
// Both POSIX and Single UNIX Specification say that this variable must
// exist but not that it must be declared anywhere and, indeed, it's not
- // declared in several common systems (some BSDs, Solaris with native CC).
+ // declared in several common systems (some BSDs, Solaris with native CC)
+ // so we (re)declare it ourselves to deal with these cases. However we do
+ // not do this under MSW where there can be DLL-related complications, i.e.
+ // the variable might be DLL-imported or not. Luckily we don't have to
+ // worry about this as all MSW compilers do seem to define it in their
+ // standard headers anyhow so we can just rely on already having the
+ // correct declaration. And if this turns out to be wrong, we can always
+ // add a configure test checking whether it is declared later.
+#ifndef __WXMSW__
char **env = environ;
#endif
char **env = environ;
#endif