blob: 7d858048d193908f46314d29b651414696de7938 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$NetBSD: patch-ag,v 1.2 2002/07/21 19:26:30 schmonz Exp $
Fix inspired by glibc, which gets it wrong.
--- intl/l10nflist.c.orig Wed Apr 29 12:38:06 1998
+++ intl/l10nflist.c
@@ -349,8 +349,9 @@ _nl_make_l10nflist (l10nfile_list, dirli
/* Normalize codeset name. There is no standard for the codeset
names. Normalization allows the user to use any of the common
- names. */
-const char *
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
+char *
_nl_normalize_codeset (codeset, name_len)
const unsigned char *codeset;
size_t name_len;
@@ -388,7 +389,7 @@ _nl_normalize_codeset (codeset, name_len
*wp = '\0';
}
- return (const char *) retval;
+ return retval;
}
|