[vlc-devel] commit: If uselocale() is absent, assume libc does no localization ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu May 22 18:41:15 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu May 22 19:42:46 2008 +0300| [9298671dc006165c536e499e5721b7614d8ce829]

If uselocale() is absent, assume libc does no localization

Otherwise, the user is screwed anyway

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9298671dc006165c536e499e5721b7614d8ce829
---

 configure.ac         |    2 +-
 include/vlc_fixups.h |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index fcf564c..a8f6bef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,7 +483,7 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise])
+AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise uselocale])
 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
 AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 98b6174..ea464a4 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -156,4 +156,11 @@ VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) );
 VLC_INTERNAL( long, vlc_telldir, ( void * ) );
 #endif
 
+#ifndef HAVE_USELOCALE
+typedef void *locale_t;
+# define newlocale( a, b, c ) ((locale_t)0)
+# define uselocale( a ) ((locale_t)0)
+# define freelocale( a ) (void)0
+#endif
+
 #endif /* !LIBVLC_FIXUPS_H */




More information about the vlc-devel mailing list