1
0
Эх сурвалжийг харах

KWSys: Remove unused environ declaration from SystemTools

Commit "KWSys: Fix SystemTools environment memory handling" (2012-04-26)
added a _WIN32 case inside !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H to dllimport
the "environ" global.  Howver, KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H is true
on every Windows toolchain we support so the case is never reached.
Furthermore, even if it were reached the use of dllimport is incorrect
because the toolchain might not be compiling with a dynamic runtime
library.  Remove the unused incorrect line and supporting conditionals.
Brad King 13 жил өмнө
parent
commit
0fbaa63cb2

+ 0 - 4
Source/kwsys/SystemTools.cxx

@@ -81,11 +81,7 @@
 #endif
 #endif
 
 
 #if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
 #if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
-# if defined(_WIN32)
-extern __declspec(dllimport) char **environ;
-# else
 extern char **environ;
 extern char **environ;
-# endif
 #endif
 #endif
 
 
 #ifdef __CYGWIN__
 #ifdef __CYGWIN__