1 /*
2 Copyright (c) 2016 Corinna Vinschen <corinna@vinschen.de>
3  */
4 /*
5 FUNCTION
6 	<<strcoll_l>>---locale-specific character string compare
7 
8 INDEX
9 	strcoll_l
10 
11 SYNOPSIS
12 	#include <string.h>
13 	int strcoll_l(const char *<[stra]>, const char * <[strb]>,
14 		      locale_t <[locale]>);
15 
16 DESCRIPTION
17 	<<strcoll_l>> compares the string pointed to by <[stra]> to
18 	the string pointed to by <[strb]>, using an interpretation
19 	appropriate to the current <<LC_COLLATE>> state.
20 
21 	(NOT Cygwin:) The current implementation of <<strcoll_l>> simply
22 	uses <<strcmp>> and does not support any language-specific sorting.
23 
24 	If <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the
25 	behaviour is undefined.
26 
27 RETURNS
28 	If the first string is greater than the second string,
29 	<<strcoll_l>> returns a number greater than zero.  If the two
30 	strings are equivalent, <<strcoll_l>> returns zero.  If the first
31 	string is less than the second string, <<strcoll_l>> returns a
32 	number less than zero.
33 
34 PORTABILITY
35 <<strcoll_l>> is POSIX-1.2008.
36 
37 <<strcoll_l>> requires no supporting OS subroutines.
38 
39 QUICKREF
40 	strcoll_l ansi pure
41 */
42 
43 #define _DEFAULT_SOURCE
44 #include <string.h>
45 
46 int
strcoll_l(const char * a,const char * b,struct __locale_t * locale)47 strcoll_l (const char *a, const char *b, struct __locale_t *locale)
48 {
49   (void) locale;
50   return strcmp (a, b);
51 }
52