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 *
|
2002-07-24 05:38:00 +08:00
|
|
|
_DEFUN (strndup, (str, n),
|
|
|
|
_CONST char *str _AND
|
|
|
|
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 */
|