newlib-cygwin/newlib/libc/string/strndup.c

17 lines
238 B
C
Raw Normal View History

2000-02-18 03:39:52 +08:00
#ifndef _REENT_ONLY
#include <_ansi.h>
2000-02-18 03:39:52 +08:00
#include <reent.h>
#include <stdlib.h>
#include <string.h>
char *
_DEFUN (strndup, (str, n),
_CONST char *str _AND
size_t n)
2000-02-18 03:39:52 +08:00
{
return _strndup_r (_REENT, str, n);
2000-02-18 03:39:52 +08:00
}
#endif /* !_REENT_ONLY */