Mercurial > ecos
diff packages/language/c/libc/string/current/include/stringsupp.hxx @ 2949:ae816c83f082
* include/string.h: Declare strnlen.
* include/stringsupp.hxx: Declare __strnlen.
* src/strnlen.cxx, tests/strnlen.c: Created.
* cdl/string.cdl (CYGFUN_LIBC_STRING_GNU_STRNLEN): New option,
compiles strnlen.cxx.
(CYGPKG_LIBC_STRING_TESTS): Add strnlen test.
| author | jlarmour |
|---|---|
| date | Tue, 11 May 2010 16:26:19 +0000 |
| parents | 74dbf4c3f2e1 |
| children |
line wrap: on
line diff
--- a/packages/language/c/libc/string/current/include/stringsupp.hxx +++ b/packages/language/c/libc/string/current/include/stringsupp.hxx @@ -212,6 +212,14 @@ __externC char * __strdup( const char * ); +// NB This is a GNU extension +#ifndef __STRICT_ANSI__ +# ifdef CYGFUN_LIBC_STRING_GNU_STRNLEN +__externC size_t +__strnlen( const char *, size_t ); +# endif +#endif + #endif // CYGONCE_LIBC_STRING_STRINGSUPP_HXX multiple inclusion protection // EOF stringsupp.hxx
