<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8409">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Corey Farrell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><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;">diff --git a/configure b/configure<br>index 2849fe5..a95da69 100755<br>--- a/configure<br>+++ b/configure<br>@@ -16701,7 +16701,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 1bb4bc4..4622f95 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -754,7 +754,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 4a9a273..0611461 100644<br>--- a/include/asterisk/autoconfig.h.in<br>+++ b/include/asterisk/autoconfig.h.in<br>@@ -1203,6 +1203,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 2976e59..d0be9bb 100644<br>--- a/main/stdtime/localtime.c<br>+++ b/main/stdtime/localtime.c<br>@@ -310,7 +310,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>@@ -2362,7 +2362,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/8409">change 8409</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/8409"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807 </div>
<div style="display:none"> Gerrit-Change-Number: 8409 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>