<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8410">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Detect whether uselocale(.) is available.<br><br>ASTERISK-27712<br>Reported by: Joerg Sonnenberger, D'Arcy Cain<br><br>Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807<br>---<br>M configure<br>M configure.ac<br>M include/asterisk/autoconfig.h.in<br>M main/stdtime/localtime.c<br>4 files changed, 7 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/10/8410/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index bbd6297..43672d8 100755<br>--- a/configure<br>+++ b/configure<br>@@ -16393,7 +16393,7 @@<br> done<br> <br> <br>-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<br>+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<br> do :<br> as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`<br> ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"<br>diff --git a/configure.ac b/configure.ac<br>index 71c70d6..51743c2 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -717,7 +717,7 @@<br> AC_FUNC_STRTOD<br> AC_FUNC_UTIME_NULL<br> AC_FUNC_VPRINTF<br>-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])<br>+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])<br> <br> AC_MSG_CHECKING(for htonll)<br> AC_LINK_IFELSE(<br>diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in<br>index c046253..0615ea7 100644<br>--- a/include/asterisk/autoconfig.h.in<br>+++ b/include/asterisk/autoconfig.h.in<br>@@ -1136,6 +1136,9 @@<br> /* Define to 1 if you have the uriparser library library. */<br> #undef HAVE_URIPARSER<br> <br>+/* Define to 1 if you have the `uselocale' function. */<br>+#undef HAVE_USELOCALE<br>+<br> /* Define to 1 if you have the `utime' function. */<br> #undef HAVE_UTIME<br> <br>diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c<br>index f8050c9..8b87b26 100644<br>--- a/main/stdtime/localtime.c<br>+++ b/main/stdtime/localtime.c<br>@@ -312,7 +312,7 @@<br> static void sstate_free(struct state *p);<br> <br> static AST_LIST_HEAD_STATIC(zonelist, state);<br>-#ifdef HAVE_NEWLOCALE<br>+#if defined(HAVE_NEWLOCALE) && defined(HAVE_USELOCALE)<br> static AST_LIST_HEAD_STATIC(localelist, locale_entry);<br> #endif<br> <br>@@ -2364,7 +2364,7 @@<br> return time1(tmp, localsub, 0L, sp);<br> }<br> <br>-#ifdef HAVE_NEWLOCALE<br>+#if defined(HAVE_NEWLOCALE) && defined(HAVE_USELOCALE)<br> static struct locale_entry *find_by_locale(locale_t locale)<br> {<br> struct locale_entry *cur;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8410">change 8410</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8410"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807 </div>
<div style="display:none"> Gerrit-Change-Number: 8410 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>