Lines 22-33
Link Here
|
22 |
#include <stddef.h> |
22 |
#include <stddef.h> |
23 |
#include <stdlib.h> |
23 |
#include <stdlib.h> |
24 |
#include "localeinfo.h" |
24 |
#include "localeinfo.h" |
|
|
25 |
#include <shlib-compat.h> |
25 |
|
26 |
|
26 |
|
27 |
|
27 |
/* Return a string with the data for locale-dependent parameter ITEM. */ |
28 |
/* Return a string with the data for locale-dependent parameter ITEM. */ |
28 |
|
29 |
|
29 |
char * |
30 |
char * |
30 |
__nl_langinfo_l (nl_item item, __locale_t l) |
31 |
__nl_langinfo_l_internal (nl_item item, __locale_t l) |
31 |
{ |
32 |
{ |
32 |
int category = _NL_ITEM_CATEGORY (item); |
33 |
int category = _NL_ITEM_CATEGORY (item); |
33 |
unsigned int index = _NL_ITEM_INDEX (item); |
34 |
unsigned int index = _NL_ITEM_INDEX (item); |
Lines 65-69
__nl_langinfo_l (nl_item item, __locale_t l)
Link Here
|
65 |
/* Return the string for the specified item. */ |
66 |
/* Return the string for the specified item. */ |
66 |
return (char *) data->values[index].string; |
67 |
return (char *) data->values[index].string; |
67 |
} |
68 |
} |
68 |
libc_hidden_def (__nl_langinfo_l) |
69 |
strong_alias (__nl_langinfo_l_internal, __nl_langinfo_l_internal_alias) |
69 |
weak_alias (__nl_langinfo_l, nl_langinfo_l) |
70 |
versioned_symbol (libc, __nl_langinfo_l_internal, |
|
|
71 |
__nl_langinfo_l, GLIBC_2_26); |
72 |
libc_hidden_ver (__nl_langinfo_l_internal, __nl_langinfo_l) |
73 |
versioned_symbol (libc, __nl_langinfo_l_internal_alias, |
74 |
nl_langinfo_l, GLIBC_2_26); |
75 |
libc_hidden_ver (__nl_langinfo_l_internal_alias, nl_langinfo_l) |
76 |
|
77 |
|
78 |
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_26) |
79 |
char * |
80 |
attribute_compat_text_section |
81 |
__nl_langinfo_noaltmon_l (nl_item item, __locale_t l) |
82 |
{ |
83 |
if ((item >= ALTMON_1 && item <= ALTMON_12) |
84 |
|| (item >= _NL_WALTMON_1 && item <= _NL_WALTMON_12)) |
85 |
/* Pretend it's a bogus index for this category: bogus item. */ |
86 |
return (char *) ""; |
87 |
else if (item >= MON_1 && item <= MON_12) |
88 |
{ |
89 |
/* ALTMON_... item contains what MON_... item contained before. */ |
90 |
return __nl_langinfo_l (item + ALTMON_1 - MON_1, l); |
91 |
} |
92 |
else if (item >= _NL_WMON_1 && item <= _NL_WMON_12) |
93 |
{ |
94 |
/* The same for _NL_WALTMON_... and _NL_WMON_... */ |
95 |
return __nl_langinfo_l (item + _NL_WALTMON_1 - _NL_WMON_1, l); |
96 |
} |
97 |
|
98 |
/* Default result if it is not a month. */ |
99 |
return __nl_langinfo_l (item, l); |
100 |
} |
101 |
libc_hidden_def (__nl_langinfo_noaltmon_l) |
102 |
#endif |
103 |
|
104 |
#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_26) |
105 |
strong_alias (__nl_langinfo_noaltmon_l, __nl_langinfo_noaltmon_l_alias) |
106 |
compat_symbol (libc, __nl_langinfo_noaltmon_l_alias, |
107 |
__nl_langinfo_l, GLIBC_2_2); |
108 |
#endif |
109 |
|
110 |
#if SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_26) |
111 |
compat_symbol (libc, __nl_langinfo_noaltmon_l, nl_langinfo_l, GLIBC_2_3); |
112 |
#endif |
70 |
- |
|
|