summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/tclAppInit.c6
-rw-r--r--unix/tclMtherr.c4
-rw-r--r--unix/tclUnixFCmd.c4
-rw-r--r--unix/tclUnixFile.c15
-rw-r--r--unix/tclUnixInit.c6
5 files changed, 28 insertions, 7 deletions
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index bc5b44c..55893b7 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclAppInit.c,v 1.9 2000/04/18 23:06:39 hobbs Exp $
+ * RCS: @(#) $Id: tclAppInit.c,v 1.10 2002/02/12 14:23:33 davygrvy Exp $
*/
#include "tcl.h"
@@ -177,6 +177,10 @@ Tcl_AppInit(interp)
* then no user-specific startup file will be run under any conditions.
*/
+#ifdef DJGPP
+ Tcl_SetVar(interp, "tcl_rcFileName", "~/tclsh.rc", TCL_GLOBAL_ONLY);
+#else
Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY);
+#endif
return TCL_OK;
}
diff --git a/unix/tclMtherr.c b/unix/tclMtherr.c
index f9c61bc..b3b4dfc 100644
--- a/unix/tclMtherr.c
+++ b/unix/tclMtherr.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMtherr.c,v 1.4 2001/11/23 01:40:13 das Exp $
+ * RCS: @(#) $Id: tclMtherr.c,v 1.5 2002/02/12 14:23:57 davygrvy Exp $
*/
#include "tclInt.h"
@@ -35,9 +35,11 @@ extern int errno; /* Use errno from tclExecute.c. */
*/
#ifndef NEED_MATHERR
+#ifndef DJGPP
struct exception {
int type;
};
+#endif
#define DOMAIN 0
#define SING 0
#endif
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index a48c2ee..768798e 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixFCmd.c,v 1.15 2002/01/25 20:40:56 dgp Exp $
+ * RCS: @(#) $Id: tclUnixFCmd.c,v 1.16 2002/02/12 14:24:27 davygrvy Exp $
*
* Portions of this code were derived from NetBSD source code which has
* the following copyright notice:
@@ -349,6 +349,7 @@ DoCopyFile(src, dst)
}
switch ((int) (srcStatBuf.st_mode & S_IFMT)) {
+#ifndef DJGPP
case S_IFLNK: {
char link[MAXPATHLEN];
int length;
@@ -363,6 +364,7 @@ DoCopyFile(src, dst)
}
break;
}
+#endif
case S_IFBLK:
case S_IFCHR: {
if (mknod(dst, srcStatBuf.st_mode, /* INTL: Native. */
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index fc8fb08..2c1fb87 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixFile.c,v 1.16 2002/02/08 02:52:54 dgp Exp $
+ * RCS: @(#) $Id: tclUnixFile.c,v 1.17 2002/02/12 14:26:05 davygrvy Exp $
*/
#include "tclInt.h"
@@ -46,6 +46,7 @@ TclpFindExecutable(argv0)
* (native). */
{
CONST char *name, *p;
+
struct stat statBuf;
int length;
Tcl_DString buffer, nameString;
@@ -135,8 +136,12 @@ TclpFindExecutable(argv0)
* If the name starts with "/" then just copy it to tclExecutableName.
*/
- gotName:
+gotName:
+#ifdef DJGPP
+ if (name[1] == ':') {
+#else
if (name[0] == '/') {
+#endif
Tcl_ExternalToUtfDString(NULL, name, -1, &nameString);
tclNativeExecutableName = (char *)
ckalloc((unsigned) (Tcl_DStringLength(&nameString) + 1));
@@ -168,7 +173,7 @@ TclpFindExecutable(argv0)
Tcl_DStringValue(&nameString));
Tcl_DStringFree(&nameString);
- done:
+done:
Tcl_DStringFree(&buffer);
return tclNativeExecutableName;
}
@@ -645,6 +650,7 @@ TclpReadlink(path, linkPtr)
Tcl_DString *linkPtr; /* Uninitialized or free DString filled
* with contents of link (UTF-8). */
{
+#ifndef DJGPP
char link[MAXPATHLEN];
int length;
CONST char *native;
@@ -660,6 +666,9 @@ TclpReadlink(path, linkPtr)
Tcl_ExternalToUtfDString(NULL, link, length, linkPtr);
return Tcl_DStringValue(linkPtr);
+#else
+ return NULL;
+#endif
}
/*
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 309260f..e0f202d 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.30 2002/02/08 02:52:54 dgp Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.31 2002/02/12 14:31:54 davygrvy Exp $
*/
#include "tclInt.h"
@@ -682,7 +682,11 @@ TclpSetVariables(interp)
Tcl_SetVar(interp, "tclDefaultLibrary", defaultLibraryDir, TCL_GLOBAL_ONLY);
Tcl_SetVar(interp, "tcl_pkgPath", pkgPath, TCL_GLOBAL_ONLY);
+#ifdef DJGPP
+ Tcl_SetVar2(interp, "tcl_platform", "platform", "dos", TCL_GLOBAL_ONLY);
+#else
Tcl_SetVar2(interp, "tcl_platform", "platform", "unix", TCL_GLOBAL_ONLY);
+#endif
unameOK = 0;
#ifndef NO_UNAME
if (uname(&name) >= 0) {