summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-10-28 16:06:30 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-10-28 16:06:30 (GMT)
commit61617a7891a8266415ac5a14e6dce92693e10c5c (patch)
treefa5e94f8a83450fe3df0bb0bb427b9b66aba15f6
parentedd30d9489db089dcc47c6110335a1cee9bc6ed5 (diff)
downloadtcl-61617a7891a8266415ac5a14e6dce92693e10c5c.zip
tcl-61617a7891a8266415ac5a14e6dce92693e10c5c.tar.gz
tcl-61617a7891a8266415ac5a14e6dce92693e10c5c.tar.bz2
added CONST to TclpLocaltime and TclpGmtime param throughout
-rw-r--r--ChangeLog15
-rw-r--r--generic/tclInt.decls10
-rw-r--r--generic/tclIntDecls.h10
-rw-r--r--generic/tclIntPlatDecls.h11
-rw-r--r--unix/tclUnixTime.c10
-rw-r--r--win/tclWinTime.c6
6 files changed, 37 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 84eec09..6809a43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,18 @@
+2004-10-28 Kevin B. Kenny <kennykb@acm.org>
+
+ * generic/tclInt.decls:
+ * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime):
+ * win/tclWinTime.c (TclpGmtime, TclpLocaltime):
+ Changed type signatures of TclpGmtime and TclpLocaltime
+ to accept CONST TclpTime_t throughout, to avoid any possible
+ confusion in pedantic compilers. [Bug 1001319]
+ * generic/tclIntDecls.h:
+ * generic/tclIntPlatDecls.h: Regenerated.
+
2004-10-27 Don Porter <dgp@users.sourceforge.net>
* generic/tclCmdAH.c (Tcl_FormatObjCmd): Restored missing
- line from yesterdays' 868486 backport that caused failed alloc's
+ line from yesterdays' 868489 backport that caused failed alloc's
on LP64 systems.
* tests/appendComp.test: Backport test suite fixes of errors
@@ -19,7 +30,7 @@
2004-10-26 Kevin B. Kenny <kennykb@acm.org>
* generic/tclCmdAH.c (Tcl_FormatObjCmd): Backport a missing bit
- of the bug 868486 fix.
+ of the bug 868489 fix.
* generic/tclObj.c (SetBooleanFromAny): Backport fix for Bug
1026125.
* tests/format.test (format-19.1): Additional regression test for
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 12afb31..71434b5 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tclInt.decls,v 1.59.2.4 2004/10/14 15:28:38 dkf Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.59.2.5 2004/10/28 16:06:32 kennykb Exp $
library tcl
@@ -700,10 +700,10 @@ declare 173 generic {
# TclpGmtime and TclpLocaltime promoted to the generic interface from unix
declare 182 generic {
- struct tm *TclpLocaltime(TclpTime_t clock)
+ struct tm *TclpLocaltime(CONST TclpTime_t clock)
}
declare 183 generic {
- struct tm *TclpGmtime(TclpTime_t clock)
+ struct tm *TclpGmtime(CONST TclpTime_t clock)
}
declare 199 generic {
@@ -998,11 +998,11 @@ declare 10 unix {
# generic Stubs
declare 11 unix {
- struct tm * TclpLocaltime_unix(TclpTime_t clock)
+ struct tm * TclpLocaltime_unix(CONST TclpTime_t clock)
}
declare 12 unix {
- struct tm * TclpGmtime_unix(TclpTime_t clock)
+ struct tm * TclpGmtime_unix(CONST TclpTime_t clock)
}
declare 13 unix {
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 2ed9392..e70baf1 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -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: tclIntDecls.h,v 1.49.2.6 2004/10/14 15:30:51 dkf Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.49.2.7 2004/10/28 16:06:33 kennykb Exp $
*/
#ifndef _TCLINTDECLS
@@ -512,9 +512,9 @@ EXTERN int TclUniCharMatch _ANSI_ARGS_((
/* Slot 180 is reserved */
/* Slot 181 is reserved */
/* 182 */
-EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((TclpTime_t clock));
+EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((CONST TclpTime_t clock));
/* 183 */
-EXTERN struct tm * TclpGmtime _ANSI_ARGS_((TclpTime_t clock));
+EXTERN struct tm * TclpGmtime _ANSI_ARGS_((CONST TclpTime_t clock));
/* Slot 184 is reserved */
/* Slot 185 is reserved */
/* Slot 186 is reserved */
@@ -743,8 +743,8 @@ typedef struct TclIntStubs {
void *reserved179;
void *reserved180;
void *reserved181;
- struct tm * (*tclpLocaltime) _ANSI_ARGS_((TclpTime_t clock)); /* 182 */
- struct tm * (*tclpGmtime) _ANSI_ARGS_((TclpTime_t clock)); /* 183 */
+ struct tm * (*tclpLocaltime) _ANSI_ARGS_((CONST TclpTime_t clock)); /* 182 */
+ struct tm * (*tclpGmtime) _ANSI_ARGS_((CONST TclpTime_t clock)); /* 183 */
void *reserved184;
void *reserved185;
void *reserved186;
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 8ced1c1..e5a3ca0 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.19.2.5 2004/06/10 17:17:44 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.19.2.6 2004/10/28 16:06:49 kennykb Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -62,9 +62,10 @@ EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((
/* 10 */
EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR * dir));
/* 11 */
-EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_((TclpTime_t clock));
+EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_((
+ CONST TclpTime_t clock));
/* 12 */
-EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((TclpTime_t clock));
+EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((CONST TclpTime_t clock));
/* 13 */
EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr));
#endif /* UNIX */
@@ -232,8 +233,8 @@ typedef struct TclIntPlatStubs {
int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 8 */
TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 9 */
Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR * dir)); /* 10 */
- struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((TclpTime_t clock)); /* 11 */
- struct tm * (*tclpGmtime_unix) _ANSI_ARGS_((TclpTime_t clock)); /* 12 */
+ struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((CONST TclpTime_t clock)); /* 11 */
+ struct tm * (*tclpGmtime_unix) _ANSI_ARGS_((CONST TclpTime_t clock)); /* 12 */
char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr)); /* 13 */
#endif /* UNIX */
#ifdef __WIN32__
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 47492e9..0e0268f 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.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: tclUnixTime.c,v 1.15.2.2 2004/05/17 14:26:50 kennykb Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.15.2.3 2004/10/28 16:06:50 kennykb Exp $
*/
#include "tclInt.h"
@@ -344,7 +344,7 @@ TclpStrftime(s, maxsize, format, t, useGMT)
struct tm *
TclpGmtime( tt )
- TclpTime_t tt;
+ CONST TclpTime_t tt;
{
CONST time_t *timePtr = (CONST time_t *) tt;
/* Pointer to the number of seconds
@@ -371,7 +371,7 @@ TclpGmtime( tt )
*/
struct tm*
TclpGmtime_unix( timePtr )
- TclpTime_t timePtr;
+ CONST TclpTime_t timePtr;
{
return TclpGmtime( timePtr );
}
@@ -395,7 +395,7 @@ TclpGmtime_unix( timePtr )
struct tm *
TclpLocaltime( tt )
- TclpTime_t tt;
+ CONST TclpTime_t tt;
{
CONST time_t *timePtr = (CONST time_t *) tt;
/* Pointer to the number of seconds
@@ -422,7 +422,7 @@ TclpLocaltime( tt )
*/
struct tm*
TclpLocaltime_unix( timePtr )
- TclpTime_t timePtr;
+ CONST TclpTime_t timePtr;
{
return TclpLocaltime( timePtr );
}
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index f428d52..0eb21b3 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.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: tclWinTime.c,v 1.14.2.5 2004/06/05 17:25:40 kennykb Exp $
+ * RCS: @(#) $Id: tclWinTime.c,v 1.14.2.6 2004/10/28 16:06:51 kennykb Exp $
*/
#include "tclWinInt.h"
@@ -1103,7 +1103,7 @@ AccumulateSample( Tcl_WideInt perfCounter,
struct tm *
TclpGmtime( tt )
- TclpTime_t tt;
+ CONST TclpTime_t tt;
{
CONST time_t *timePtr = (CONST time_t *) tt;
/* Pointer to the number of seconds
@@ -1135,7 +1135,7 @@ TclpGmtime( tt )
struct tm *
TclpLocaltime( tt )
- TclpTime_t tt;
+ CONST TclpTime_t tt;
{
CONST time_t *timePtr = (CONST time_t *) tt;
/* Pointer to the number of seconds