From 60c69445f6fa86b27bd697cc8af52b582f620725 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 10 Dec 2004 04:41:56 +0000 Subject: r4124: include locale.h to get LC_ALL in include/system/iconv.h (This used to be commit 573230ea99136bd66d00bac18effd28b1e5ba76f) --- source4/build/m4/rewrite.m4 | 2 +- source4/include/system/iconv.h | 4 ++++ source4/lib/charcnv.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4 index e9a59a4012..ddda3e8128 100644 --- a/source4/build/m4/rewrite.m4 +++ b/source4/build/m4/rewrite.m4 @@ -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. diff --git a/source4/include/system/iconv.h b/source4/include/system/iconv.h index bace51c029..a0c1c18fa2 100644 --- a/source4/include/system/iconv.h +++ b/source4/include/system/iconv.h @@ -33,6 +33,10 @@ #include #endif +#ifdef HAVE_LOCALE_H +#include +#endif + /* needed for some systems without iconv. Doesn't really matter what error code we use */ #ifndef EILSEQ diff --git a/source4/lib/charcnv.c b/source4/lib/charcnv.c index fc1f511403..7e9750e948 100644 --- a/source4/lib/charcnv.c +++ b/source4/lib/charcnv.c @@ -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 -- cgit