fix locale problem with --disable-nls

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2952 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-10-31 12:43:09 +00:00
parent fcb060f97d
commit 6a10fbcc39
4 changed files with 17 additions and 5 deletions

View File

@ -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:

View 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)

View 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

View File

@ -10,15 +10,16 @@
#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