78ca1bc313
Besides more bug fixes and several enhancements some of the NetBSD relevant changes (taken from "changes" in the distribution): 2001-04-03 (doc fixes) numerous doc corrections and clarifications. Update of READMEs. 2001-03-29 (bug fix) prevent potential race condition and security leak in tmp filename creation on Unix. (max) 2001-03-13 (bug fix) Correctly possible memory corruption in string map {} $str (fellows) 2001-01-30 (bug fix) Fixed possible hangs in fcopy. (porter) 2000-11-23 (mem leak) fixed potential memory leak in error case of lsort (fellows) 2000-11-01 (mem leak) Corrected excessive mem use of info exists on a non-existent array element (hobbs) 2000-09-27 (bug fix) fixed a bug introduced by a partial fix in 8.3.2 that didn't set nonBlocking correctly when resetting the flags for the write side (mem leak) Correct mem leak in channels when statePtr was released (hobbs) 2001-07-18 (bug fix) corrected memory overwrite error when buffer size of a channel is changed after channel use has already begun (kupries, porter) 2001-08-07 (bug fix) corrected bytecode stack management during [break] (see test foreach-5.5) (sofer, tallneil, jstrot) 2001-08-08 (new features) updated packages msgcat 1.1.1, opt 0.4.3, tcltest 1.0.1, dependencies checked (porter) 2001-08-24 (bug fix) [auto_import] now matches patterns like [namespace import], not like [string match] (porter) **** POTENTIAL INCOMPATABILITY **** 2001-08-27 (new feature) added Tcl_SetMainLoop() to enable loading Tk as a true package (hobbs) 2001-09-06 (new feature) http 2.4: honor the Content-encoding and charset parameters; add -binary switch for forcing the issue (hobbs, saoukhi, orwell) 2001-09-10 (bug fix) protect against alias loops (hobbs) 2001-09-19 (bug fix) [format] and [scan] corrected for 64-bit machines (rmax) 2001-09-26 (bug fix) corrected potential deadlock in channels that do not provide a BlockModeProc (kupries, kogorman) 2001-10-11 (bug fix) corrected cleanup of self-referential bytecodes at interpreter deletion (sofer, rbrunner)
45 lines
1.2 KiB
Text
45 lines
1.2 KiB
Text
$NetBSD: patch-ac,v 1.2 2001/12/23 17:02:31 bjoern Exp $
|
|
|
|
--- tclUnixInit.c.orig Fri Aug 24 19:13:22 2001
|
|
+++ tclUnixInit.c
|
|
@@ -22,6 +22,11 @@
|
|
# include <dlfcn.h>
|
|
# endif
|
|
#endif
|
|
+#if defined(__NetBSD__)
|
|
+#include <sys/param.h>
|
|
+#include <sys/sysctl.h>
|
|
+#include <sys/utsname.h>
|
|
+#endif
|
|
|
|
/*
|
|
* The Init script (common to Windows and Unix platforms) is
|
|
@@ -550,6 +555,11 @@
|
|
int unameOK;
|
|
char *user;
|
|
Tcl_DString ds;
|
|
+#if defined(__NetBSD__)
|
|
+ char machine_arch[SYS_NMLN];
|
|
+ int mib[2] = { CTL_HW, HW_MACHINE_ARCH };
|
|
+ size_t len = sizeof(machine_arch);
|
|
+#endif
|
|
|
|
Tcl_SetVar(interp, "tclDefaultLibrary", defaultLibraryDir, TCL_GLOBAL_ONLY);
|
|
Tcl_SetVar(interp, "tcl_pkgPath", pkgPath, TCL_GLOBAL_ONLY);
|
|
@@ -585,8 +595,16 @@
|
|
Tcl_SetVar2(interp, "tcl_platform", "osVersion", name.release,
|
|
TCL_GLOBAL_ONLY|TCL_APPEND_VALUE);
|
|
}
|
|
+#if defined(__NetBSD__)
|
|
+ if (sysctl(mib, sizeof(mib) / sizeof(int), machine_arch, &len, NULL, 0) < 0)
|
|
+ unameOK = 0;
|
|
+ else
|
|
+ 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
|
|
if (!unameOK) {
|