diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-04-27 22:21:26 (GMT) | 
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-04-27 22:21:26 (GMT) | 
| commit | 26c09b8c918f8223a38fc764aa9a39fb8ce45991 (patch) | |
| tree | 4e7b1367d8eb030241db8325caa541ce387b7313 /unix/tclUnixSock.c | |
| parent | 60e86b2a4795ded3f41e7361470071827477f5b0 (diff) | |
| download | tcl-26c09b8c918f8223a38fc764aa9a39fb8ce45991.zip tcl-26c09b8c918f8223a38fc764aa9a39fb8ce45991.tar.gz tcl-26c09b8c918f8223a38fc764aa9a39fb8ce45991.tar.bz2 | |
Get rid of pre-C89-isms (esp. CONST vs const).
Diffstat (limited to 'unix/tclUnixSock.c')
| -rw-r--r-- | unix/tclUnixSock.c | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 973fd18..cbfe546 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.20 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.21 2008/04/27 22:21:35 dkf Exp $   */  #include "tclInt.h" @@ -42,7 +42,7 @@ InitializeHostName(      int *lengthPtr,      Tcl_Encoding *encodingPtr)  { -    CONST char *native = NULL; +    const char *native = NULL;  #ifndef NO_UNAME      struct utsname u; @@ -94,7 +94,7 @@ InitializeHostName(       * Fix suggested by Viktor Dukhovni (viktor@esm.com)       */ -#    if defined(SYS_NMLN) && SYS_NMLEN >= 256 +#    if defined(SYS_NMLN) && (SYS_NMLEN >= 256)      char buffer[SYS_NMLEN];  #    else      char buffer[256]; @@ -107,8 +107,8 @@ InitializeHostName(      *encodingPtr = Tcl_GetEncoding(NULL, NULL);      *lengthPtr = strlen(native); -    *valuePtr = ckalloc((unsigned int) (*lengthPtr)+1); -    memcpy(*valuePtr, (void *) native, (size_t)(*lengthPtr)+1); +    *valuePtr = ckalloc((unsigned) (*lengthPtr) + 1); +    memcpy(*valuePtr, native, (size_t)(*lengthPtr)+1);  }  /* @@ -129,7 +129,7 @@ InitializeHostName(   *----------------------------------------------------------------------   */ -CONST char * +const char *  Tcl_GetHostName(void)  {      return Tcl_GetString(TclGetProcessGlobalValue(&hostName)); | 
