diff options
author | Brad King <brad.king@kitware.com> | 2015-02-06 18:09:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-06 18:32:26 (GMT) |
commit | 87be2e1427ba2b1b7697c9332487862917897dca (patch) | |
tree | 4880d84b5d265e45033a23258e2645bbfef0f795 /Source | |
parent | 44100adc6c7f7db7bfd4ccf0d8bd18de8ab195c0 (diff) | |
download | CMake-87be2e1427ba2b1b7697c9332487862917897dca.zip CMake-87be2e1427ba2b1b7697c9332487862917897dca.tar.gz CMake-87be2e1427ba2b1b7697c9332487862917897dca.tar.bz2 |
Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add
setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2
(Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale
calls added later in their spirit. CMake has not been taught how to
deal with non-C locales everywhere. We do not define any functionality
for character conversions for non-ASCII strings. Another solution will
be needed to address the original problem motivating addition of
setlocale() calls.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/cpack.cxx | 2 | ||||
-rw-r--r-- | Source/CursesDialog/ccmake.cxx | 3 | ||||
-rw-r--r-- | Source/cmakemain.cxx | 2 | ||||
-rw-r--r-- | Source/ctest.cxx | 3 |
4 files changed, 0 insertions, 10 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index c57028d..0173361 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -26,7 +26,6 @@ #include <cmsys/CommandLineArguments.hxx> #include <cmsys/SystemTools.hxx> #include <cmsys/Encoding.hxx> -#include <locale.h> //---------------------------------------------------------------------------- static const char * cmDocumentationName[][2] = @@ -101,7 +100,6 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, // this is CPack. int main (int argc, char const* const* argv) { - setlocale(LC_CTYPE, ""); cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = args.argc(); diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 28f3d9b..3d92a2d 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -16,7 +16,6 @@ #include <signal.h> #include <sys/ioctl.h> -#include <locale.h> #include "cmCursesMainForm.h" #include "cmCursesStandardIncludes.h" @@ -95,8 +94,6 @@ void CMakeMessageHandler(const char* message, const char* title, bool&, int main(int argc, char const* const* argv) { - setlocale(LC_CTYPE, ""); - cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = encoding_args.argc(); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 61b175e..e825f1f 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -25,7 +25,6 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include <cmsys/Encoding.hxx> -#include <locale.h> #ifdef CMAKE_BUILD_WITH_CMAKE //---------------------------------------------------------------------------- @@ -175,7 +174,6 @@ static void cmakemainProgressCallback(const char *m, float prog, int main(int ac, char const* const* av) { - setlocale(LC_CTYPE, ""); cmsys::Encoding::CommandLineArguments args = cmsys::Encoding::CommandLineArguments::Main(ac, av); ac = args.argc(); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index fb97af6..3fe31ca 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -19,7 +19,6 @@ #include "CTest/cmCTestScriptHandler.h" #include "CTest/cmCTestLaunch.h" #include "cmsys/Encoding.hxx" -#include <locale.h> //---------------------------------------------------------------------------- static const char * cmDocumentationName[][2] = @@ -117,8 +116,6 @@ static const char * cmDocumentationOptions[][2] = // this is a test driver program for cmCTest. int main (int argc, char const* const* argv) { - setlocale(LC_CTYPE, ""); - cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = encoding_args.argc(); |