From 7799245100a91b10b9a4ca9c6e818a3cdd8d5dc9 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 30 Mar 2016 17:38:26 +0000 Subject: Avoid vfprintf_l() that may be missing on Linux git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11478 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Posix/Fl_Posix_System_Driver.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index 2d7abb575..c6ca65585 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -22,9 +22,6 @@ #include #include #include -#ifdef __APPLE_CC__ // allows Darwin + X11 -#include -#endif extern XIC fl_xim_ic; // in Fl_x.cxx @@ -69,8 +66,11 @@ void Fl_Posix_System_Driver::compose_reset() } int Fl_Posix_System_Driver::clocale_printf(FILE *output, const char *format, va_list args) { - static locale_t postscript_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0); - return vfprintf_l(output, postscript_locale, format, args); + char *saved_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); + int retval = vfprintf(output, format, args); + setlocale(LC_NUMERIC, saved_locale); + return retval; } // -- cgit v1.2.3