summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--compat/strftime.c12
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclIntDecls.h6
-rw-r--r--unix/tclUnixTime.c6
5 files changed, 16 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 0488403..cd585d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,13 +2,9 @@
* doc/Utf.3:
* generic/tcl.decls:
- * generic/tclInt.decls:
* generic/tclDecls.h:
- * generic/tclIntDecls.h:
- * generic/tclUtf.c:
- * compat/strftime.c:
- * unix/tclUnixTime.c: Changed function declarations in
- non-platform-specific APIs to use "unsigned long" instead of
+ * generic/tclUtf.c: Changed function declarations in
+ non-platform-specific public APIs to use "unsigned long" instead of
"size_t", which may not be defined on certain compilers (rather
than include sys/types.h, which may not exist).
diff --git a/compat/strftime.c b/compat/strftime.c
index 8f93a1a..bb8ea52 100644
--- a/compat/strftime.c
+++ b/compat/strftime.c
@@ -8,7 +8,7 @@
* source. See the copyright notice below for details on redistribution
* restrictions. The "license.terms" file does not apply to this file.
*
- * RCS: @(#) $Id: strftime.c,v 1.4 1999/07/22 01:08:04 redman Exp $
+ * RCS: @(#) $Id: strftime.c,v 1.5 1999/07/22 01:26:18 redman Exp $
*/
/*
@@ -45,7 +45,7 @@
*/
#if defined(LIBC_SCCS)
-static char *rcsid = "$Id: strftime.c,v 1.4 1999/07/22 01:08:04 redman Exp $";
+static char *rcsid = "$Id: strftime.c,v 1.5 1999/07/22 01:26:18 redman Exp $";
#endif /* LIBC_SCCS */
#include <time.h>
@@ -104,7 +104,7 @@ static int _secs _ANSI_ARGS_((const struct tm *t));
static size_t _fmt _ANSI_ARGS_((const char *format,
const struct tm *t));
-unsigned long
+size_t
TclpStrftime(s, maxsize, format, t)
char *s;
size_t maxsize;
@@ -115,12 +115,12 @@ TclpStrftime(s, maxsize, format, t)
pt = s;
if ((gsize = maxsize) < 1)
- return (unsigned long)(0);
+ return(0);
if (_fmt(format, t)) {
*pt = '\0';
- return (unsigned long) (maxsize - gsize);
+ return(maxsize - gsize);
}
- return (unsigned long)(0);
+ return(0);
}
#define SUN_WEEK(t) (((t)->tm_yday + 7 - \
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 26b02d4..7a6d82c 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -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: tclInt.decls,v 1.13 1999/07/22 01:08:05 redman Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.14 1999/07/22 01:26:18 redman Exp $
library tcl
@@ -502,7 +502,7 @@ declare 133 generic {
struct tm * TclpGetDate(TclpTime_t time, int useGMT)
}
declare 134 generic {
- unsigned long TclpStrftime(char *s, size_t maxsize, CONST char *format, \
+ size_t TclpStrftime(char *s, size_t maxsize, CONST char *format, \
CONST struct tm *t)
}
declare 135 generic {
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 89292bb..e519807 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.13 1999/07/22 01:08:05 redman Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.14 1999/07/22 01:26:19 redman Exp $
*/
#ifndef _TCLINTDECLS
@@ -452,7 +452,7 @@ EXTERN int TclpHasSockets _ANSI_ARGS_((Tcl_Interp * interp));
/* 133 */
EXTERN struct tm * TclpGetDate _ANSI_ARGS_((TclpTime_t time, int useGMT));
/* 134 */
-EXTERN unsigned long TclpStrftime _ANSI_ARGS_((char * s, size_t maxsize,
+EXTERN size_t TclpStrftime _ANSI_ARGS_((char * s, size_t maxsize,
CONST char * format, CONST struct tm * t));
/* 135 */
EXTERN int TclpCheckStackSpace _ANSI_ARGS_((void));
@@ -667,7 +667,7 @@ typedef struct TclIntStubs {
void (*tcl_SetNamespaceResolvers) _ANSI_ARGS_((Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc)); /* 131 */
int (*tclpHasSockets) _ANSI_ARGS_((Tcl_Interp * interp)); /* 132 */
struct tm * (*tclpGetDate) _ANSI_ARGS_((TclpTime_t time, int useGMT)); /* 133 */
- unsigned long (*tclpStrftime) _ANSI_ARGS_((char * s, size_t maxsize, CONST char * format, CONST struct tm * t)); /* 134 */
+ size_t (*tclpStrftime) _ANSI_ARGS_((char * s, size_t maxsize, CONST char * format, CONST struct tm * t)); /* 134 */
int (*tclpCheckStackSpace) _ANSI_ARGS_((void)); /* 135 */
void *reserved136;
int (*tclpChdir) _ANSI_ARGS_((CONST char * dirName)); /* 137 */
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 853ab2c..c1a9161 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.5 1999/07/22 01:08:05 redman Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.6 1999/07/22 01:26:19 redman Exp $
*/
#include "tclInt.h"
@@ -288,12 +288,12 @@ TclpGetDate(time, useGMT)
*----------------------------------------------------------------------
*/
-unsigned long
+size_t
TclpStrftime(s, maxsize, format, t)
char *s;
size_t maxsize;
CONST char *format;
CONST struct tm *t;
{
- return (unsigned long) strftime(s, maxsize, format, t);
+ return strftime(s, maxsize, format, t);
}