+2014-10-11 15:02 Christos Zoulas <christos@zoulas.com>
+
+ * fix autoconf glue for setlocale and locale_t; some OS's
+ have locale_t in xlocale.h
+
2014-10-10 15:01 Christos Zoulas <christos@zoulas.com>
* release 5.20
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h)
AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h)
-AC_CHECK_HEADERS(getopt.h err.h)
+AC_CHECK_HEADERS(getopt.h err.h xlocale.h)
AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h)
AC_CHECK_HEADERS(zlib.h)
fi])
dnl Checks for functions
-AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale)
+AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale)
dnl Provide implementation of some required functions if necessary
AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r pread strcasestr fmtcheck)
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: file.c,v 1.154 2014/09/10 18:41:51 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.155 2014/10/11 15:03:16 christos Exp $")
#endif /* lint */
#include "magic.h"
const char *magicfile = NULL; /* where the magic is */
/* makes islower etc work for other langs */
+#ifdef HAVE_SETLOCALE
(void)setlocale(LC_CTYPE, "");
+#endif
#ifdef __EMX__
/* sh-like wildcard expansion! Shouldn't hurt at least ... */
*/
/*
* file.h - definitions for file(1) program
- * @(#)$File: file.h,v 1.154 2014/09/10 18:41:51 christos Exp $
+ * @(#)$File: file.h,v 1.155 2014/10/11 15:03:16 christos Exp $
*/
#ifndef __file_h__
#if defined(HAVE_LOCALE_H)
#include <locale.h>
#endif
+#if defined(HAVE_XLOCALE_H)
+#include <xlocale.h>
+#endif
typedef struct {
const char *pat;