# HG changeset patch # User Mike Miller # Date 1564703670 25200 # Node ID 463fc0cfed9050ca703c55e57ea9a643eb73ce9d # Parent 401a7cda7c9e5ae63f2a13f3b7bb43cc1b1c3ba1 initialize locale from values in the environment on interpreter start * interpreter.cc (interpreter::interpreter): Initialize locale from values in the environment. * bootstrap.conf (gnulib_modules): Include setlocale in the list. * configure.ac: Drop unnecessary test for presence of setlocale. * acinclude.m4 (OCTAVE_CHECK_QT): Likewise. diff -r 401a7cda7c9e -r 463fc0cfed90 bootstrap.conf --- a/bootstrap.conf Fri Aug 02 17:21:17 2019 +0200 +++ b/bootstrap.conf Thu Aug 01 16:54:30 2019 -0700 @@ -73,6 +73,7 @@ rewinddir rmdir select + setlocale sigaction signal sigprocmask diff -r 401a7cda7c9e -r 463fc0cfed90 configure.ac --- a/configure.ac Fri Aug 02 17:21:17 2019 +0200 +++ b/configure.ac Thu Aug 01 16:54:30 2019 -0700 @@ -1674,10 +1674,6 @@ AC_LANG_POP(C++) CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" - - AC_CHECK_FUNCS([setlocale], [], - [use_magick=no - warn_magick="$magick++ requires setlocale function. The imread, imwrite, and imfinfo functions for reading and writing image files will not be fully functional."]) ], [use_magick=no warn_magick="$magick++ library not found. The imread, imwrite, and imfinfo functions for reading and writing image files will not be fully functional."]) diff -r 401a7cda7c9e -r 463fc0cfed90 libinterp/corefcn/interpreter.cc --- a/libinterp/corefcn/interpreter.cc Fri Aug 02 17:21:17 2019 +0200 +++ b/libinterp/corefcn/interpreter.cc Thu Aug 01 16:54:30 2019 -0700 @@ -403,6 +403,7 @@ instance = this; // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting + setlocale (LC_ALL, ""); setlocale (LC_NUMERIC, "C"); setlocale (LC_TIME, "C"); sys::env::putenv ("LC_NUMERIC", "C"); diff -r 401a7cda7c9e -r 463fc0cfed90 m4/acinclude.m4 --- a/m4/acinclude.m4 Fri Aug 02 17:21:17 2019 +0200 +++ b/m4/acinclude.m4 Thu Aug 01 16:54:30 2019 -0700 @@ -1780,9 +1780,6 @@ if test -n "$warn_qt_tools"; then OCTAVE_CONFIGURE_WARNING([warn_qt_tools]) fi - if test -n "$warn_qt_setlocale"; then - OCTAVE_CONFIGURE_WARNING([warn_qt_setlocale]) - fi if test -n "$warn_qt_setvbuf"; then OCTAVE_CONFIGURE_WARNING([warn_qt_setvbuf]) fi @@ -1961,7 +1958,6 @@ warn_qt_libraries="" warn_qt_version="" warn_qt_tools="" - warn_qt_setlocale="" warn_qt_setvbuf="" warn_qt_lib_fcns="" warn_qt_abstract_item_model="" @@ -2078,12 +2074,6 @@ fi if test $build_qt_gui = yes; then - AC_CHECK_FUNCS([setlocale], [], - [build_qt_gui=no - warn_qt_setlocale="setlocale not found; disabling Qt GUI"]) - fi - - if test $build_qt_gui = yes; then case $host_os in mingw* | msdosmsvc*) AC_CHECK_FUNCS([setvbuf], [win32_terminal=yes],