Sat Jun 15 20:51:11 2013 UTC ()
- fix compile issue when newlocale support is detected, from joerg@


(jnemeth)
diff -r1.68 -r1.69 pkgsrc/comms/asterisk18/Makefile
diff -r1.46 -r1.47 pkgsrc/comms/asterisk18/distinfo
diff -r1.3 -r1.4 pkgsrc/comms/asterisk18/patches/patch-ap
diff -r1.14 -r1.15 pkgsrc/comms/asterisk18/patches/patch-aq
diff -r1.2 -r1.3 pkgsrc/comms/asterisk18/patches/patch-ar
diff -r0 -r1.1 pkgsrc/comms/asterisk18/patches/patch-bp

cvs diff -r1.68 -r1.69 pkgsrc/comms/asterisk18/Makefile (expand / switch to unified diff)

--- pkgsrc/comms/asterisk18/Makefile 2013/06/06 12:54:09 1.68
+++ pkgsrc/comms/asterisk18/Makefile 2013/06/15 20:51:10 1.69
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1# $NetBSD: Makefile,v 1.68 2013/06/06 12:54:09 wiz Exp $ 1# $NetBSD: Makefile,v 1.69 2013/06/15 20:51:10 jnemeth Exp $
2# 2#
3# NOTE: when updating this package, there are two places that sound 3# NOTE: when updating this package, there are two places that sound
4# tarballs need to be checked 4# tarballs need to be checked
5 5
6DISTNAME= asterisk-1.8.22.0 6DISTNAME= asterisk-1.8.22.0
7DIST_SUBDIR= ${PKGNAME_NOREV} 7DIST_SUBDIR= ${PKGNAME_NOREV}
8DISTFILES= ${DEFAULT_DISTFILES} 8DISTFILES= ${DEFAULT_DISTFILES}
9EXTRACT_ONLY= ${DISTNAME}.tar.gz 9EXTRACT_ONLY= ${DISTNAME}.tar.gz
10PKGREVISION= 4 10PKGREVISION= 5
11CATEGORIES= comms net audio 11CATEGORIES= comms net audio
12MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \ 12MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
13 http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \ 13 http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
14 http://downloads.asterisk.org/pub/telephony/sounds/releases/ 14 http://downloads.asterisk.org/pub/telephony/sounds/releases/
15 15
16OWNER= jnemeth@NetBSD.org 16OWNER= jnemeth@NetBSD.org
17HOMEPAGE= http://www.asterisk.org/ 17HOMEPAGE= http://www.asterisk.org/
18COMMENT= The Asterisk Software PBX 18COMMENT= The Asterisk Software PBX
19LICENSE= gnu-gpl-v2 19LICENSE= gnu-gpl-v2
20 20
21CONFLICTS+= asterisk-sounds-extra-[0-9]* 21CONFLICTS+= asterisk-sounds-extra-[0-9]*
22 22
23.include "../../mk/bsd.prefs.mk" 23.include "../../mk/bsd.prefs.mk"

cvs diff -r1.46 -r1.47 pkgsrc/comms/asterisk18/distinfo (expand / switch to unified diff)

--- pkgsrc/comms/asterisk18/distinfo 2013/05/18 01:00:43 1.46
+++ pkgsrc/comms/asterisk18/distinfo 2013/06/15 20:51:10 1.47
@@ -1,40 +1,41 @@ @@ -1,40 +1,41 @@
1$NetBSD: distinfo,v 1.46 2013/05/18 01:00:43 jnemeth Exp $ 1$NetBSD: distinfo,v 1.47 2013/06/15 20:51:10 jnemeth Exp $
2 2
3SHA1 (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = fca7c971cb0d3621ee64069c4f83aebf10416327 3SHA1 (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = fca7c971cb0d3621ee64069c4f83aebf10416327
4RMD160 (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = c232e45463f1915e204e7762a19dceacdd96fb2f 4RMD160 (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = c232e45463f1915e204e7762a19dceacdd96fb2f
5Size (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = 25343979 bytes 5Size (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = 25343979 bytes
6SHA1 (asterisk-1.8.22.0/asterisk-extra-sounds-en-gsm-1.4.13.tar.gz) = 3aac6cf4a07cb2644b7b5369c618b07561619f9f 6SHA1 (asterisk-1.8.22.0/asterisk-extra-sounds-en-gsm-1.4.13.tar.gz) = 3aac6cf4a07cb2644b7b5369c618b07561619f9f
7RMD160 (asterisk-1.8.22.0/asterisk-extra-sounds-en-gsm-1.4.13.tar.gz) = 5dc9696c54d2233cf74835fe7ccd2c1791f20041 7RMD160 (asterisk-1.8.22.0/asterisk-extra-sounds-en-gsm-1.4.13.tar.gz) = 5dc9696c54d2233cf74835fe7ccd2c1791f20041
8Size (asterisk-1.8.22.0/asterisk-extra-sounds-en-gsm-1.4.13.tar.gz) = 4407925 bytes 8Size (asterisk-1.8.22.0/asterisk-extra-sounds-en-gsm-1.4.13.tar.gz) = 4407925 bytes
9SHA1 (patch-aa) = 832f1c043b15198e0a286094dd0cc1a251bcfed0 9SHA1 (patch-aa) = 832f1c043b15198e0a286094dd0cc1a251bcfed0
10SHA1 (patch-af) = 19786616bb606c38f769ec85f2e4d118573659ab 10SHA1 (patch-af) = 19786616bb606c38f769ec85f2e4d118573659ab
11SHA1 (patch-ai) = e92edab5c1ff323478f41d0b0783102ed527fe39 11SHA1 (patch-ai) = e92edab5c1ff323478f41d0b0783102ed527fe39
12SHA1 (patch-ak) = f8d5de733807bc6c0701886a3095901d6815a8bd 12SHA1 (patch-ak) = f8d5de733807bc6c0701886a3095901d6815a8bd
13SHA1 (patch-al) = b2a1134786d7c3b118ee8c47892f91dd2a4c783a 13SHA1 (patch-al) = b2a1134786d7c3b118ee8c47892f91dd2a4c783a
14SHA1 (patch-am) = 5f9cbf47ec1cb66758492a5ed1bf843006eae9b7 14SHA1 (patch-am) = 5f9cbf47ec1cb66758492a5ed1bf843006eae9b7
15SHA1 (patch-an) = 93a5df66fd6459fb76e9191dc3bf37b9ee5483b5 15SHA1 (patch-an) = 93a5df66fd6459fb76e9191dc3bf37b9ee5483b5
16SHA1 (patch-ao) = aa95464a8bd4a417f313541b465142d2e4c3ee47 16SHA1 (patch-ao) = aa95464a8bd4a417f313541b465142d2e4c3ee47
17SHA1 (patch-ap) = 94a986e6e24c04ee8e95ea6809f826cb99c90c8a 17SHA1 (patch-ap) = bfb7b15224571f86a78fa7787f29002eb0c5d352
18SHA1 (patch-aq) = 8e33599ff6d6b1192ab69533b65d6831ddf4ba1c 18SHA1 (patch-aq) = ac3e937c5ec1f2b8edd7343d47247274e0dae8c7
19SHA1 (patch-ar) = da8e614e68e476ce32c66fed5ee9dcb8c5f9a060 19SHA1 (patch-ar) = 04c76c54d3962a4eae5bc69bf946fc8ea2c3427f
20SHA1 (patch-as) = b2e1aadf49f20506243ab40796f15aab12d95bad 20SHA1 (patch-as) = b2e1aadf49f20506243ab40796f15aab12d95bad
21SHA1 (patch-at) = df318d7b492121ff6f766b0e6ea73415293e96f0 21SHA1 (patch-at) = df318d7b492121ff6f766b0e6ea73415293e96f0
22SHA1 (patch-au) = 773398e719dca34640dcdc190857872da1ad7b4f 22SHA1 (patch-au) = 773398e719dca34640dcdc190857872da1ad7b4f
23SHA1 (patch-av) = 3424013b5bf22624aa664e972e2b495ab3296cbe 23SHA1 (patch-av) = 3424013b5bf22624aa664e972e2b495ab3296cbe
24SHA1 (patch-aw) = 0534acd67ea5da1eee8cf282035ebf4c559278ab 24SHA1 (patch-aw) = 0534acd67ea5da1eee8cf282035ebf4c559278ab
25SHA1 (patch-ax) = aae5b9954f9ae672aa948f1daa88494f1b407e81 25SHA1 (patch-ax) = aae5b9954f9ae672aa948f1daa88494f1b407e81
26SHA1 (patch-ay) = 746a609e4d01903ebdf525a7cf5c3925729e74b0 26SHA1 (patch-ay) = 746a609e4d01903ebdf525a7cf5c3925729e74b0
27SHA1 (patch-az) = 64365b12cb47ec0fba358e4326eda172f96068cf 27SHA1 (patch-az) = 64365b12cb47ec0fba358e4326eda172f96068cf
28SHA1 (patch-ba) = ffb20f4788f2f253e822fb48c68fec04c31b0619 28SHA1 (patch-ba) = ffb20f4788f2f253e822fb48c68fec04c31b0619
29SHA1 (patch-bb) = bf1a2bb2ba1eb2ba44a9b26fa9ae0468510a1575 29SHA1 (patch-bb) = bf1a2bb2ba1eb2ba44a9b26fa9ae0468510a1575
30SHA1 (patch-bc) = 0efc99595d1ef82a879361e8bf3b2ef7fd84af62 30SHA1 (patch-bc) = 0efc99595d1ef82a879361e8bf3b2ef7fd84af62
31SHA1 (patch-be) = a3d416c097c6aeb0e49dec67a9fc22027d936773 31SHA1 (patch-be) = a3d416c097c6aeb0e49dec67a9fc22027d936773
32SHA1 (patch-bf) = 67b506d235fabaa73f492d08858407dd9a85fd6e 32SHA1 (patch-bf) = 67b506d235fabaa73f492d08858407dd9a85fd6e
33SHA1 (patch-bg) = e6dc4b3affdf634efc2b3ee83e81f7ec51ee2e86 33SHA1 (patch-bg) = e6dc4b3affdf634efc2b3ee83e81f7ec51ee2e86
34SHA1 (patch-bh) = 9203ea97daab8c64ea47f236b4961763e76eafe6 34SHA1 (patch-bh) = 9203ea97daab8c64ea47f236b4961763e76eafe6
35SHA1 (patch-bi) = d71662f618a10c3ca4277feb7ad0d659935dee1e 35SHA1 (patch-bi) = d71662f618a10c3ca4277feb7ad0d659935dee1e
36SHA1 (patch-bj) = a184452adf2c883695e3819c13c584a3db9608d7 36SHA1 (patch-bj) = a184452adf2c883695e3819c13c584a3db9608d7
37SHA1 (patch-bk) = 93679dfb04d26c99ac9c2822e0d74d869d16369f 37SHA1 (patch-bk) = 93679dfb04d26c99ac9c2822e0d74d869d16369f
38SHA1 (patch-bm) = 284b34e20091b3427cd67b835fc7aa62c9d92a6c 38SHA1 (patch-bm) = 284b34e20091b3427cd67b835fc7aa62c9d92a6c
39SHA1 (patch-bn) = 51d14bde5591bd4a68c8074838196e05ac86f2f2 39SHA1 (patch-bn) = 51d14bde5591bd4a68c8074838196e05ac86f2f2
40SHA1 (patch-bo) = ff43d14e2608dd08d7d03799dfe9847f9f7f5666 40SHA1 (patch-bo) = ff43d14e2608dd08d7d03799dfe9847f9f7f5666
 41SHA1 (patch-bp) = 44c903536522e61790588680383b0ab2879edd65

cvs diff -r1.3 -r1.4 pkgsrc/comms/asterisk18/patches/Attic/patch-ap (expand / switch to unified diff)

--- pkgsrc/comms/asterisk18/patches/Attic/patch-ap 2012/06/05 00:15:35 1.3
+++ pkgsrc/comms/asterisk18/patches/Attic/patch-ap 2013/06/15 20:51:11 1.4
@@ -1,26 +1,35 @@ @@ -1,26 +1,35 @@
1$NetBSD: patch-ap,v 1.3 2012/06/05 00:15:35 jnemeth Exp $ 1$NetBSD: patch-ap,v 1.4 2013/06/15 20:51:11 jnemeth Exp $
2 2
3# sys/atomic.h reported upstream as 3# sys/atomic.h reported upstream as
4# https://issues.asterisk.org/view.php?id=18705 4# https://issues.asterisk.org/view.php?id=18705
5 5
6--- configure.ac.orig 2012-04-12 14:26:06.000000000 +0000 6--- configure.ac.orig 2013-02-26 19:37:33.000000000 +0000
7+++ configure.ac 7+++ configure.ac
8@@ -992,7 +992,7 @@ if $(${CC} -march=native -S -o /dev/null 8@@ -562,7 +562,7 @@ AC_FUNC_STRNLEN
 9 AC_FUNC_STRTOD
 10 AC_FUNC_UTIME_NULL
 11 AC_FUNC_VPRINTF
 12-AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll 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])
 13+AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strptime_l strftime_l strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
 14
 15 # NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
 16 # so that AC_CHECK_FUNCS can detect functions in that library.
 17@@ -993,7 +993,7 @@ if $(${CC} -march=native -S -o /dev/null
9 fi 18 fi
10 else 19 else
11 AC_MSG_RESULT(no) 20 AC_MSG_RESULT(no)
12- AST_NATIVE_ARCH= 21- AST_NATIVE_ARCH=
13+ AST_NATIVE_ARCH=0 22+ AST_NATIVE_ARCH=0
14 fi 23 fi
15 AC_SUBST(AST_NATIVE_ARCH) 24 AC_SUBST(AST_NATIVE_ARCH)
16  25
17@@ -1072,6 +1072,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I 26@@ -1073,6 +1073,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
18 AC_CHECK_HEADER([libkern/OSAtomic.h], 27 AC_CHECK_HEADER([libkern/OSAtomic.h],
19 [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])]) 28 [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
20  29
21+AC_CHECK_HEADER([sys/atomic.h], 30+AC_CHECK_HEADER([sys/atomic.h],
22+ [AC_DEFINE_UNQUOTED([HAVE_SYS_ATOMIC_H], 1, [Define to 1 if sys/atomic.h atomic operations are supported.])]) 31+ [AC_DEFINE_UNQUOTED([HAVE_SYS_ATOMIC_H], 1, [Define to 1 if sys/atomic.h atomic operations are supported.])])
23+ 32+
24 AC_CHECK_SIZEOF([int]) 33 AC_CHECK_SIZEOF([int])
25 AC_CHECK_SIZEOF([long]) 34 AC_CHECK_SIZEOF([long])
26 AC_CHECK_SIZEOF([long long]) 35 AC_CHECK_SIZEOF([long long])

cvs diff -r1.14 -r1.15 pkgsrc/comms/asterisk18/patches/Attic/patch-aq (expand / switch to unified diff)

--- pkgsrc/comms/asterisk18/patches/Attic/patch-aq 2013/05/18 01:00:43 1.14
+++ pkgsrc/comms/asterisk18/patches/Attic/patch-aq 2013/06/15 20:51:11 1.15
@@ -1,27 +1,36 @@ @@ -1,27 +1,36 @@
1$NetBSD: patch-aq,v 1.14 2013/05/18 01:00:43 jnemeth Exp $ 1$NetBSD: patch-aq,v 1.15 2013/06/15 20:51:11 jnemeth Exp $
2 2
3--- configure.orig 2013-01-30 17:44:11.000000000 +0000 3--- configure.orig 2013-02-27 14:11:39.000000000 +0000
4+++ configure 4+++ configure
5@@ -16688,7 +16688,7 @@ $as_echo "user CFLAGS present" >&6; } 5@@ -14751,7 +14751,7 @@ fi
 6 done
 7
 8
 9-for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll 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
 10+for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strptime_l strftime_l strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
 11 do :
 12 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 13 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 14@@ -16717,7 +16717,7 @@ $as_echo "user CFLAGS present" >&6; }
6 else 15 else
7 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8 $as_echo "no" >&6; } 17 $as_echo "no" >&6; }
9- AST_NATIVE_ARCH= 18- AST_NATIVE_ARCH=
10+ AST_NATIVE_ARCH=0 19+ AST_NATIVE_ARCH=0
11 fi 20 fi
12  21
13  22
14@@ -17148,6 +17148,146 @@ fi 23@@ -17177,6 +17177,146 @@ fi
15  24
16  25
17  26
18+if test "${ac_cv_header_sys_atomic_h+set}" = set; then 27+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
19+ { echo "$as_me:$LINENO: checking for sys/atomic.h" >&5 28+ { echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
20+echo $ECHO_N "checking for sys/atomic.h... $ECHO_C" >&6; } 29+echo $ECHO_N "checking for sys/atomic.h... $ECHO_C" >&6; }
21+if test "${ac_cv_header_sys_atomic_h+set}" = set; then 30+if test "${ac_cv_header_sys_atomic_h+set}" = set; then
22+ echo $ECHO_N "(cached) $ECHO_C" >&6 31+ echo $ECHO_N "(cached) $ECHO_C" >&6
23+fi 32+fi
24+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5 33+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
25+echo "${ECHO_T}$ac_cv_header_sys_atomic_h" >&6; } 34+echo "${ECHO_T}$ac_cv_header_sys_atomic_h" >&6; }
26+else 35+else
27+ # Is the header compilable? 36+ # Is the header compilable?
@@ -148,22 +157,22 @@ $NetBSD: patch-aq,v 1.14 2013/05/18 01:0 @@ -148,22 +157,22 @@ $NetBSD: patch-aq,v 1.14 2013/05/18 01:0
148+if test $ac_cv_header_sys_atomic_h = yes; then 157+if test $ac_cv_header_sys_atomic_h = yes; then
149+ 158+
150+cat >>confdefs.h <<_ACEOF 159+cat >>confdefs.h <<_ACEOF
151+#define HAVE_SYS_ATOMIC_H 1 160+#define HAVE_SYS_ATOMIC_H 1
152+_ACEOF 161+_ACEOF
153+ 162+
154+fi 163+fi
155+ 164+
156+ 165+
157+ 166+
158 # The cast to long int works around a bug in the HP C Compiler 167 # The cast to long int works around a bug in the HP C Compiler
159 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 168 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
160 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 169 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
161@@ -18262,6 +18402,8 @@ $as_echo_n "checking if \"struct ifaddrs 170@@ -18291,6 +18431,8 @@ $as_echo_n "checking if \"struct ifaddrs
162  171
163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
164 /* end confdefs.h. */ 173 /* end confdefs.h. */
165+ #include <sys/types.h> 174+ #include <sys/types.h>
166+ #include <sys/socket.h> 175+ #include <sys/socket.h>
167 #include <ifaddrs.h> 176 #include <ifaddrs.h>
168 int 177 int
169 main () 178 main ()

cvs diff -r1.2 -r1.3 pkgsrc/comms/asterisk18/patches/Attic/patch-ar (expand / switch to unified diff)

--- pkgsrc/comms/asterisk18/patches/Attic/patch-ar 2011/01/29 22:50:32 1.2
+++ pkgsrc/comms/asterisk18/patches/Attic/patch-ar 2013/06/15 20:51:11 1.3
@@ -1,16 +1,29 @@ @@ -1,16 +1,29 @@
1$NetBSD: patch-ar,v 1.2 2011/01/29 22:50:32 jnemeth Exp $ 1$NetBSD: patch-ar,v 1.3 2013/06/15 20:51:11 jnemeth Exp $
2 2
3# Reported upstream as https://issues.asterisk.org/view.php?id=18705 3# Reported upstream as https://issues.asterisk.org/view.php?id=18705
4 4
5--- include/asterisk/autoconfig.h.in.orig 2010-11-09 20:33:05.000000000 +0000 5--- include/asterisk/autoconfig.h.in.orig 2013-02-27 14:11:39.000000000 +0000
6+++ include/asterisk/autoconfig.h.in 6+++ include/asterisk/autoconfig.h.in
7@@ -864,6 +864,9 @@ 7@@ -816,6 +816,12 @@
 8 /* Define to 1 if you have the `strstr' function. */
 9 #undef HAVE_STRSTR
 10
 11+/* Define to 1 if you have the `strptime_l' function. */
 12+#undef HAVE_STRPTIME_L
 13+
 14+/* Define to 1 if you have the `strftime_l' function. */
 15+#undef HAVE_STRFTIME_L
 16+
 17 /* Define to 1 if you have the `strtod' function. */
 18 #undef HAVE_STRTOD
 19
 20@@ -891,6 +897,9 @@
8 /* Define to 1 if you have the <syslog.h> header file. */ 21 /* Define to 1 if you have the <syslog.h> header file. */
9 #undef HAVE_SYSLOG_H 22 #undef HAVE_SYSLOG_H
10  23
11+/* Define to 1 if sys/atomic.h atomic operations are supported. */ 24+/* Define to 1 if sys/atomic.h atomic operations are supported. */
12+#undef HAVE_SYS_ATOMIC_H 25+#undef HAVE_SYS_ATOMIC_H
13+ 26+
14 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. 27 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
15 */ 28 */
16 #undef HAVE_SYS_DIR_H 29 #undef HAVE_SYS_DIR_H

File Added: pkgsrc/comms/asterisk18/patches/Attic/patch-bp
$NetBSD: patch-bp,v 1.1 2013/06/15 20:51:11 jnemeth Exp $

--- main/stdtime/localtime.c.orig	2012-12-03 20:26:37.000000000 +0000
+++ main/stdtime/localtime.c
@@ -2213,6 +2213,23 @@ static struct locale_entry *find_by_name
 	return NULL;
 }
 
+#if HAVE_STRFTIME_L || HAVE_STRPTIME_L
+static locale_t ast_getlocale(const char *locale)
+{
+	struct locale_entry *cur;
+
+	AST_LIST_LOCK(&localelist);
+	if ((cur = find_by_name(locale)) == NULL) {
+		cur->locale = newlocale(LC_ALL_MASK, locale, NULL);
+		strcpy(cur->name, locale); /* SAFE */
+		AST_LIST_INSERT_TAIL(&localelist, cur, list);
+	}
+	AST_LIST_UNLOCK(&localelist);
+	return cur->locale;
+}
+#endif
+
+#if !HAVE_STRFTIME_L || !HAVE_STRPTIME_L
 static const char *store_by_locale(locale_t prevlocale)
 {
 	struct locale_entry *cur;
@@ -2270,6 +2287,7 @@ const char *ast_setlocale(const char *lo
 	AST_LIST_UNLOCK(&localelist);
 	return store_by_locale(prevlocale);
 }
+#endif
 #else
 const char *ast_setlocale(const char *unused)
 {
@@ -2283,7 +2301,9 @@ int ast_strftime_locale(char *buf, size_
 	char *format = ast_calloc(1, fmtlen), *fptr = format, *newfmt;
 	int decimals = -1, i, res;
 	long fraction;
+#if !HAVE_STRFTIME_L
 	const char *prevlocale;
+#endif
 
 	if (!format) {
 		return -1;
@@ -2337,6 +2357,14 @@ defcase:	*fptr++ = *tmp;
 	}
 	*fptr = '\0';
 #undef strftime
+#if HAVE_STRFTIME_L
+	if (locale) {
+		locale_t l = ast_getlocale(locale);
+		res = (int)strftime_l(buf, len, format, (struct tm *)tm, l);
+	} else {
+		res = (int)strftime(buf, len, format, (struct tm *)tm);
+	}
+#else
 	if (locale) {
 		prevlocale = ast_setlocale(locale);
 	}
@@ -2344,6 +2372,7 @@ defcase:	*fptr++ = *tmp;
 	if (locale) {
 		ast_setlocale(prevlocale);
 	}
+#endif
 	ast_free(format);
 	return res;
 }
@@ -2357,11 +2386,22 @@ char *ast_strptime_locale(const char *s,
 {
 	struct tm tm2 = { 0, };
 	char *res;
+#if !HAVE_STRPTIME_L
 	const char *prevlocale;
+#endif
 
+#if HAVE_STRPTIME_L
+	if (locale) {
+		locale_t l = ast_getlocale(locale);
+		res = strptime_l(s, format, &tm2, l);
+	} else {
+		res = strptime(s, format, &tm2);
+	}
+#else
 	prevlocale = ast_setlocale(locale);
 	res = strptime(s, format, &tm2);
 	ast_setlocale(prevlocale);
+#endif
 	/* ast_time and tm are not the same size - tm is a subset of
 	 * ast_time.  Hence, the size of tm needs to be used for the
 	 * memcpy