freebsd-dev/lib/libc
Baptiste Daroussin 76e6db686e collate: Fix expansion substitions (broken upstream too)
Through testing, the user noted that some Cyrillic characters were not
sorting correctly, and this was confirmed.

After extensive testing and review, the localedef tool was eliminated
as the culprit.  The sustitutions were encoded correctly in LC_COLLATE.

The error was mainly in wcscoll where character expansions were
mishandled.  The main directive pass routines had to be written to
go back for a new collation value when the "state" variable was set.
Before pointers were being advanced, the second lookup was gettting
applied to the wrong character, etc.

The "eat expansion codes" section on collate.c also had a bug.  Later
own, the "state" variable logic was changed to only set if next
code was greater than zero (rather than >= 0).

Some additional cleanups got captured from previous work:
1) The previous commit moved the binary search comment from the
   correct location to a wrong location because it's wrong upstream
   in Illumos.  The comment has little value so I just removed it.
2) Don't check if pointers are null before freeing, this is
   redundant as free() handles null pointers.
3) The two binary search trees were standardized wrt initialization
4) On the binary search trees, a negative "high" exits rather than
   checking the table count again.

Submitted by:	marino
Obtained from:	DragonflyBSD
2015-10-23 23:24:03 +00:00
..
aarch64 Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
amd64 Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
arm Annotate arm userspace assembler sources stating their tolerance to 2015-09-29 16:09:58 +00:00
capability use .Mt to mark up email addresses consistently (part4) 2014-06-23 08:25:03 +00:00
compat-43 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:53:24 +00:00
db Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:55:00 +00:00
gdtoa Add missing include to eliminate -Wmissing-prototypes warning 2015-09-20 04:06:04 +00:00
gen wordexp: Rewrite to make WRDE_NOCMD reliable. 2015-09-30 21:32:29 +00:00
gmon Add declaration to eliminate -Wmissing-prototypes warning 2015-09-20 03:59:27 +00:00
i386 Switch libc from using _sig{procmask,action,suspend} symbols, which 2015-08-29 14:25:01 +00:00
iconv Fix improbable memory leak in _citrus_prop_read_str(). 2015-04-20 22:09:50 +00:00
include Switch libc from using _sig{procmask,action,suspend} symbols, which 2015-08-29 14:25:01 +00:00
inet Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:50:56 +00:00
isc Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-23 16:16:16 +00:00
locale collate: Fix expansion substitions (broken upstream too) 2015-10-23 23:24:03 +00:00
md Bring the md5 functions into libc for internal use only. 2014-08-12 12:25:56 +00:00
mips Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
nameser Add missing break. 2014-08-20 14:58:25 +00:00
net - address grammar 2015-10-05 18:09:43 +00:00
nls Use mdoc(7) macros to handle parenthesis 2015-04-26 10:54:52 +00:00
posix1e Remove names from some prototypes 2015-09-20 20:16:34 +00:00
powerpc Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
powerpc64 Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
quad Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support 2014-10-01 08:26:51 +00:00
regex Revert r286465. Retesting it showed that it just works. it might have been 2015-08-09 21:32:05 +00:00
resolv resolver: automatically reload /etc/resolv.conf 2015-10-14 14:26:44 +00:00
rpc Use proper function prototypes. 2015-10-07 19:55:58 +00:00
secure Remove a stale comment and clarify the original where it was taken from 2015-08-14 14:58:04 +00:00
softfloat Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP} 2014-03-04 02:19:39 +00:00
sparc64 Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
stdio Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:28:49 +00:00
stdlib Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:24:28 +00:00
stdtime Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:51:52 +00:00
string collate: Fix expansion substitions (broken upstream too) 2015-10-23 23:24:03 +00:00
sys Change the default setting of kern.ipc.shm_allow_removed from 0 to 1. 2015-10-10 09:29:47 +00:00
tests Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
uuid Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP} 2014-03-04 02:19:39 +00:00
xdr Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:52:13 +00:00
yp Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP} 2014-03-04 02:19:39 +00:00
libc.ldscript Attempt to move the POSIX iconv* symbols out of runtime linker space. 2013-11-17 22:52:17 +00:00
Makefile Move the stack protector to a new "secure" directory 2015-08-14 03:03:13 +00:00
Makefile.depend Update META_MODE dependencies. 2015-09-17 05:06:34 +00:00
Versions.def Fix the inheritance of the FBSDprivate_1.0 namespace. 2014-04-03 17:31:38 +00:00