--- origsrc/tcl8.6.6/generic/tcl.h	2016-07-22 09:43:05.000000000 -0500
+++ src/tcl8.6.6/generic/tcl.h	2017-03-04 22:39:45.022877400 -0600
@@ -452,7 +452,7 @@ typedef unsigned TCL_WIDE_INT_TYPE	Tcl_W
 #   else
 	typedef struct _stat32i64 Tcl_StatBuf;
 #   endif /* _MSC_VER < 1400 */
-#elif defined(__CYGWIN__)
+#elif 0
     typedef struct {
 	dev_t st_dev;
 	unsigned short st_ino;
--- origsrc/tcl8.6.6/generic/tclCmdAH.c	2016-07-12 09:15:39.000000000 -0500
+++ src/tcl8.6.6/generic/tclCmdAH.c	2017-03-04 22:40:27.745126400 -0600
@@ -1596,7 +1596,7 @@ FileAttrIsOwnedCmd(
     int objc,
     Tcl_Obj *const objv[])
 {
-#ifdef __CYGWIN__
+#if 0
 #define geteuid() (short)(geteuid)()
 #endif
 #if !defined(_WIN32)
--- origsrc/tcl8.6.6/generic/tclDecls.h	2016-07-26 09:07:04.000000000 -0500
+++ src/tcl8.6.6/generic/tclDecls.h	2017-03-04 22:41:11.527418600 -0600
@@ -3857,7 +3857,7 @@ extern const TclStubs *tclStubsPtr;
 	Tcl_UpVar2(interp, frameName, varName, NULL, localName, flags)
 
 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-#   if defined(__CYGWIN__) && defined(TCL_WIDE_INT_IS_LONG)
+#   if 0
 /* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore
  * we have to make sure that all stub entries on Cygwin64 follow the
  * Win64 signature. Cygwin64 stubbed extensions cannot use those stub
--- origsrc/tcl8.6.6/generic/tclFCmd.c	2016-02-25 14:12:37.000000000 -0600
+++ src/tcl8.6.6/generic/tclFCmd.c	2017-03-04 22:41:35.374025900 -0600
@@ -517,7 +517,7 @@ CopyRenameOneFile(
 	 * 16 bits and we get collisions. See bug #2015723.
 	 */
 
-#if !defined(_WIN32) && !defined(__CYGWIN__)
+#if !defined(_WIN32)
 	if ((sourceStatBuf.st_ino != 0) && (targetStatBuf.st_ino != 0)) {
 	    if ((sourceStatBuf.st_ino == targetStatBuf.st_ino) &&
 		    (sourceStatBuf.st_dev == targetStatBuf.st_dev)) {
--- origsrc/tcl8.6.6/generic/tclIOSock.c	2016-02-25 14:12:37.000000000 -0600
+++ src/tcl8.6.6/generic/tclIOSock.c	2017-03-04 22:43:16.133978700 -0600
@@ -104,7 +104,7 @@ TclSockGetPort(
  *----------------------------------------------------------------------
  */
 
-#if !defined(_WIN32) && !defined(__CYGWIN__)
+#if !defined(_WIN32)
 #   define SOCKET int
 #endif
 
--- origsrc/tcl8.6.6/generic/tclIntPlatDecls.h	2016-07-26 09:07:04.000000000 -0500
+++ src/tcl8.6.6/generic/tclIntPlatDecls.h	2017-03-04 22:43:03.482882200 -0600
@@ -45,7 +45,7 @@ extern "C" {
  * Exported function declarations:
  */
 
-#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
 /* 0 */
 EXTERN void		TclGetAndDetachPids(Tcl_Interp *interp,
 				Tcl_Channel chan);
@@ -104,7 +104,7 @@ EXTERN int		TclUnixOpenTemporaryFile(Tcl
 				Tcl_Obj *basenameObj, Tcl_Obj *extensionObj,
 				Tcl_Obj *resultingNameObj);
 #endif /* UNIX */
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
 /* 0 */
 EXTERN void		TclWinConvertError(DWORD errCode);
 /* 1 */
@@ -258,7 +258,7 @@ typedef struct TclIntPlatStubs {
     int magic;
     void *hooks;
 
-#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
     void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */
     int (*tclpCloseFile) (TclFile file); /* 1 */
     Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
@@ -291,7 +291,7 @@ typedef struct TclIntPlatStubs {
     int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */
     int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
 #endif /* UNIX */
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
     void (*tclWinConvertError) (DWORD errCode); /* 0 */
     void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */
     struct servent * (*tclWinGetServByName) (const char *nm, const char *proto); /* 2 */
@@ -371,7 +371,7 @@ extern const TclIntPlatStubs *tclIntPlat
  * Inline function declarations:
  */
 
-#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
 #define TclGetAndDetachPids \
 	(tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */
 #define TclpCloseFile \
@@ -420,7 +420,7 @@ extern const TclIntPlatStubs *tclIntPlat
 #define TclUnixOpenTemporaryFile \
 	(tclIntPlatStubsPtr->tclUnixOpenTemporaryFile) /* 30 */
 #endif /* UNIX */
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
 #define TclWinConvertError \
 	(tclIntPlatStubsPtr->tclWinConvertError) /* 0 */
 #define TclWinConvertWSAError \
--- origsrc/tcl8.6.6/generic/tclPanic.c	2016-02-25 14:12:37.000000000 -0600
+++ src/tcl8.6.6/generic/tclPanic.c	2017-03-04 22:44:26.093936700 -0600
@@ -14,7 +14,7 @@
  */
 
 #include "tclInt.h"
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
     MODULE_SCOPE TCL_NORETURN void tclWinDebugPanic(const char *format, ...);
 #endif
 
@@ -23,7 +23,7 @@
  * procedure.
  */
 
-#if defined(__CYGWIN__)
+#if 0
 static TCL_NORETURN Tcl_PanicProc *panicProc = tclWinDebugPanic;
 #else
 static TCL_NORETURN1 Tcl_PanicProc *panicProc = NULL;
@@ -52,7 +52,7 @@ Tcl_SetPanicProc(
 #if defined(_WIN32)
     /* tclWinDebugPanic only installs if there is no panicProc yet. */
     if ((proc != tclWinDebugPanic) || (panicProc == NULL))
-#elif defined(__CYGWIN__)
+#elif 0
     if (proc == NULL)
 	panicProc = tclWinDebugPanic;
     else
@@ -106,7 +106,7 @@ Tcl_PanicVA(
 		arg8);
 	fprintf(stderr, "\n");
 	fflush(stderr);
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
 #   if defined(__GNUC__)
 	__builtin_trap();
 #   elif defined(_WIN64)
--- origsrc/tcl8.6.6/generic/tclPlatDecls.h	2016-07-26 09:07:04.000000000 -0500
+++ src/tcl8.6.6/generic/tclPlatDecls.h	2017-03-04 22:45:03.396256500 -0600
@@ -31,7 +31,7 @@
  * TCHAR is needed here for win32, so if it is not defined yet do it here.
  * This way, we don't need to include <tchar.h> just for one define.
  */
-#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED)
+#if defined(_WIN32) && !defined(_TCHAR_DEFINED)
 #   if defined(_UNICODE)
 	typedef wchar_t TCHAR;
 #   else
@@ -50,7 +50,7 @@ extern "C" {
  * Exported function declarations:
  */
 
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
 /* 0 */
 EXTERN TCHAR *		Tcl_WinUtfToTChar(const char *str, int len,
 				Tcl_DString *dsPtr);
@@ -75,7 +75,7 @@ typedef struct TclPlatStubs {
     int magic;
     void *hooks;
 
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
     TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr); /* 0 */
     char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */
 #endif /* WIN */
@@ -97,7 +97,7 @@ extern const TclPlatStubs *tclPlatStubsP
  * Inline function declarations:
  */
 
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
 #define Tcl_WinUtfToTChar \
 	(tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
 #define Tcl_WinTCharToUtf \
--- origsrc/tcl8.6.6/generic/tclStubInit.c	2016-07-26 09:07:04.000000000 -0500
+++ src/tcl8.6.6/generic/tclStubInit.c	2017-03-04 22:45:48.420678300 -0600
@@ -85,7 +85,7 @@ static const char *TclGetStartupScriptFi
     return Tcl_GetString(path);
 }
 
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
 #undef TclWinNToHS
 #define TclWinNToHS winNToHS
 static unsigned short TclWinNToHS(unsigned short ns) {
@@ -99,7 +99,7 @@ static unsigned short TclWinNToHS(unsign
 #   define TclUnixOpenTemporaryFile 0
 #   define TclpReaddir 0
 #   define TclpIsAtty 0
-#elif defined(__CYGWIN__)
+#elif 0
 #   define TclpIsAtty TclPlatIsAtty
 #   define TclWinSetInterfaces (void (*) (int)) doNothing
 #   define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing
@@ -565,7 +565,7 @@ static const TclIntStubs tclIntStubs = {
 static const TclIntPlatStubs tclIntPlatStubs = {
     TCL_STUB_MAGIC,
     0,
-#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
+#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
     TclGetAndDetachPids, /* 0 */
     TclpCloseFile, /* 1 */
     TclpCreateCommandChannel, /* 2 */
@@ -598,7 +598,7 @@ static const TclIntPlatStubs tclIntPlatS
     TclWinCPUID, /* 29 */
     TclUnixOpenTemporaryFile, /* 30 */
 #endif /* UNIX */
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
     TclWinConvertError, /* 0 */
     TclWinConvertWSAError, /* 1 */
     TclWinGetServByName, /* 2 */
@@ -669,7 +669,7 @@ static const TclIntPlatStubs tclIntPlatS
 static const TclPlatStubs tclPlatStubs = {
     TCL_STUB_MAGIC,
     0,
-#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
+#if defined(_WIN32) /* WIN */
     Tcl_WinUtfToTChar, /* 0 */
     Tcl_WinTCharToUtf, /* 1 */
 #endif /* WIN */
--- origsrc/tcl8.6.6/tools/genStubs.tcl	2016-06-01 12:53:14.000000000 -0500
+++ src/tcl8.6.6/tools/genStubs.tcl	2017-03-04 22:46:31.000065300 -0600
@@ -282,9 +282,6 @@ proc genStubs::addPlatformGuard {plat if
     switch $plat {
 	win {
 	    append text "#if defined(_WIN32)"
-	    if {$withCygwin} {
-		append text " || defined(__CYGWIN__)"
-	    }
 	    append text " /* WIN */\n${iftxt}"
 	    if {$eltxt ne ""} {
 		append text "#else /* WIN */\n${eltxt}"
@@ -293,9 +290,6 @@ proc genStubs::addPlatformGuard {plat if
 	}
 	unix {
 	    append text "#if !defined(_WIN32)"
-	    if {$withCygwin} {
-		append text " && !defined(__CYGWIN__)"
-	    }
 	    append text " && !defined(MAC_OSX_TCL)\
 		    /* UNIX */\n${iftxt}"
 	    if {$eltxt ne ""} {
@@ -319,9 +313,6 @@ proc genStubs::addPlatformGuard {plat if
 	}
 	x11 {
 	    append text "#if !(defined(_WIN32)"
-	    if {$withCygwin} {
-		append text " || defined(__CYGWIN__)"
-	    }
 	    append text " || defined(MAC_OSX_TK))\
 		    /* X11 */\n${iftxt}"
 	    if {$eltxt ne ""} {
--- origsrc/tcl8.6.6/unix/Makefile.in	2016-07-26 09:07:18.000000000 -0500
+++ src/tcl8.6.6/unix/Makefile.in	2017-03-04 22:53:02.992760000 -0600
@@ -627,9 +627,6 @@ ${LIB_FILE}: ${STUB_LIB_FILE} ${OBJS}
 	@MAKE_LIB@
 
 ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
-	@if test "x${LIB_FILE}" = "xlibtcl${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \
-	    (cd ${TOP_DIR}/win; ${MAKE} winextensions); \
-	fi
 	rm -f $@
 	@MAKE_STUB_LIB@
 
--- origsrc/tcl8.6.6/unix/tcl.m4	2016-07-26 09:07:18.000000000 -0500
+++ src/tcl8.6.6/unix/tcl.m4	2017-03-04 22:48:08.007911300 -0600
@@ -1205,7 +1205,20 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
 	    CC_SEARCH_FLAGS=""
 	    LD_SEARCH_FLAGS=""
 	    ;;
-	CYGWIN_*|MINGW32*)
+	CYGWIN_*)
+	    SHLIB_CFLAGS=""
+	    SHLIB_LD='${CC} -shared'
+	    SHLIB_SUFFIX=".dll"
+	    DL_OBJS="tclLoadDl.o"
+	    DL_LIBS="-ldl"
+	    CC_SEARCH_FLAGS=""
+	    LD_SEARCH_FLAGS=""
+	    TCL_NEEDS_EXP_FILE=1
+	    TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a'
+	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
+	    do64bit_ok=yes
+	    ;;
+	MINGW32*)
 	    SHLIB_CFLAGS=""
 	    SHLIB_LD='${CC} -shared'
 	    SHLIB_SUFFIX=".dll"
--- origsrc/tcl8.6.6/unix/tclUnixFCmd.c	2016-02-25 14:12:38.000000000 -0600
+++ src/tcl8.6.6/unix/tclUnixFCmd.c	2017-03-04 22:57:04.257246700 -0600
@@ -91,7 +91,7 @@ static int		SetPermissionsAttribute(Tcl_
 			    Tcl_Obj *attributePtr);
 static int		GetModeFromPermString(Tcl_Interp *interp,
 			    const char *modeStringPtr, mode_t *modePtr);
-#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) || defined(__CYGWIN__)
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
 static int		GetUnixFileAttributes(Tcl_Interp *interp, int objIndex,
 			    Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr);
 static int		SetUnixFileAttributes(Tcl_Interp *interp, int objIndex,
@@ -124,20 +124,11 @@ extern const char *const tclpFileAttrStr
 
 #else /* !DJGPP */
 enum {
-#if defined(__CYGWIN__)
-    UNIX_ARCHIVE_ATTRIBUTE,
-#endif
     UNIX_GROUP_ATTRIBUTE,
-#if defined(__CYGWIN__)
-    UNIX_HIDDEN_ATTRIBUTE,
-#endif
     UNIX_OWNER_ATTRIBUTE, UNIX_PERMISSIONS_ATTRIBUTE,
-#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) || defined(__CYGWIN__)
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
     UNIX_READONLY_ATTRIBUTE,
 #endif
-#if defined(__CYGWIN__)
-    UNIX_SYSTEM_ATTRIBUTE,
-#endif
 #ifdef MAC_OSX_TCL
     MACOSX_CREATOR_ATTRIBUTE, MACOSX_TYPE_ATTRIBUTE, MACOSX_HIDDEN_ATTRIBUTE,
     MACOSX_RSRCLENGTH_ATTRIBUTE,
@@ -147,20 +138,11 @@ enum {
 
 MODULE_SCOPE const char *const tclpFileAttrStrings[];
 const char *const tclpFileAttrStrings[] = {
-#if defined(__CYGWIN__)
-    "-archive",
-#endif
     "-group",
-#if defined(__CYGWIN__)
-    "-hidden",
-#endif
     "-owner", "-permissions",
-#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) || defined(__CYGWIN__)
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
     "-readonly",
 #endif
-#if defined(__CYGWIN__)
-    "-system",
-#endif
 #ifdef MAC_OSX_TCL
     "-creator", "-type", "-hidden", "-rsrclength",
 #endif
@@ -169,19 +151,10 @@ const char *const tclpFileAttrStrings[]
 
 MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[];
 const TclFileAttrProcs tclpFileAttrProcs[] = {
-#if defined(__CYGWIN__)
-    {GetUnixFileAttributes, SetUnixFileAttributes},
-#endif
     {GetGroupAttribute, SetGroupAttribute},
-#if defined(__CYGWIN__)
-    {GetUnixFileAttributes, SetUnixFileAttributes},
-#endif
     {GetOwnerAttribute, SetOwnerAttribute},
     {GetPermissionsAttribute, SetPermissionsAttribute},
-#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) || defined(__CYGWIN__)
-    {GetUnixFileAttributes, SetUnixFileAttributes},
-#endif
-#if defined(__CYGWIN__)
+#if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
     {GetUnixFileAttributes, SetUnixFileAttributes},
 #endif
 #ifdef MAC_OSX_TCL
@@ -2275,7 +2275,7 @@ DefaultTempDir(void)
     return TCL_TEMPORARY_FILE_DIRECTORY;
 }
 
-#if defined(__CYGWIN__)
+#if 0
 
 static void
 StatError(
--- origsrc/tcl8.6.6/unix/tclUnixFile.c	2016-02-25 14:12:38.000000000 -0600
+++ src/tcl8.6.6/unix/tclUnixFile.c	2017-03-04 22:49:20.292343600 -0600
@@ -40,7 +40,7 @@ TclpFindExecutable(
 				 * (native). */
 {
     Tcl_Encoding encoding;
-#ifdef __CYGWIN__
+#if 0
     int length;
     char buf[PATH_MAX * 2];
     char name[PATH_MAX * TCL_UTF_MAX + 1];
@@ -1185,7 +1185,7 @@ TclpUtime(
     return utime(Tcl_FSGetNativePath(pathPtr), tval);
 }
 
-#ifdef __CYGWIN__
+#if 0
 
 int
 TclOSstat(
--- origsrc/tcl8.6.6/unix/tclUnixInit.c	2016-02-25 14:12:38.000000000 -0600
+++ src/tcl8.6.6/unix/tclUnixInit.c	2017-03-04 22:49:51.542337200 -0600
@@ -32,7 +32,7 @@
 #   endif
 #endif
 
-#ifdef __CYGWIN__
+#if 0
 DLLIMPORT extern __stdcall unsigned char GetVersionExW(void *);
 DLLIMPORT extern __stdcall void *LoadLibraryW(const void *);
 DLLIMPORT extern __stdcall void FreeLibrary(void *);
@@ -748,7 +748,7 @@ void
 TclpSetVariables(
     Tcl_Interp *interp)
 {
-#ifdef __CYGWIN__
+#if 0
     SYSTEM_INFO sysInfo;
     static OSVERSIONINFOW osInfo;
     static int osInfoInitialized = 0;
@@ -862,7 +862,7 @@ TclpSetVariables(
 #endif
 
     unameOK = 0;
-#ifdef __CYGWIN__
+#if 0
 	unameOK = 1;
     if (!osInfoInitialized) {
 	HANDLE handle = LoadLibraryW(L"NTDLL");
--- origsrc/tcl8.6.6/unix/tclUnixNotfy.c	2016-03-23 06:43:13.000000000 -0500
+++ src/tcl8.6.6/unix/tclUnixNotfy.c	2017-03-04 22:51:42.756332500 -0600
@@ -93,7 +93,7 @@ typedef struct ThreadSpecificData {
 				 * from these pointers. You must hold the
 				 * notifierMutex lock before accessing these
 				 * fields. */
-#ifdef __CYGWIN__
+#if 0
     void *event;     /* Any other thread alerts a notifier
 	 * that an event is ready to be processed
 	 * by sending this event. */
@@ -209,7 +209,7 @@ static int	FileHandlerEventProc(Tcl_Even
  * Import of Windows API when building threaded with Cygwin.
  */
 
-#if defined(TCL_THREADS) && defined(__CYGWIN__)
+#if 0
 typedef struct {
     void *hwnd;
     unsigned int *message;
@@ -336,7 +336,7 @@ Tcl_InitNotifier(void)
 	 * Initialize thread specific condition variable for this thread.
 	 */
 	if (tsdPtr->waitCVinitialized == 0) {
-#ifdef __CYGWIN__
+#if 0
 	    WNDCLASSW class;
 
 	    class.style = 0;
@@ -454,7 +454,7 @@ Tcl_FinalizeNotifier(
 	 * Clean up any synchronization objects in the thread local storage.
 	 */
 
-#ifdef __CYGWIN__
+#if 0
 	DestroyWindow(tsdPtr->hwnd);
 	CloseHandle(tsdPtr->event);
 #else /* __CYGWIN__ */
@@ -500,7 +500,7 @@ Tcl_AlertNotifier(
 	pthread_mutex_lock(&notifierMutex);
 	tsdPtr->eventReady = 1;
 
-#   ifdef __CYGWIN__
+#   if 0
 	PostMessageW(tsdPtr->hwnd, 1024, 0, 0);
 #   else
 	pthread_cond_broadcast(&tsdPtr->waitCV);
@@ -813,7 +813,7 @@ FileHandlerEventProc(
     return 1;
 }
 
-#if defined(TCL_THREADS) && defined(__CYGWIN__)
+#if 0
 
 static DWORD __stdcall
 NotifierProc(
@@ -868,7 +868,7 @@ Tcl_WaitForEvent(
 	Tcl_Time vTime;
 #ifdef TCL_THREADS
 	int waitForFiles;
-#   ifdef __CYGWIN__
+#   if 0
 	MSG msg;
 #   endif /* __CYGWIN__ */
 #else
@@ -984,7 +984,7 @@ Tcl_WaitForEvent(
 	FD_ZERO(&tsdPtr->readyMasks.exception);
 
 	if (!tsdPtr->eventReady) {
-#ifdef __CYGWIN__
+#if 0
 	    if (!PeekMessageW(&msg, NULL, 0, 0, 0)) {
 		DWORD timeout;
 
@@ -1014,7 +1014,7 @@ Tcl_WaitForEvent(
 	}
 	tsdPtr->eventReady = 0;
 
-#ifdef __CYGWIN__
+#if 0
 	while (PeekMessageW(&msg, NULL, 0, 0, 0)) {
 	    /*
 	     * Retrieve and dispatch the message.
@@ -1303,7 +1303,7 @@ NotifierThreadProc(
 		    tsdPtr->onList = 0;
 		    tsdPtr->pollState = 0;
 		}
-#ifdef __CYGWIN__
+#if 0
 		PostMessageW(tsdPtr->hwnd, 1024, 0, 0);
 #else /* __CYGWIN__ */
 		pthread_cond_broadcast(&tsdPtr->waitCV);
@@ -1453,7 +1453,7 @@ AtForkChild(void)
 	     * The tsdPtr from before the fork is copied as well.  But since
 	     * we are paranoic, we don't trust its condvar and reset it.
 	     */
-#ifdef __CYGWIN__
+#if 0
 	    DestroyWindow(tsdPtr->hwnd);
 	    tsdPtr->hwnd = CreateWindowExW(NULL, NotfyClassName,
 		    NotfyClassName, 0, 0, 0, 0, 0, NULL, NULL,
--- origsrc/tcl8.6.6/unix/tclUnixPort.h	2016-02-25 14:12:38.000000000 -0600
+++ src/tcl8.6.6/unix/tclUnixPort.h	2017-03-04 22:52:05.181228400 -0600
@@ -74,7 +74,7 @@ typedef off_t		Tcl_SeekOffset;
 #   define TclOSopen		open
 #endif
 
-#ifdef __CYGWIN__
+#if 0
 
     /* Make some symbols available without including <windows.h> */
 #   define DWORD unsigned int
