Mercurial > hg > sv-dependency-builds
comparison src/libvorbis-1.3.3/macos/compat/strdup.c @ 1:05aa0afa9217
Bring in flac, ogg, vorbis
author | Chris Cannam |
---|---|
date | Tue, 19 Mar 2013 17:37:49 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:c7265573341e | 1:05aa0afa9217 |
---|---|
1 #include <ogg/os_types.h> | |
2 #include <sys/types.h> | |
3 #include <string.h> | |
4 #include <stdlib.h> | |
5 | |
6 char *strdup(const char *inStr) | |
7 { | |
8 char *outStr = NULL; | |
9 | |
10 if (inStr == NULL) { | |
11 return NULL; | |
12 } | |
13 | |
14 outStr = _ogg_malloc(strlen(inStr) + 1); | |
15 | |
16 if (outStr != NULL) { | |
17 strcpy(outStr, inStr); | |
18 } | |
19 | |
20 return outStr; | |
21 } |