-#ifdef UNDER_CE
-# define strcoll strcmp
-#endif
-
-/*****************************************************************************
- * getenv: just in case, but it should never be called
- *****************************************************************************/
-#if !defined( HAVE_GETENV )
-char *vlc_getenv( const char *name )
-{
- return NULL;
-}
-#endif
-
-/*****************************************************************************
- * strdup: returns a malloc'd copy of a string
- *****************************************************************************/
-#if !defined( HAVE_STRDUP )
-char *vlc_strdup( const char *string )
-{
- return strndup( string, strlen( string ) );
-}
-#endif
-
-/*****************************************************************************
- * strndup: returns a malloc'd copy of at most n bytes of string
- * Does anyone know whether or not it will be present in Jaguar?
- *****************************************************************************/
-#if !defined( HAVE_STRNDUP )
-char *vlc_strndup( const char *string, size_t n )
-{
- char *psz;
- size_t len = strlen( string );
-
- len = __MIN( len, n );
- psz = (char*)malloc( len + 1 );
-
- if( psz != NULL )
- {
- memcpy( (void*)psz, (const void*)string, len );
- psz[ len ] = 0;
- }
-
- return psz;
-}
-#endif
-
-/*****************************************************************************
- * strcasecmp: compare two strings ignoring case
- *****************************************************************************/
-#if !defined( HAVE_STRCASECMP ) && !defined( HAVE_STRICMP )
-int vlc_strcasecmp( const char *s1, const char *s2 )
-{
- int c1, c2;
- if( !s1 || !s2 ) return -1;
-
- while( *s1 && *s2 )
- {
- c1 = tolower(*s1);
- c2 = tolower(*s2);
-
- if( c1 != c2 ) return (c1 < c2 ? -1 : 1);
- s1++; s2++;
- }
-
- if( !*s1 && !*s2 ) return 0;
- else return (*s1 ? 1 : -1);
-}
-#endif
-
-/*****************************************************************************
- * strncasecmp: compare n chars from two strings ignoring case
- *****************************************************************************/
-#if !defined( HAVE_STRNCASECMP ) && !defined( HAVE_STRNICMP )
-int vlc_strncasecmp( const char *s1, const char *s2, size_t n )
-{
- int c1, c2;
- if( !s1 || !s2 ) return -1;
-
- while( n > 0 && *s1 && *s2 )
- {
- c1 = tolower(*s1);
- c2 = tolower(*s2);
-
- if( c1 != c2 ) return (c1 < c2 ? -1 : 1);
- s1++; s2++; n--;
- }
-
- if( !n || (!*s1 && !*s2) ) return 0;
- else return (*s1 ? 1 : -1);
-}
-#endif
-