summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-08-27 11:56:47 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-08-27 11:56:47 -0700
commit110d87a1cc6a47e31ad9d70cc6366dd81d213860 (patch)
treed6b77b26ec0ce70df4684c0a859989ff426e3ef5 /configure.ac
parent17d94f1ba4333a0d53558af02583dbf80e9157ff (diff)
downloademacs-110d87a1cc6a47e31ad9d70cc6366dd81d213860.tar.gz
Improve robustness of new string-collation code.
* configure.ac (newlocale): Check for this, not for uselocale. * src/sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t) (newlocale, wcscoll_l): Define substitutes for platforms that lack them, so as to simplify the mainline code. (str_collate): Simplify the code by assuming the above definitions. Use wcscoll_l, not uselocale, as uselocale is too fragile. For example, the old version left the Emacs in the wrong locale if wcscoll reported an error. Use 'int', not ptrdiff_t, for the int result. Report an error if newlocale fails. Fixes: debbugs:18051
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4f22be4745d..4617942409a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3558,7 +3558,7 @@ LIBS="$LIB_PTHREAD $LIB_MATH $LIBS"
AC_CHECK_FUNCS(accept4 fchdir gethostname \
getrusage get_current_dir_name \
lrand48 random rint \
-select getpagesize setlocale uselocale \
+select getpagesize setlocale newlocale \
getrlimit setrlimit shutdown getaddrinfo \
pthread_sigmask strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \