summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2000-07-10 16:55:01 +0000
committerdmcmahill <dmcmahill>2000-07-10 16:55:01 +0000
commita820d22afa74370a95292fbc753c8a74c31c4ab0 (patch)
tree59309ce82bf76a143a89f6ec9a30965e890e46d1
parent7770615ed2c8c1757dc059f37f4bd5a3a2148dd4 (diff)
downloadpkgsrc-a820d22afa74370a95292fbc753c8a74c31c4ab0.tar.gz
make the tcl_platform.machine variable be MACHINE_ARCH. This will keep binary
compatibility across the m68k ports. This addresses PR 10510 and 9800.
-rw-r--r--lang/tcl80/files/patch-sum3
-rw-r--r--lang/tcl80/patches/patch-ac47
2 files changed, 49 insertions, 1 deletions
diff --git a/lang/tcl80/files/patch-sum b/lang/tcl80/files/patch-sum
index 43f9656145d..20b2c592363 100644
--- a/lang/tcl80/files/patch-sum
+++ b/lang/tcl80/files/patch-sum
@@ -1,5 +1,6 @@
-$NetBSD: patch-sum,v 1.3 2000/06/21 16:23:21 hubertf Exp $
+$NetBSD: patch-sum,v 1.4 2000/07/10 16:55:01 dmcmahill Exp $
MD5 (patch-aa) = 0389df0c4d4fc403f226e6688d054ba8
MD5 (patch-ab) = f98da4de12f76935cbc5c910e6219321
+MD5 (patch-ac) = a7dd6ec3775f5ef218ef81afb9295ffd
MD5 (patch-ad) = 1fe091addf3bfc33db2bc258aa621796
diff --git a/lang/tcl80/patches/patch-ac b/lang/tcl80/patches/patch-ac
new file mode 100644
index 00000000000..da1db33c5fa
--- /dev/null
+++ b/lang/tcl80/patches/patch-ac
@@ -0,0 +1,47 @@
+$NetBSD: patch-ac,v 1.6 2000/07/10 16:55:03 dmcmahill Exp $
+
+use MACHINE_ARCH not MACHINE for the"machine" variable.
+
+--- tclUnixInit.c.orig Mon Sep 14 14:40:17 1998
++++ tclUnixInit.c Mon Jul 10 12:38:25 2000
+@@ -24,4 +24,12 @@
+ #endif
+
++#if defined(__NetBSD__)
++#include <err.h>
++#include <stdlib.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#include <sys/utsname.h>
++#endif
++
+ /*
+ * Default directory in which to look for Tcl library scripts. The
+@@ -109,4 +117,9 @@
+ #endif
+ int unameOK;
++#if defined(__NetBSD__)
++ char machine_arch[SYS_NMLN];
++ int mib[2] = { CTL_HW, HW_MACHINE_ARCH };
++ size_t len = sizeof (machine_arch);
++#endif
+
+ tclPlatform = TCL_PLATFORM_UNIX;
+@@ -141,6 +154,17 @@
+ TCL_GLOBAL_ONLY|TCL_APPEND_VALUE);
+ }
++#if defined(__NetBSD__)
++
++ if (sysctl(mib, sizeof (mib) / sizeof (mib[0]), machine_arch, &len, NULL, 0) < 0)
++ {
++ err(EXIT_FAILURE, "sysctl");
++ }
++ Tcl_SetVar2(interp, "tcl_platform", "machine", machine_arch,
++ TCL_GLOBAL_ONLY);
++#else
+ Tcl_SetVar2(interp, "tcl_platform", "machine", name.machine,
+ TCL_GLOBAL_ONLY);
++#endif
++
+ }
+ #endif