Commit 54a847e6 authored by Pierre Ynard's avatar Pierre Ynard

Use ifdef's to guard against setlocale() in vlc-cache-gen

parent 474088e2
......@@ -25,7 +25,10 @@
#include <vlc/vlc.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#ifdef HAVE_SETLOCALE
# include <locale.h>
#endif
#ifdef HAVE_GETOPT_H
# include <getopt.h>
......@@ -56,7 +59,9 @@ int main (int argc, char *argv[])
{ NULL, no_argument, NULL, '\0'}
};
#ifdef HAVE_SETLOCALE
setlocale (LC_CTYPE, ""); /* needed by FromLocale() */
#endif
int c;
while ((c = getopt_long (argc, argv, "hV", opts, NULL)) != -1)
......
......@@ -562,7 +562,7 @@ dnl Check for system libs needed
need_libc=false
dnl Check for usual libc functions
AC_CHECK_FUNCS([ctime_r daemon fcntl fdopendir fork getenv getpwuid_r gettimeofday isatty lstat memalign posix_fadvise posix_madvise posix_memalign putenv setenv stricmp strnicmp tdestroy uselocale])
AC_CHECK_FUNCS([ctime_r daemon fcntl fdopendir fork getenv getpwuid_r gettimeofday isatty lstat memalign posix_fadvise posix_madvise posix_memalign putenv setenv setlocale stricmp strnicmp tdestroy uselocale])
AC_REPLACE_FUNCS([asprintf atof atoll getcwd getpid gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab vasprintf])
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
......
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