2000-02-18 03:39:52 +08:00
|
|
|
#ifndef _REENT_ONLY
|
|
|
|
|
2002-07-24 05:38:00 +08:00
|
|
|
#include <_ansi.h>
|
2000-02-18 03:39:52 +08:00
|
|
|
#include <reent.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
char *
|
2017-12-04 11:43:30 +08:00
|
|
|
strndup (const char *str,
|
2002-07-24 05:38:00 +08:00
|
|
|
size_t n)
|
2000-02-18 03:39:52 +08:00
|
|
|
{
|
2002-07-24 05:38:00 +08:00
|
|
|
return _strndup_r (_REENT, str, n);
|
2000-02-18 03:39:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* !_REENT_ONLY */
|