summaryrefslogtreecommitdiffstats
path: root/win/tclWin32Dll.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-03-31 08:52:25 (GMT)
committerhobbs <hobbs>2000-03-31 08:52:25 (GMT)
commitbfc465013806bbc8b695f2bbe20707a6b25ad961 (patch)
tree98cafa8492f8f5cdc15405f98b3da66ac0f35396 /win/tclWin32Dll.c
parent3c56f64822ed7b64de23a900456152fe8ee1fb60 (diff)
downloadtcl-bfc465013806bbc8b695f2bbe20707a6b25ad961.zip
tcl-bfc465013806bbc8b695f2bbe20707a6b25ad961.tar.gz
tcl-bfc465013806bbc8b695f2bbe20707a6b25ad961.tar.bz2
* generic/tclInt.decls:
* generic/tclIntPlatDecls.h: * generic/tclStubInit.c: * win/tclWin32Dll.c: removed TclWinSynchSpawn (vestige of Win32s support). * win/tclWinReg.c: made use of TclWinGetPlatformId instead of getting info again * win/tclWinPort.h: * win/Makefile.in: * win/configure.in: * win/tcl.m4: Added support for gcc/mingw on Windows [Bug: 4234]
Diffstat (limited to 'win/tclWin32Dll.c')
-rw-r--r--win/tclWin32Dll.c93
1 files changed, 6 insertions, 87 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index eb43771..ed4051a 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -1,15 +1,15 @@
/*
* tclWin32Dll.c --
*
- * This file contains the DLL entry point which sets up the 32-to-16-bit
- * thunking code for SynchSpawn if the library is running under Win32s.
+ * This file contains the DLL entry point.
*
* Copyright (c) 1995-1996 Sun Microsystems, Inc.
+ * Copyright (c) 1998-2000 Scriptics Corporation.
*
* 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.8 1999/12/09 14:44:10 hobbs Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.9 2000/03/31 08:52:30 hobbs Exp $
*/
#include "tclWinInt.h"
@@ -35,7 +35,7 @@ typedef VOID (WINAPI UTUNREGISTER)(HANDLE hModule);
*/
static HINSTANCE hInstance; /* HINSTANCE of this DLL. */
-static int platformId; /* Running under NT, 95, or Win32s? */
+static int platformId; /* Running under NT, or 95/98? */
/*
* The following function tables are used to dispatch to either the
@@ -203,86 +203,6 @@ DllMain(hInst, reason, reserved)
/*
*----------------------------------------------------------------------
*
- * TclWinSynchSpawn --
- *
- * 32-bit entry point to the 16-bit SynchSpawn code.
- *
- * Results:
- * 1 on success, 0 on failure.
- *
- * Side effects:
- * Spawns a command and waits for it to complete.
- *
- *----------------------------------------------------------------------
- */
-int
-TclWinSynchSpawn(void *args, int type, void **trans, Tcl_Pid *pidPtr)
-{
- HINSTANCE hKernel;
- UTREGISTER *utRegisterProc;
- UTUNREGISTER *utUnRegisterProc;
- UT32PROC *ut32Proc;
- char buffer[] = "TCL16xx.DLL";
- int result;
-
- hKernel = LoadLibraryA("kernel32.dll");
- if (hKernel == NULL) {
- return 0;
- }
-
- /*
- * Load the Universal Thunking routines from kernel32.dll.
- */
-
- utRegisterProc = (UTREGISTER *) GetProcAddress(hKernel, "UTRegister");
- utUnRegisterProc = (UTUNREGISTER *) GetProcAddress(hKernel, "UTUnRegister");
- if ((utRegisterProc == NULL) || (utUnRegisterProc == NULL)) {
- result = 0;
- goto done;
- }
-
- /*
- * Construct the complete name of tcl16xx.dll.
- */
-
- buffer[5] = '0' + TCL_MAJOR_VERSION;
- buffer[6] = '0' + TCL_MINOR_VERSION;
-
- /*
- * Register the Tcl thunk.
- */
-
- if ((*utRegisterProc)(hInstance, buffer, NULL, "UTProc", &ut32Proc,
- NULL, NULL) == FALSE) {
- result = 0;
- goto done;
- }
- if (ut32Proc != NULL) {
- /*
- * Invoke the thunk.
- */
-
- *pidPtr = 0;
- (*ut32Proc)(args, type, trans);
- result = 1;
- } else {
- /*
- * The 16-bit thunking DLL wasn't found. Return error code that
- * indicates this problem.
- */
-
- result = 0;
- }
- (*utUnRegisterProc)(hInstance);
-
- done:
- FreeLibrary(hKernel);
- return result;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TclWinGetTclInstance --
*
* Retrieves the global library instance handle.
@@ -313,8 +233,7 @@ TclWinGetTclInstance()
* None.
*
* Side effects:
- * Initializes the 16-bit thunking library, and the tclPlatformId
- * variable.
+ * Initializes the tclPlatformId variable.
*
*----------------------------------------------------------------------
*/
@@ -326,7 +245,7 @@ TclWinInit(hInst)
OSVERSIONINFO os;
hInstance = hInst;
- os.dwOSVersionInfoSize = sizeof(os);
+ os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&os);
platformId = os.dwPlatformId;