]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
BuildSystem: Detect whether uselocale(.) is available.
authorAlexander Traud <pabstraud@compuserve.com>
Sat, 3 Mar 2018 12:56:03 +0000 (13:56 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Sat, 3 Mar 2018 12:57:53 +0000 (06:57 -0600)
ASTERISK-27712
Reported by: Joerg Sonnenberger, D'Arcy Cain

Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807

configure
configure.ac
include/asterisk/autoconfig.h.in
main/stdtime/localtime.c

index aac26236b1501dedb8fcef703beead138168fca7..d887af638040d55bdac000b0cd54640e58dda1b0 100755 (executable)
--- a/configure
+++ b/configure
@@ -16665,7 +16665,7 @@ fi
 done
 
 
-for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
+for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv uselocale utime vasprintf getpeereid sysctl swapctl
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
index 233a52dac39e3071637902c97112afaef7108f45..fbc111a1f9a01e3a1083e7ba91da735471db1088 100644 (file)
@@ -753,7 +753,7 @@ AC_FUNC_STRNLEN
 AC_FUNC_STRTOD
 AC_FUNC_UTIME_NULL
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
+AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv uselocale utime vasprintf getpeereid sysctl swapctl])
 
 AC_MSG_CHECKING(for htonll)
 AC_LINK_IFELSE(
index e2113e9add115844651c0fd4b199532c18880a5f..aaee218c9537084dedbde00ebddda25577da6ec9 100644 (file)
 /* Define to 1 if you have the uriparser library library. */
 #undef HAVE_URIPARSER
 
+/* Define to 1 if you have the `uselocale' function. */
+#undef HAVE_USELOCALE
+
 /* Define to 1 if you have the `utime' function. */
 #undef HAVE_UTIME
 
index 2976e59c119737c6159a0c955816720274b79b4e..d0be9bb843d1c29aa504e1a2536d5d44b828c9ce 100644 (file)
@@ -310,7 +310,7 @@ static struct state *       sstate_alloc(void);
 static void            sstate_free(struct state *p);
 
 static AST_LIST_HEAD_STATIC(zonelist, state);
-#ifdef HAVE_NEWLOCALE
+#if defined(HAVE_NEWLOCALE) && defined(HAVE_USELOCALE)
 static AST_LIST_HEAD_STATIC(localelist, locale_entry);
 #endif
 
@@ -2362,7 +2362,7 @@ struct timeval ast_mktime(struct ast_tm *tmp, const char *zone)
        return time1(tmp, localsub, 0L, sp);
 }
 
-#ifdef HAVE_NEWLOCALE
+#if defined(HAVE_NEWLOCALE) && defined(HAVE_USELOCALE)
 static struct locale_entry *find_by_locale(locale_t locale)
 {
        struct locale_entry *cur;