summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/makefile.vc65
-rw-r--r--win/tclWin32Dll.c37
-rw-r--r--win/tclWinChan.c3
-rw-r--r--win/tclWinFile.c28
-rw-r--r--win/tclWinInt.h18
-rw-r--r--win/tclWinPort.h47
-rw-r--r--win/tclWinReg.c47
-rw-r--r--win/tclWinSock.c14
-rw-r--r--win/tclWinTime.c8
9 files changed, 154 insertions, 113 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index c054590..24f3dd7 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -6,7 +6,7 @@
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
-# RCS: @(#) $Id: makefile.vc,v 1.24 1999/02/03 02:59:17 stanton Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.25 1999/03/10 05:52:53 stanton Exp $
# Does not depend on the presence of any environment variables in
# order to compile tcl; all needed information is derived from
@@ -53,20 +53,21 @@ NODEBUG = 1
# -DTCL_MEM_DEBUG Enables the debugging memory allocator.
# -DTCL_COMPILE_DEBUG Enables byte compilation logging.
# -DTCL_COMPILE_STATS Enables byte compilation statistics gathering.
-# -DUSE_NATIVEMALLOC Disables the Tcl memory allocator in favor
+# -DUSE_NATIVE_MALLOC Disables the Tcl memory allocator in favor
# of the native malloc implementation. This is
# needed when using Purify.
#
#DEBUGDEFINES = -DTCL_MEM_DEBUG
#DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG
#DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
-#DEBUGDEFINES = -DUSE_NATIVEMALLOC
+#DEBUGDEFINES = -DUSE_NATIVE_MALLOC
######################################################################
# Do not modify below this line
######################################################################
NAMEPREFIX = tcl
+STUBPREFIX = $(NAMEPREFIX)stub
DOTVERSION = 8.0
VERSION = 80
@@ -85,6 +86,10 @@ OUTDIR = $(TMPDIR)
TCLLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(DBGX).lib
TCLDLLNAME = $(NAMEPREFIX)$(VERSION)$(DBGX).dll
TCLDLL = $(OUTDIR)\$(TCLDLLNAME)
+
+TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION)$(DBGX).lib
+TCLSTUBLIB = $(OUTDIR)\$(TCLSTUBLIBNAME)
+
TCLPLUGINLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)p$(DBGX).lib
TCLPLUGINDLLNAME= $(NAMEPREFIX)$(VERSION)p$(DBGX).dll
TCLPLUGINDLL = $(OUTDIR)\$(TCLPLUGINDLLNAME)
@@ -116,7 +121,6 @@ TCLTESTOBJS = \
$(TMPDIR)\testMain.obj
TCLOBJS = \
- $(TMPDIR)\panic.obj \
$(TMPDIR)\regexp.obj \
$(TMPDIR)\strftime.obj \
$(TMPDIR)\tclAlloc.obj \
@@ -152,6 +156,7 @@ TCLOBJS = \
$(TMPDIR)\tclNamesp.obj \
$(TMPDIR)\tclNotify.obj \
$(TMPDIR)\tclObj.obj \
+ $(TMPDIR)\tclPanic.obj \
$(TMPDIR)\tclParse.obj \
$(TMPDIR)\tclPipe.obj \
$(TMPDIR)\tclPkg.obj \
@@ -160,6 +165,7 @@ TCLOBJS = \
$(TMPDIR)\tclResolve.obj \
$(TMPDIR)\tclProc.obj \
$(TMPDIR)\tclStringObj.obj \
+ $(TMPDIR)\tclStubInit.obj \
$(TMPDIR)\tclTimer.obj \
$(TMPDIR)\tclUtil.obj \
$(TMPDIR)\tclVar.obj \
@@ -176,10 +182,18 @@ TCLOBJS = \
$(TMPDIR)\tclWinSock.obj \
$(TMPDIR)\tclWinTime.obj
+TCLSTUBOBJS = \
+ $(TMPDIR)\tclStubLib.obj \
+ $(TMPDIR)\tclStubs.obj \
+ $(TMPDIR)\tclPlatStubs.obj \
+ $(TMPDIR)\tclIntStubs.obj \
+ $(TMPDIR)\tclIntPlatStubs.obj
+
cc32 = "$(TOOLS32)\bin\cl.exe"
link32 = "$(TOOLS32)\bin\link.exe"
rc32 = "$(TOOLS32_rc)\bin\rc.exe"
include32 = -I"$(TOOLS32)\include"
+lib32 = "$(TOOLS32)\bin\lib.exe"
cc16 = "$(TOOLS16)\bin\cl.exe"
link16 = "$(TOOLS16)\bin\link.exe"
@@ -317,6 +331,9 @@ $(TCLDLL): $(TCLOBJS) $(TMPDIR)\tcl.def $(TMPDIR)\tcl.res
$(TCLOBJS)
<<
+$(TCLSTUBLIB): $(TCLSTUBOBJS)
+ $(lib32) /out:$@ $(TCLSTUBOBJS)
+
$(TCLPLUGINLIB): $(TCLPLUGINDLL)
$(TCLPLUGINDLL): $(TCLOBJS) $(TMPDIR)\plugin.def $(TMPDIR)\tcl.res
@@ -369,10 +386,10 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c
set LIB="$(TOOLS32)\lib"
$(link32) $(ldebug) $(conlflags) -out:$@ $(TMPDIR)\stub16.obj $(guilibs)
-$(TCLREGDLL): $(TMPDIR)\tclWinReg.obj
+$(TCLREGDLL): $(TMPDIR)\tclWinReg.obj $(TCLSTUBLIB)
set LIB="$(TOOLS32)\lib"
$(link32) $(ldebug) $(dlllflags) -out:$@ $(TMPDIR)\tclWinReg.obj \
- $(conlibsdll) $(TCLLIB)
+ $(conlibsdll) $(TCLSTUBLIB)
$(CAT32): $(WINDIR)\cat.c
$(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $?
@@ -407,6 +424,8 @@ install-binaries: $(TCLSH)
@copy $(TCLPIPEDLL) $(BIN_INSTALL_DIR)
@echo installing $(TCLREGDLLNAME)
@copy $(TCLREGDLL) $(LIB_INSTALL_DIR)
+ echo installing $(TCLSTUBLIBNAME)
+ copy $(TCLSTUBLIB) $(LIB_INSTALL_DIR)
install-libraries:
-@mkd $(LIB_INSTALL_DIR)
@@ -434,12 +453,19 @@ package ifneeded registry 1.0 "load [list [file join $$dir .. $(TCLREGDLLNAME)]]
-@copy $(ROOT)\library\word.tcl $(SCRIPT_INSTALL_DIR)
#
+# Regenerate the stubs files.
+#
+
+genstubs:
+ tclsh$(VERSION) $(ROOT)\tools\genStubs.tcl $(GENERICDIR) \
+ $(GENERICDIR)\tcl.decls $(GENERICDIR)\tclInt.decls
+
+#
# Special case object file targets
#
$(TMPDIR)\tclWinInit.obj: $(WINDIR)\tclWinInit.c
- $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) $(EXTFLAGS) \
- -Fo$(TMPDIR)\ $?
+ $(cc32) -DBUILD_tcl $(TCL_CFLAGS) $(EXTFLAGS) -Fo$(TMPDIR)\ $?
$(TMPDIR)\testMain.obj: $(WINDIR)\tclAppInit.c
$(cc32) $(TCL_CFLAGS) -DTCL_TEST -Fo$(TMPDIR)\testMain.obj $?
@@ -456,18 +482,35 @@ $(TMPDIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c
$(TMPDIR)\tclAppInit.obj : $(WINDIR)\tclAppInit.c
$(cc32) $(TCL_CFLAGS) -Fo$@ $?
+# The following objects should be built using the stub interfaces
+
+$(TMPDIR)\tclWinReg.obj : $(WINDIR)\tclWinReg.c
+ $(cc32) $(TCL_CFLAGS) -DUSE_TCL_STUBS -Fo$@ $?
+
+# The following objects are part of the stub library and should not
+# be built as DLL objects but none of the symbols should be exported
+
+$(TMPDIR)\tclStubs.obj : $(GENERICDIR)\tclStubs.c
+ $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
+$(TMPDIR)\tclPlatStubs.obj : $(GENERICDIR)\tclPlatStubs.c
+ $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
+$(TMPDIR)\tclIntStubs.obj : $(GENERICDIR)\tclIntStubs.c
+ $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
+$(TMPDIR)\tclPlatIntStubs.obj : $(GENERICDIR)\tclPlatIntStubs.c
+ $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
+
#
# Implicit rules
#
{$(WINDIR)}.c{$(TMPDIR)}.obj:
- $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
+ $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
- $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
+ $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
{$(ROOT)\compat}.c{$(TMPDIR)}.obj:
- $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
+ $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
{$(WINDIR)}.rc{$(TMPDIR)}.res:
$(rc32) -fo $@ -r -i $(GENERICDIR) -i $(WINDIR) -D__WIN32__ \
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 9de0589..16c47c1 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.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: tclWin32Dll.c,v 1.4 1998/09/14 18:40:19 stanton Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.5 1999/03/10 05:52:53 stanton Exp $
*/
#include "tclWinInt.h"
@@ -378,6 +378,41 @@ TclWinGetTclInstance()
/*
*----------------------------------------------------------------------
*
+ * TclpCheckStackSpace --
+ *
+ * Detect if we are about to blow the stack. Called before an
+ * evaluation can happen when nesting depth is checked.
+ *
+ * Results:
+ * 1 if there is enough stack space to continue; 0 if not.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclpCheckStackSpace()
+{
+ /*
+ * We can recurse only if there is at least TCL_WIN_STACK_THRESHOLD
+ * bytes of stack space left. alloca() is cheap on windows; basically
+ * it just subtracts from the stack pointer causing the OS to throw an
+ * exception if the stack pointer is set below the bottom of the stack.
+ */
+
+ try {
+ alloca(TCL_WIN_STACK_THRESHOLD);
+ return 1;
+ } except (1) {}
+
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* TclWinGetPlatformId --
*
* Determines whether running under NT, 95, or Win32s, to allow
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 3d2c4e6..c2ba568 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.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: tclWinChan.c,v 1.4 1999/01/04 19:25:05 rjohnson Exp $
+ * RCS: @(#) $Id: tclWinChan.c,v 1.5 1999/03/10 05:52:53 stanton Exp $
*/
#include "tclWinInt.h"
@@ -454,6 +454,7 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr)
newPos = SetFilePointer(infoPtr->handle, offset, NULL, moveMethod);
if (newPos == 0xFFFFFFFF) {
TclWinConvertError(GetLastError());
+ *errorCodePtr = errno;
return -1;
}
return newPos;
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 4f0f26d..b43ff51 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -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: tclWinFile.c,v 1.3 1998/09/14 18:40:20 stanton Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.4 1999/03/10 05:52:53 stanton Exp $
*/
#include "tclWinInt.h"
@@ -644,4 +644,30 @@ TclpAccess(
}
return result;
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclGetUserHome --
+ *
+ * This function takes the passed in user name and finds the
+ * corresponding home directory specified in the password file.
+ *
+ * Results:
+ * On Windows we always return a NULL.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+char *
+TclGetUserHome(
+ char *name, /* User name to use to find home directory. */
+ Tcl_DString *bufferPtr) /* May be used to hold result. Must not hold
+ * anything at the time of the call, and need
+ * not even be initialized. */
+{
+ return NULL;
+}
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 4169472..e0e1903 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -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: tclWinInt.h,v 1.5 1998/09/14 18:40:20 stanton Exp $
+ * RCS: @(#) $Id: tclWinInt.h,v 1.6 1999/03/10 05:52:53 stanton Exp $
*/
#ifndef _TCLWININT
@@ -27,6 +27,14 @@
#endif
/*
+ * The following specifies how much stack space TclpCheckStackSpace()
+ * ensures is available. TclpCheckStackSpace() is called by Tcl_EvalObj()
+ * to help avoid overflowing the stack in the case of infinite recursion.
+ */
+
+#define TCL_WIN_STACK_THRESHOLD 0x2000
+
+/*
* Some versions of Borland C have a define for the OSVERSIONINFO for
* Win32s and for NT, but not for Windows 95.
*/
@@ -35,10 +43,12 @@
#define VER_PLATFORM_WIN32_WINDOWS 1
#endif
-EXTERN int TclWinGetPlatformId(void);
+/*
+ * Declarations of functions that are not accessible by way of the
+ * stubs table.
+ */
+
EXTERN void TclWinInit(HINSTANCE hInst);
-EXTERN int TclWinSynchSpawn(void *args, int type, void **trans,
- Tcl_Pid *pidPtr);
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index faca7e7..2bb6b72 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -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: tclWinPort.h,v 1.6 1998/09/30 23:57:18 stanton Exp $
+ * RCS: @(#) $Id: tclWinPort.h,v 1.7 1999/03/10 05:52:53 stanton Exp $
*/
#ifndef _TCLWINPORT
@@ -206,12 +206,6 @@
#endif
/*
- * Provide a stub definition for TclGetUserHome().
- */
-
-#define TclGetUserHome(name,bufferPtr) (NULL)
-
-/*
* Visual C++ has some odd names for common functions, so we need to
* define a few macros to handle them. Also, it defines EDEADLOCK and
* EDEADLK as the same value, which confuses Tcl_ErrnoId().
@@ -354,52 +348,21 @@
/*
* The following implements the Windows method for exiting the process.
*/
-#define TclPlatformExit(status) exit(status)
-
-
-/*
- * The following declarations belong in tclInt.h, but depend on platform
- * specific types (e.g. struct tm).
- */
-EXTERN struct tm * TclpGetDate _ANSI_ARGS_((const time_t *tp,
- int useGMT));
-EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid));
-EXTERN size_t TclStrftime _ANSI_ARGS_((char *s, size_t maxsize,
- const char *format, const struct tm *t));
+#define TclPlatformExit(status) exit(status)
/*
* The following prototypes and defines replace the Windows versions
- * of POSIX function that various compilier vendors didn't implement
+ * of POSIX function that various compiler vendors didn't implement
* well or consistantly.
*/
#define lstat TclStat
-EXTERN int TclpStat _ANSI_ARGS_((CONST char *path,
- struct stat *buf));
-EXTERN int TclpAccess _ANSI_ARGS_((CONST char *path,
- int mode));
-
#define TclpReleaseFile(file) ckfree((char *) file)
-/*
- * Declarations for Windows specific functions.
- */
-
-EXTERN void TclWinConvertError _ANSI_ARGS_((DWORD errCode));
-EXTERN void TclWinConvertWSAError _ANSI_ARGS_((DWORD errCode));
-EXTERN struct servent * PASCAL FAR
- TclWinGetServByName _ANSI_ARGS_((const char FAR *nm,
- const char FAR *proto));
-EXTERN int PASCAL FAR TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level,
- int optname, char FAR * optval, int FAR *optlen));
-EXTERN HINSTANCE TclWinGetTclInstance _ANSI_ARGS_((void));
-EXTERN HINSTANCE TclWinLoadLibrary _ANSI_ARGS_((char *name));
-EXTERN u_short PASCAL FAR
- TclWinNToHS _ANSI_ARGS_((u_short ns));
-EXTERN int PASCAL FAR TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level,
- int optname, const char FAR * optval, int optlen));
+#include "tclPlatDecls.h"
+#include "tclIntPlatDecls.h"
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index 58d0b61..0f892df 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.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: tclWinReg.c,v 1.7 1999/02/02 22:25:21 stanton Exp $
+ * RCS: @(#) $Id: tclWinReg.c,v 1.8 1999/03/10 05:52:53 stanton Exp $
*/
#include <tcl.h>
@@ -30,17 +30,6 @@
#define TCL_STORAGE_CLASS DLLEXPORT
/*
- * VC++ has an alternate entry point called DllMain, so we need to rename
- * our entry point.
- */
-
-#ifdef DLL_BUILD
-# if defined(_MSC_VER)
-# define DllEntryPoint DllMain
-# endif
-#endif
-
-/*
* The following macros convert between different endian ints.
*/
@@ -118,38 +107,7 @@ static int SetValue(Tcl_Interp *interp, Tcl_Obj *keyNameObj,
Tcl_Obj *typeObj);
EXTERN int Registry_Init(Tcl_Interp *interp);
-
-/*
- *----------------------------------------------------------------------
- *
- * DllEntryPoint --
- *
- * This wrapper function is used by Windows to invoke the
- * initialization code for the DLL. If we are compiling
- * with Visual C++, this routine will be renamed to DllMain.
- * routine.
- *
- * Results:
- * Returns TRUE;
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-#ifdef __WIN32__
-#ifdef DLL_BUILD
-BOOL APIENTRY
-DllEntryPoint(
- HINSTANCE hInst, /* Library instance handle. */
- DWORD reason, /* Reason this function is being called. */
- LPVOID reserved) /* Not used. */
-{
- return TRUE;
-}
-#endif
-#endif
/*
*----------------------------------------------------------------------
@@ -171,6 +129,9 @@ int
Registry_Init(
Tcl_Interp *interp)
{
+ if (!Tcl_InitStubs(interp, "8.0", 0)) {
+ return TCL_ERROR;
+ }
Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, NULL, NULL);
return Tcl_PkgProvide(interp, "registry", "1.0");
}
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index a8f2a2f..9fa05c9 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.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: tclWinSock.c,v 1.5 1999/02/03 00:51:20 stanton Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.6 1999/03/10 05:52:54 stanton Exp $
*/
#include "tclInt.h"
@@ -2081,7 +2081,7 @@ Tcl_GetHostName()
*----------------------------------------------------------------------
*/
-int PASCAL FAR
+int
TclWinGetSockOpt(SOCKET s, int level, int optname, char FAR * optval,
int FAR *optlen)
{
@@ -2099,7 +2099,7 @@ TclWinGetSockOpt(SOCKET s, int level, int optname, char FAR * optval,
return (*winSock.getsockopt)(s, level, optname, optval, optlen);
}
-int PASCAL FAR
+int
TclWinSetSockOpt(SOCKET s, int level, int optname, const char FAR * optval,
int optlen)
{
@@ -2117,7 +2117,7 @@ TclWinSetSockOpt(SOCKET s, int level, int optname, const char FAR * optval,
return (*winSock.setsockopt)(s, level, optname, optval, optlen);
}
-u_short PASCAL FAR
+u_short
TclWinNToHS(u_short netshort)
{
/*
@@ -2134,8 +2134,8 @@ TclWinNToHS(u_short netshort)
return (*winSock.ntohs)(netshort);
}
-struct servent FAR * PASCAL FAR
-TclWinGetServByName(const char FAR * name, const char FAR * proto)
+struct servent *
+TclWinGetServByName(const char * name, const char * proto)
{
/*
* Check that WinSock is initialized; do not call it if not, to
@@ -2145,7 +2145,7 @@ TclWinGetServByName(const char FAR * name, const char FAR * proto)
*/
if (winSock.hInstance == NULL) {
- return (struct servent FAR *) NULL;
+ return (struct servent *) NULL;
}
return (*winSock.getservbyname)(name, proto);
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 089a057..0630caf 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.2 1998/09/14 18:40:20 stanton Exp $
+ * RCS: @(#) $Id: tclWinTime.c,v 1.3 1999/03/10 05:52:54 stanton Exp $
*/
#include "tclInt.h"
@@ -191,10 +191,12 @@ TclpGetTZName()
*/
struct tm *
-TclpGetDate(tp, useGMT)
- const time_t *tp;
+TclpGetDate(t, useGMT)
+ TclpTime_t t;
int useGMT;
{
+ const time_t *tp = (const time_t *) t;
+
struct tm *tmPtr;
long time;