r4124: include locale.h to get LC_ALL in include/system/iconv.h
authorAndrew Tridgell <tridge@samba.org>
Fri, 10 Dec 2004 04:41:56 +0000 (04:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:06:28 +0000 (13:06 -0500)
(This used to be commit 573230ea99136bd66d00bac18effd28b1e5ba76f)

source4/build/m4/rewrite.m4
source4/include/system/iconv.h
source4/lib/charcnv.c

index e9a59a4012aa3c26ce8709e6337c39c7ade4d095..ddda3e8128b6cff11b8fe12bf0beeb5a793373cf 100644 (file)
@@ -241,7 +241,7 @@ AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h t
 AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
 AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h)
 AC_CHECK_HEADERS(sys/syslog.h syslog.h)
-AC_CHECK_HEADERS(stdint.h)
+AC_CHECK_HEADERS(stdint.h locale.h)
 
 #
 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
index bace51c029773fcbbe1ba978d714e5b0104be7ec..a0c1c18fa2f25d16f2798fee2f3aea4df8f73f02 100644 (file)
 #include <ctype.h>
 #endif
 
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
 /* needed for some systems without iconv. Doesn't really matter
    what error code we use */
 #ifndef EILSEQ
index fc1f511403dafc1f417c73561f56b4b116def8e0..7e9750e94889c47daf60db4fd7c32042a3e52d43 100644 (file)
@@ -89,7 +89,7 @@ static smb_iconv_t get_conv_handle(charset_t from, charset_t to)
        if (initialised == 0) {
                initialised = 1;
                
-#ifdef HAVE_SETLOCALE
+#ifdef LC_ALL
                /* we set back the locale to C to get ASCII-compatible
                   toupper/lower functions.  For now we do not need
                   any other POSIX localisations anyway. When we