]> git.sesse.net Git - vlc/commitdiff
strnlen: export its VLC pendant properly and check its existance in cc.c. Fixes the...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 27 Jan 2008 17:56:28 +0000 (17:56 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 27 Jan 2008 17:56:28 +0000 (17:56 +0000)
include/vlc_common.h
modules/codec/cc.c

index 3ffde4c544d92432fd6bcd2e0db7ce8e3e7c78bd..59c198b70c6af24abc7ac85c40b154cd23b4cd3e 100644 (file)
@@ -824,6 +824,7 @@ VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) );
 VLC_EXPORT( double, vlc_atof, ( const char *nptr ) );
 VLC_EXPORT( int64_t, vlc_atoll, ( const char *nptr ) );
 VLC_EXPORT( int64_t, vlc_strtoll, ( const char *nptr, char **endptr, int base ) );
+VLC_EXPORT( size_t, vlc_strnlen, ( const char *, size_t ) );
 
 #if defined(SYS_BEOS) \
  || (defined (__FreeBSD__) && (__FreeBSD__ < 5))
index 4ccd807866bd60b41339e85ad03a8cac1e030372..5b3371cbaed852cf355f517d9c69dd5acd26ac5b 100644 (file)
 #include <errno.h>
 #include <string.h>
 
+#if !defined( strnlen )
+#define strnlen vlc_strnlen
+#endif
+
 /*****************************************************************************
  * Module descriptor.
  *****************************************************************************/