summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorbsiegert <bsiegert>2012-12-29 13:49:12 +0000
committerbsiegert <bsiegert>2012-12-29 13:49:12 +0000
commit54006e59e9fdf6437b49ec41d02894cdec6611bf (patch)
treec326d778b4ca07140d22f97e71d9de8d86883747 /lang
parent337637e8115ae4a0126e674db82dc25c96035431 (diff)
downloadpkgsrc-54006e59e9fdf6437b49ec41d02894cdec6611bf.tar.gz
MirBSD build fix: don't break when there is no _SC_GET{PW,GRâ‰}_R_SIZE_MAX.
Freeze exception granted by wiz.
Diffstat (limited to 'lang')
-rw-r--r--lang/tcl/distinfo3
-rw-r--r--lang/tcl/patches/patch-unix_tclUnixCompat.c67
2 files changed, 69 insertions, 1 deletions
diff --git a/lang/tcl/distinfo b/lang/tcl/distinfo
index 5210fd86bea..fe01efaca89 100644
--- a/lang/tcl/distinfo
+++ b/lang/tcl/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.53 2012/11/24 21:38:49 adam Exp $
+$NetBSD: distinfo,v 1.54 2012/12/29 13:49:12 bsiegert Exp $
SHA1 (tcl8.5.13-src.tar.gz) = 65b677dc699426233b926edfa9e304d456da7cad
RMD160 (tcl8.5.13-src.tar.gz) = 20cfb8adebd77a6d037f67a9af7e88d80032b3c2
@@ -11,6 +11,7 @@ SHA1 (patch-tests_pkgMkIndex.test) = 70d1042c1f4743052c5fa191fa7c4732a08e28a2
SHA1 (patch-unix_Makefile.in) = d8828e3818a141a006b4fbdaeea43b350d62f014
SHA1 (patch-unix_configure) = 2e1e6d2020e68b91b94c0b05cb1d349126989adc
SHA1 (patch-unix_tclConfig.sh.in) = 5a32d8e97240d14f3a03e205637fe3bf8307d868
+SHA1 (patch-unix_tclUnixCompat.c) = 7ffa40a1a56345f5b86cd896e8e3b0d5748d8c5e
SHA1 (patch-unix_tclUnixFCmd.c) = a56a12b8a0068e914d10336076347ca2b0ba9ac7
SHA1 (patch-unix_tclUnixInit.c) = 4cbddb3e1a9ed4bbbf2d8de0df1a9032fc5b2629
SHA1 (patch-unix_tclUnixPort.h) = 2965dd6ef6560e0a6385c6cb286754f63c98c827
diff --git a/lang/tcl/patches/patch-unix_tclUnixCompat.c b/lang/tcl/patches/patch-unix_tclUnixCompat.c
new file mode 100644
index 00000000000..9d81e819c7f
--- /dev/null
+++ b/lang/tcl/patches/patch-unix_tclUnixCompat.c
@@ -0,0 +1,67 @@
+$NetBSD: patch-unix_tclUnixCompat.c,v 1.1 2012/12/29 13:49:12 bsiegert Exp $
+
+This is needed on MirBSD, which does not have the required sysconf
+constants.
+
+--- unix/tclUnixCompat.c.orig Thu Dec 13 16:53:10 2012
++++ unix/tclUnixCompat.c
+@@ -197,10 +197,14 @@ TclpGetPwNam(
+ */
+
+ if (tsdPtr->pbuf == NULL) {
++#ifdef _SC_GETPW_R_SIZE_MAX
+ tsdPtr->pbuflen = (int) sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (tsdPtr->pbuflen < 1) {
++#endif
+ tsdPtr->pbuflen = 1024;
++#ifdef _SC_GETPW_R_SIZE_MAX
+ }
++#endif
+ tsdPtr->pbuf = ckalloc(tsdPtr->pbuflen);
+ Tcl_CreateThreadExitHandler(FreePwBuf, NULL);
+ }
+@@ -277,10 +281,14 @@ TclpGetPwUid(
+ */
+
+ if (tsdPtr->pbuf == NULL) {
++#ifdef _SC_GETPW_R_SIZE_MAX
+ tsdPtr->pbuflen = (int) sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (tsdPtr->pbuflen < 1) {
++#endif
+ tsdPtr->pbuflen = 1024;
++#ifdef _SC_GETPW_R_SIZE_MAX
+ }
++#endif
+ tsdPtr->pbuf = ckalloc(tsdPtr->pbuflen);
+ Tcl_CreateThreadExitHandler(FreePwBuf, NULL);
+ }
+@@ -380,10 +388,14 @@ TclpGetGrNam(
+ */
+
+ if (tsdPtr->gbuf == NULL) {
++#ifdef _SC_GETGR_R_SIZE_MAX
+ tsdPtr->gbuflen = (int) sysconf(_SC_GETGR_R_SIZE_MAX);
+ if (tsdPtr->gbuflen < 1) {
++#endif
+ tsdPtr->gbuflen = 1024;
++#ifdef _SC_GETGR_R_SIZE_MAX
+ }
++#endif
+ tsdPtr->gbuf = ckalloc(tsdPtr->gbuflen);
+ Tcl_CreateThreadExitHandler(FreeGrBuf, NULL);
+ }
+@@ -460,10 +472,14 @@ TclpGetGrGid(
+ */
+
+ if (tsdPtr->gbuf == NULL) {
++#ifdef _SC_GETGR_R_SIZE_MAX
+ tsdPtr->gbuflen = (int) sysconf(_SC_GETGR_R_SIZE_MAX);
+ if (tsdPtr->gbuflen < 1) {
++#endif
+ tsdPtr->gbuflen = 1024;
++#ifdef _SC_GETGR_R_SIZE_MAX
+ }
++#endif
+ tsdPtr->gbuf = ckalloc(tsdPtr->gbuflen);
+ Tcl_CreateThreadExitHandler(FreeGrBuf, NULL);
+ }