]> git.lyx.org Git - lyx.git/commitdiff
fix locale problem with --disable-nls
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 31 Oct 2001 12:43:09 +0000 (12:43 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 31 Oct 2001 12:43:09 +0000 (12:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2952 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
configure.in
src/ChangeLog
src/gettext.C

index 993d14abcfff4a6dc1eef6fe467c3651976fb9b6..0fa148507869c431536759c6fd2f3f5c6b811024 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-31  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * configure.in: check also for locale.h, so that things work out
+       correctly with --disable-nls
+
 2001-10-30  John Levon  <moz@compsoc.man.ac.uk>
 
        * README:
index c9c287a0e0597a98b8b1904835197474c5a19518..409f08939779cdf57321bfce7b968d318a9993f5 100644 (file)
@@ -262,7 +262,7 @@ AC_LANG_CPLUSPLUS
 # some standard header files
 AC_HEADER_DIRENT
 AC_HEADER_MAJOR
-AC_CHECK_HEADERS(sys/time.h sys/types.h sys/select.h strings.h)
+AC_CHECK_HEADERS(sys/time.h sys/types.h sys/select.h strings.h locale.h)
 
 # some annoying header files
 #LYX_PATH_HEADER(stl_string_fwd.h)
index 794672ec19be475009f1732196d71e10be9cb576..5a603c44032421282cfbf35b98ae3fb3198eecc3 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-31  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * gettext.C (locale_init): set LC_NUMERIC to "C" even if nls is
+       disabled. 
+
 2001-10-30  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyx_main.C: change ref to known bugs
index 77b1a672755bca096a9f6e2d725c9d8474288418..b80792ac22e2936744bc5a99bf3f0d485a9c91d4 100644 (file)
 
 #include <config.h>
 
+#ifdef HAVE_LOCALE_H
+#  include <locale.h>
+#endif
+
 #include "LString.h"
 
 #ifdef ENABLE_NLS
 
 #  if HAVE_GETTEXT
 #    include <libintl.h>      // use the header already in the system *EK*
-#    ifdef HAVE_LOCALE_H
-#      include <locale.h>        // for LC_MESSAGES
-#    endif
 #  else
 #    include "../intl/libintl.h"
 #  endif
@@ -54,9 +55,9 @@ void locale_init()
 {
 #  ifdef HAVE_LC_MESSAGES
        setlocale(LC_MESSAGES, "");
+#  endif
        setlocale(LC_CTYPE, "");
        setlocale(LC_NUMERIC, "C");
-#  endif
 }
 
 void gettext_init(string const & localedir)
@@ -74,5 +75,6 @@ void locale_init()
 
 void gettext_init(string const &)
 {
+       setlocale(LC_NUMERIC, "C");
 }
 #endif