summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorvbwagner <vbwagner>2004-03-09 13:34:45 (GMT)
committervbwagner <vbwagner>2004-03-09 13:34:45 (GMT)
commita70545f044df014691de40703123cfc21c68a806 (patch)
treef21f8d26ca938acb1e94c1e7c1a02ad2426b1539 /unix
parenta1d734ba2bf451b28394dd585ffda165b3f7cbc5 (diff)
downloadtcl-a70545f044df014691de40703123cfc21c68a806.zip
tcl-a70545f044df014691de40703123cfc21c68a806.tar.gz
tcl-a70545f044df014691de40703123cfc21c68a806.tar.bz2
Fixed incorrect reporting of OS version for DJGPP.
This known misinterpretation of uts_name struct fields is now considered "feature" of DJGPP and so needs workaround in Tcl.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 39a8138..12a99d4 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.38 2004/02/17 23:50:39 hobbs Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.39 2004/03/09 13:34:45 vbwagner Exp $
*/
#if defined(HAVE_CFBUNDLE)
@@ -830,12 +830,25 @@ TclpSetVariables(interp)
Tcl_SetVar2(interp, "tcl_platform", "osVersion", name.release,
TCL_GLOBAL_ONLY);
} else {
+#ifdef DJGPP
+ /* For some obscure reason DJGPP puts major version into
+ * name.release and minor into name.version. As of DJGPP 2.04
+ * this is documented in djgpp libc.info file*/
+ Tcl_SetVar2(interp, "tcl_platform", "osVersion", name.release,
+ TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "tcl_platform", "osVersion", ".",
+ TCL_GLOBAL_ONLY|TCL_APPEND_VALUE);
+ Tcl_SetVar2(interp, "tcl_platform", "osVersion", name.version,
+ TCL_GLOBAL_ONLY|TCL_APPEND_VALUE);
+#else
Tcl_SetVar2(interp, "tcl_platform", "osVersion", name.version,
TCL_GLOBAL_ONLY);
Tcl_SetVar2(interp, "tcl_platform", "osVersion", ".",
TCL_GLOBAL_ONLY|TCL_APPEND_VALUE);
Tcl_SetVar2(interp, "tcl_platform", "osVersion", name.release,
TCL_GLOBAL_ONLY|TCL_APPEND_VALUE);
+
+#endif
}
Tcl_SetVar2(interp, "tcl_platform", "machine", name.machine,
TCL_GLOBAL_ONLY);