[vlc-commits] commit: Use AC_FUNC_STRCOLL / HAVE_STRCOLL ( =?UTF-8?Q?Rafa=C3=ABl=20Carr=C3=A9=20?=)
git at videolan.org
git at videolan.org
Fri Nov 19 21:04:53 CET 2010
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Fri Nov 19 20:58:49 2010 +0100| [8d52ffe19f333502d2e5f31c51ac91ac62c019b9] | committer: Rafaël Carré
Use AC_FUNC_STRCOLL / HAVE_STRCOLL
Windows CE for example doesn't have this function
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d52ffe19f333502d2e5f31c51ac91ac62c019b9
---
configure.ac | 3 +++
modules/access/directory.c | 4 ++++
modules/media_library/sql_monitor.c | 7 +++++++
src/input/subtitles.c | 2 +-
4 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 81d828f..c8db554 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
diff --git a/modules/access/directory.c b/modules/access/directory.c
index 0e0d57e..7f29547 100644
--- a/modules/access/directory.c
+++ b/modules/access/directory.c
@@ -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
}
/*****************************************************************************
diff --git a/modules/media_library/sql_monitor.c b/modules/media_library/sql_monitor.c
index 5d7a743..b98aba6 100644
--- a/modules/media_library/sql_monitor.c
+++ b/modules/media_library/sql_monitor.c
@@ -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
}
/**
diff --git a/src/input/subtitles.c b/src/input/subtitles.c
index ed3f7c7..6d37e6b6 100644
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -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);
More information about the vlc-commits
mailing list