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

16 lines
213 B
C
Raw Permalink 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 *
strndup (const char *str,
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 */