Commit 8d52ffe1 authored by Rafaël Carré's avatar Rafaël Carré

Use AC_FUNC_STRCOLL / HAVE_STRCOLL

Windows CE for example doesn't have this function
parent 62ac11ae
...@@ -551,6 +551,9 @@ AC_CHECK_FUNCS(fdatasync,, ...@@ -551,6 +551,9 @@ AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.]) [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
]) ])
# Windows CE doesn't have strcoll()
AC_FUNC_STRCOLL
dnl Check for non-standard system calls dnl Check for non-standard system calls
AC_CHECK_FUNCS([accept4 dup3 eventfd vmsplice sched_getaffinity]) AC_CHECK_FUNCS([accept4 dup3 eventfd vmsplice sched_getaffinity])
......
...@@ -98,7 +98,11 @@ static int visible (const char *name) ...@@ -98,7 +98,11 @@ static int visible (const char *name)
static int collate (const char **a, const char **b) static int collate (const char **a, const char **b)
{ {
#ifdef HAVE_STRCOLL
return strcoll (*a, *b); return strcoll (*a, *b);
#else
return strcmp (*a, *b);
#endif
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
/** ************************************************************************** /** **************************************************************************
* MONITORING AND DIRECTORY SCANNING FUNCTIONS * MONITORING AND DIRECTORY SCANNING FUNCTIONS
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "sql_media_library.h" #include "sql_media_library.h"
#include "vlc_playlist.h" #include "vlc_playlist.h"
...@@ -190,7 +193,11 @@ int AddDirToMonitor( media_library_t *p_ml, const char *psz_dir ) ...@@ -190,7 +193,11 @@ int AddDirToMonitor( media_library_t *p_ml, const char *psz_dir )
static int Sort( const char **a, const char **b ) static int Sort( const char **a, const char **b )
{ {
#ifdef HAVE_STRCOLL
return strcoll( *a, *b ); return strcoll( *a, *b );
#else
return strcmp( *a, *b );
#endif
} }
/** /**
......
...@@ -154,7 +154,7 @@ static int compare_sub_priority( const void *a, const void *b ) ...@@ -154,7 +154,7 @@ static int compare_sub_priority( const void *a, const void *b )
if( p0->priority < p1->priority ) if( p0->priority < p1->priority )
return 1; return 1;
#ifndef UNDER_CE #ifdef HAVE_STRCOLL
return strcoll( p0->psz_fname, p1->psz_fname); return strcoll( p0->psz_fname, p1->psz_fname);
#else #else
return strcmp( p0->psz_fname, p1->psz_fname); return strcmp( p0->psz_fname, p1->psz_fname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment