*****************************************************************************/
#include <vlc/vlc.h>
-#include <string.h> /* strdup() */
-#include <stdlib.h>
#include <ctype.h>
}
#endif
+/*****************************************************************************
+ * strnlen:
+ *****************************************************************************/
+#if !defined( HAVE_STRNLEN )
+size_t vlc_strnlen( const char *psz, size_t n )
+{
+ const char *psz_end = memchr( psz, 0, n );
+ return psz_end ? (size_t)( psz_end - psz ) : n;
+}
+#endif
+
/*****************************************************************************
* strcasecmp: compare two strings ignoring case
*****************************************************************************/
if( !psz_big || !psz_little || !*psz_little ) return p_pos;
- while( *p_pos )
+ while( *p_pos )
{
if( toupper( *p_pos ) == toupper( *psz_little ) )
{
}
#endif
-#if defined (WIN32) || !defined (HAVE_SHARED_LIBVLC)
+#ifdef WIN32
/*****************************************************************************
* dgettext: gettext for plugins.
*****************************************************************************/
const char *p_in, size_t i_in,
char **pp_data, size_t *pi_data )
{
+ (void)i_argc; // <-- hmph
#ifdef HAVE_FORK
# define BUFSIZE 1024
int fds[2], i_status;