repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 21a0313b48f284dcfc3e2aeda62e656eb145663f:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 21a0313b48f284dcfc3e2aeda62e656eb145663f
Author: Emanuele Giaquinta 
Date:   Thu Jan 19 15:08:55 2012 +0000

    Remove check for setlocale, it is required.

diff --git a/configure.ac b/configure.ac
index 5e4b6bcb1174a847414ce6a3b4f4757446d0503a..
index ..d9c61763094d70a880ab8631a6feec1d2c3adb90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -626,12 +626,6 @@ fi
 LIBS=$save_LIBS
 CFLAGS=$save_CFLAGS

-AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])])
-if test x$rxvt_cv_func_setlocale = xyes; then
-  AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works)
-fi
-
 AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,
 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])])
 if test x$rxvt_cv_func_nl_langinfo = xyes; then
diff --git a/src/init.C b/src/init.C
index 4739a010d3a89ac6c668fba187f1ab8d389749e7..
index ..b65ceace43ad5de31de0937f2802f8b09ba31325 100644
--- a/src/init.C
+++ b/src/init.C
@@ -48,9 +48,7 @@
 # define X_LOCALE
 # include 
 #else
-# ifdef HAVE_SETLOCALE
-#  include 
-# endif
+# include 
 #endif

 #ifdef HAVE_NL_LANGINFO
@@ -987,7 +985,6 @@ rxvt_term::set_locale (const char *locale)
 {
   set_environ (envv);

-#if HAVE_XSETLOCALE || HAVE_SETLOCALE
   free (this->locale);
   this->locale = setlocale (LC_CTYPE, locale);

@@ -1008,7 +1005,6 @@ rxvt_term::set_locale (const char *locale)
   this->locale = strdup (this->locale);
   SET_LOCALE (this->locale);
   mbstate.reset ();
-#endif

 #if HAVE_NL_LANGINFO
   char *codeset = nl_langinfo (CODESET);
diff --git a/src/main.C b/src/main.C
index 053d459fdaedc18e1686b6ec6b12b8efdca77b2a..
index ..2b8224ab4230e346abdd28648779f8a784cb7ac2 100644
--- a/src/main.C
+++ b/src/main.C
@@ -48,9 +48,7 @@
 # define X_LOCALE
 # include 
 #else
-# ifdef HAVE_SETLOCALE
-#  include 
-# endif
+# include 
 #endif

 struct termios rxvt_term::def_tio;
@@ -1530,10 +1528,8 @@ rxvt_term::im_cb ()
   if (Input_Context)
     return;

-#if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE)
   if (rs[Rs_imLocale])
     SET_LOCALE (rs[Rs_imLocale]);
-#endif

   p = rs[Rs_inputMethod];
   if (p && *p)
@@ -1571,10 +1567,8 @@ rxvt_term::im_cb ()
     goto done;

 done: ;
-#if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE)
   if (rs[Rs_imLocale])
     SET_LOCALE (locale);
-#endif
 }

 void

-----END OF PAGE-----