summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-23 20:46:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-23 20:46:00 (GMT)
commitfe36337ab48292e97cc3cae11a8efe99c1143bde (patch)
tree8b7ee1b7505a49478958828584bb52e02c1a3a8b /unix
parent0575def9cda1df361ad97091ee969acbcc827ce3 (diff)
downloadtcl-fe36337ab48292e97cc3cae11a8efe99c1143bde.zip
tcl-fe36337ab48292e97cc3cae11a8efe99c1143bde.tar.gz
tcl-fe36337ab48292e97cc3cae11a8efe99c1143bde.tar.bz2
* Updated socket interfaces according to TIP 27. Updated callers.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixChan.c22
-rw-r--r--unix/tclUnixSock.c4
2 files changed, 13 insertions, 13 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 6c7e2ee..6386bd5 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.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: tclUnixChan.c,v 1.26 2002/01/17 04:37:33 dgp Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.27 2002/01/23 20:46:01 dgp Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -175,11 +175,11 @@ typedef struct TcpState {
*/
static TcpState * CreateSocket _ANSI_ARGS_((Tcl_Interp *interp,
- int port, char *host, int server,
- char *myaddr, int myport, int async));
+ int port, CONST char *host, int server,
+ CONST char *myaddr, int myport, int async));
static int CreateSocketAddress _ANSI_ARGS_(
(struct sockaddr_in *sockaddrPtr,
- char *host, int port));
+ CONST char *host, int port));
static int FileBlockModeProc _ANSI_ARGS_((
ClientData instanceData, int mode));
static int FileCloseProc _ANSI_ARGS_((ClientData instanceData,
@@ -2024,11 +2024,11 @@ static TcpState *
CreateSocket(interp, port, host, server, myaddr, myport, async)
Tcl_Interp *interp; /* For error reporting; can be NULL. */
int port; /* Port number to open. */
- char *host; /* Name of host on which to open port.
+ CONST char *host; /* Name of host on which to open port.
* NULL implies INADDR_ANY */
int server; /* 1 if socket should be a server socket,
* else 0 for a client socket. */
- char *myaddr; /* Optional client-side address */
+ CONST char *myaddr; /* Optional client-side address */
int myport; /* Optional client-side port */
int async; /* If nonzero and creating a client socket,
* attempt to do an async connect. Otherwise
@@ -2205,7 +2205,7 @@ addressError:
static int
CreateSocketAddress(sockaddrPtr, host, port)
struct sockaddr_in *sockaddrPtr; /* Socket address */
- char *host; /* Host. NULL implies INADDR_ANY */
+ CONST char *host; /* Host. NULL implies INADDR_ANY */
int port; /* Port number */
{
struct hostent *hostent; /* Host database entry */
@@ -2287,8 +2287,8 @@ Tcl_Channel
Tcl_OpenTcpClient(interp, port, host, myaddr, myport, async)
Tcl_Interp *interp; /* For error reporting; can be NULL. */
int port; /* Port number to open. */
- char *host; /* Host on which to open port. */
- char *myaddr; /* Client-side address */
+ CONST char *host; /* Host on which to open port. */
+ CONST char *myaddr; /* Client-side address */
int myport; /* Client-side port */
int async; /* If nonzero, attempt to do an
* asynchronous connect. Otherwise
@@ -2384,7 +2384,7 @@ Tcl_OpenTcpServer(interp, port, myHost, acceptProc, acceptProcData)
Tcl_Interp *interp; /* For error reporting - may be
* NULL. */
int port; /* Port number to open. */
- char *myHost; /* Name of local host. */
+ CONST char *myHost; /* Name of local host. */
Tcl_TcpAcceptProc *acceptProc; /* Callback for accepting connections
* from new clients. */
ClientData acceptProcData; /* Data for the callback. */
@@ -2585,7 +2585,7 @@ TclpGetDefaultStdChannel(type)
int
Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
Tcl_Interp *interp; /* Interpreter in which to find file. */
- char *string; /* String that identifies file. */
+ CONST char *string; /* String that identifies file. */
int forWriting; /* 1 means the file is going to be used
* for writing, 0 means for reading. */
int checkUsage; /* 1 means verify that the file was opened
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 37d430e..d971aec 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixSock.c,v 1.4 1999/04/16 00:48:05 stanton Exp $
+ * RCS: @(#) $Id: tclUnixSock.c,v 1.5 2002/01/23 20:46:01 dgp Exp $
*/
#include "tcl.h"
@@ -62,7 +62,7 @@ TCL_DECLARE_MUTEX(hostMutex)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_GetHostName()
{
#ifndef NO_UNAME