]> git.sesse.net Git - vlc/commitdiff
Use AC_FUNC_STRCOLL / HAVE_STRCOLL
authorRafaël Carré <rafael.carre@gmail.com>
Fri, 19 Nov 2010 19:58:49 +0000 (20:58 +0100)
committerRafaël Carré <rafael.carre@gmail.com>
Fri, 19 Nov 2010 19:59:08 +0000 (20:59 +0100)
Windows CE for example doesn't have this function

configure.ac
modules/access/directory.c
modules/media_library/sql_monitor.c
src/input/subtitles.c

index 81d828f998c567c973551f65d0b0ee0c600ee6b6..c8db55459deae85c06a6a48925f4b811d7a6133f 100644 (file)
@@ -551,6 +551,9 @@ AC_CHECK_FUNCS(fdatasync,,
   [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
 AC_CHECK_FUNCS([accept4 dup3 eventfd vmsplice sched_getaffinity])
 
index 0e0d57e3b215bc35c5927eea20cc3332bf245cb0..7f295473019dc97a876f31f166c0265ffe2a413e 100644 (file)
@@ -98,7 +98,11 @@ static int visible (const char *name)
 
 static int collate (const char **a, const char **b)
 {
+#ifdef HAVE_STRCOLL
     return strcoll (*a, *b);
+#else
+    return strcmp  (*a, *b);
+#endif
 }
 
 /*****************************************************************************
index 5d7a74358d3613414d2ef49a8a4e9636bf2da7fa..b98aba6e7fa8fb8673530860e649b3bcb9ce6559 100644 (file)
@@ -28,6 +28,9 @@
 /** **************************************************************************
  * MONITORING AND DIRECTORY SCANNING FUNCTIONS
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+#   include "config.h"
+#endif
 
 #include "sql_media_library.h"
 #include "vlc_playlist.h"
@@ -190,7 +193,11 @@ int AddDirToMonitor( media_library_t *p_ml, const char *psz_dir )
 
 static int Sort( const char **a, const char **b )
 {
+#ifdef HAVE_STRCOLL
     return strcoll( *a, *b );
+#else
+    return strcmp( *a, *b );
+#endif
 }
 
 /**
index ed3f7c7248b564aaa65a0ccc8f5a8d5985db386d..6d37e6b63c383f39e2b6aac8653a1c69266333fc 100644 (file)
@@ -154,7 +154,7 @@ static int compare_sub_priority( const void *a, const void *b )
     if( p0->priority < p1->priority )
         return 1;
 
-#ifndef UNDER_CE
+#ifdef HAVE_STRCOLL
     return strcoll( p0->psz_fname, p1->psz_fname);
 #else
     return strcmp( p0->psz_fname, p1->psz_fname);