repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Expand PMF_FN_* macros.
[netbsd-mini2440.git]
/
dist
/
ntp
/
libopts
/
compat
/
strdup.c
blob
fbfa64f06f25d807b8d5135ac8f88ccf1c5dd8d7
1
/* $NetBSD$ */
2
3
/*
4
* Platforms without strdup ?!?!?!
5
*/
6
7
static char
*
8
strdup
(
char const
*
s
)
9
{
10
char
*
cp
;
11
12
if
(
s
==
NULL
)
13
return
NULL
;
14
15
cp
= (
char
*)
AGALOC
((
unsigned
) (
strlen
(
s
)+
1
),
"strdup"
);
16
17
if
(
cp
!=
NULL
)
18
(
void
)
strcpy
(
cp
,
s
);
19
20
return
cp
;
21
}