diff options
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r-- | generic/tclStubInit.c | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 23da6dc..561b9dd 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -290,10 +290,47 @@ static int formatInt(char *buffer, int n){ #endif #else /* UNIX and MAC */ -# define TclpLocaltime_unix TclpLocaltime -# define TclpGmtime_unix TclpGmtime +# ifdef TCL_NO_DEPRECATED +# define TclpLocaltime_unix 0 +# define TclpGmtime_unix 0 +# else +# define TclpLocaltime_unix TclpLocaltime +# define TclpGmtime_unix TclpGmtime +# endif #endif +#ifdef TCL_NO_DEPRECATED +# define Tcl_SeekOld 0 +# define Tcl_TellOld 0 +# undef Tcl_SetResult +# define Tcl_SetResult 0 +#else /* TCL_NO_DEPRECATED */ +# define Tcl_SeekOld seekOld +# define Tcl_TellOld tellOld + +static int +seekOld( + Tcl_Channel chan, /* The channel on which to seek. */ + int offset, /* Offset to seek to. */ + int mode) /* Relative to which location to seek? */ +{ + Tcl_WideInt wOffset, wResult; + + wOffset = Tcl_LongAsWide((long) offset); + wResult = Tcl_Seek(chan, wOffset, mode); + return (int) Tcl_WideAsLong(wResult); +} + +static int +tellOld( + Tcl_Channel chan) /* The channel to return pos for. */ +{ + Tcl_WideInt wResult = Tcl_Tell(chan); + + return (int) Tcl_WideAsLong(wResult); +} +#endif /* !TCL_NO_DEPRECATED */ + /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations |