summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/dltest/pkga.c9
-rw-r--r--unix/dltest/pkgb.c25
-rw-r--r--unix/dltest/pkgc.c9
-rw-r--r--unix/dltest/pkgd.c9
-rw-r--r--unix/dltest/pkgua.c10
-rw-r--r--unix/tclUnixFCmd.c2
-rw-r--r--unix/tclUnixSock.c10
7 files changed, 7 insertions, 67 deletions
diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c
index e00f996..37782ea 100644
--- a/unix/dltest/pkga.c
+++ b/unix/dltest/pkga.c
@@ -14,15 +14,6 @@
#include "tcl.h"
/*
- * Prototypes for procedures defined later in this file:
- */
-
-static int Pkga_EqObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-static int Pkga_QuoteObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-
-/*
*----------------------------------------------------------------------
*
* Pkga_EqObjCmd --
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index ebed46d..2d525bc 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -15,17 +15,6 @@
#include "tcl.h"
/*
- * Prototypes for procedures defined later in this file:
- */
-
-static int Pkgb_SubObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-static int Pkgb_UnsafeObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-static int Pkgb_DemoObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-
-/*
*----------------------------------------------------------------------
*
* Pkgb_SubObjCmd --
@@ -109,19 +98,7 @@ Pkgb_DemoObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
-#if (TCL_MAJOR_VERSION > 8) || (TCL_MINOR_VERSION > 4)
- Tcl_Obj *first;
- (void)dummy;
- (void)objc;
- (void)objv;
-
- if (Tcl_ListObjIndex(NULL, Tcl_GetEncodingSearchPath(), 0, &first)
- == TCL_OK) {
- Tcl_SetObjResult(interp, first);
- }
-#else
- Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetDefaultEncodingDir(), -1));
-#endif
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetEncodingSearchPath(), -1));
return TCL_OK;
}
diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c
index 2b46986..cd92cf7 100644
--- a/unix/dltest/pkgc.c
+++ b/unix/dltest/pkgc.c
@@ -15,15 +15,6 @@
#include "tcl.h"
/*
- * Prototypes for procedures defined later in this file:
- */
-
-static int Pkgc_SubObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-static int Pkgc_UnsafeObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-
-/*
*----------------------------------------------------------------------
*
* Pkgc_SubObjCmd --
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c
index ef0035f..0c98ec4 100644
--- a/unix/dltest/pkgd.c
+++ b/unix/dltest/pkgd.c
@@ -15,15 +15,6 @@
#include "tcl.h"
/*
- * Prototypes for procedures defined later in this file:
- */
-
-static int Pkgd_SubObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-static int Pkgd_UnsafeObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-
-/*
*----------------------------------------------------------------------
*
* Pkgd_SubObjCmd --
diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c
index a822541..6d64352 100644
--- a/unix/dltest/pkgua.c
+++ b/unix/dltest/pkgua.c
@@ -14,16 +14,6 @@
#include "tcl.h"
/*
- * Prototypes for procedures defined later in this file:
- */
-
-static int PkguaEqObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-static int PkguaQuoteObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
-static void CommandDeleted(ClientData clientData);
-
-/*
* In the following hash table we are going to store a struct that holds all
* the command tokens created by Tcl_CreateObjCommand in an interpreter,
* indexed by the interpreter. In this way, we can find which command tokens
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 9f7a2ba..a5d6a87 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1466,7 +1466,7 @@ GetPermissionsAttribute(
}
*attributePtrPtr = Tcl_ObjPrintf(
- "%0#5lo", (long) (statBuf.st_mode & 0x00007FFF));
+ "%0#5o", ((int)statBuf.st_mode & 0x7FFF));
return TCL_OK;
}
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 076678c..91d84f3 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -23,7 +23,7 @@
/* "sock" + a pointer in hex + \0 */
#define SOCK_CHAN_LENGTH (4 + sizeof(void *) * 2 + 1)
-#define SOCK_TEMPLATE "sock%lx"
+#define SOCK_TEMPLATE "sock%" TCL_Z_MODIFIER "x"
#undef SOCKET /* Possible conflict with win32 SOCKET */
@@ -1451,7 +1451,7 @@ Tcl_OpenTcpClient(
return NULL;
}
- sprintf(channelName, SOCK_TEMPLATE, (long) statePtr);
+ sprintf(channelName, SOCK_TEMPLATE, PTR2INT(statePtr));
statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
statePtr, TCL_READABLE | TCL_WRITABLE);
@@ -1518,7 +1518,7 @@ TclpMakeTcpClientChannelMode(
statePtr->fds.fd = PTR2INT(sock);
statePtr->flags = 0;
- sprintf(channelName, SOCK_TEMPLATE, (long)statePtr);
+ sprintf(channelName, SOCK_TEMPLATE, PTR2INT(statePtr));
statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
statePtr, mode);
@@ -1740,7 +1740,7 @@ Tcl_OpenTcpServerEx(
memset(statePtr, 0, sizeof(TcpState));
statePtr->acceptProc = acceptProc;
statePtr->acceptProcData = acceptProcData;
- sprintf(channelName, SOCK_TEMPLATE, (long) statePtr);
+ sprintf(channelName, SOCK_TEMPLATE, PTR2INT(statePtr));
newfds = &statePtr->fds;
} else {
newfds = (TcpFdList *)ckalloc(sizeof(TcpFdList));
@@ -1832,7 +1832,7 @@ TcpAccept(
newSockState->flags = 0;
newSockState->fds.fd = newsock;
- sprintf(channelName, SOCK_TEMPLATE, (long) newSockState);
+ sprintf(channelName, SOCK_TEMPLATE, PTR2INT(newSockState));
newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
newSockState, TCL_READABLE | TCL_WRITABLE);