projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
f9fc1ffa75dac6e0c816984e94fe8754cc93edae
[oweals/musl.git]
/
src
/
locale
/
duplocale.c
1
#include <stdlib.h>
2
#include <string.h>
3
#include "locale_impl.h"
4
#include "libc.h"
5
6
locale_t duplocale(locale_t old)
7
{
8
locale_t new;
9
new = calloc(1, sizeof *new);
10
if (new && old != LC_GLOBAL_LOCALE) memcpy(new, old, sizeof *new);
11
return new;
12
}
13
14
weak_alias(duplocale, __duplocale);