Mercurial > ecos
comparison packages/language/c/libc/string/current/include/string.h @ 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 |
comparison
equal
deleted
inserted
replaced
| 2948:041821fb5427 | 2949:ae816c83f082 |
|---|---|
| 153 #ifndef __STRICT_ANSI__ | 153 #ifndef __STRICT_ANSI__ |
| 154 extern char * | 154 extern char * |
| 155 strdup( const char * ); | 155 strdup( const char * ); |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 // This is a GNU extension | |
| 159 #ifndef __STRICT_ANSI__ | |
| 160 # ifdef CYGFUN_LIBC_STRING_GNU_STRNLEN | |
| 161 extern size_t | |
| 162 strnlen( const char *, size_t ); | |
| 163 # endif | |
| 164 #endif | |
| 165 | |
| 158 #ifdef __cplusplus | 166 #ifdef __cplusplus |
| 159 } /* extern "C" */ | 167 } /* extern "C" */ |
| 160 #endif | 168 #endif |
| 161 | 169 |
| 162 /* INLINE FUNCTIONS */ | 170 /* INLINE FUNCTIONS */ |
