diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-05-24 19:36:46 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-05-24 19:36:46 (GMT) |
| commit | a754b12b12636d7b8b25e7b64abf37c73be98ad0 (patch) | |
| tree | 565a980082b13eae54ba529ee706df019e712f5b /generic/tclStubInit.c | |
| parent | f72644ef9557f5f17f98c7077f7b46b770594191 (diff) | |
| parent | bd79a80607129304c422a95d8584494107c7ed81 (diff) | |
| download | tcl-a754b12b12636d7b8b25e7b64abf37c73be98ad0.zip tcl-a754b12b12636d7b8b25e7b64abf37c73be98ad0.tar.gz tcl-a754b12b12636d7b8b25e7b64abf37c73be98ad0.tar.bz2 | |
Take cygwin handling of X11 into account
Implement TclpIsAtty, Cygwin only
doc/dde.n: doc fix
Diffstat (limited to 'generic/tclStubInit.c')
| -rw-r--r-- | generic/tclStubInit.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 418e42f..a47a7a4 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -78,7 +78,9 @@ MODULE_SCOPE TclTomMathStubs tclTomMathStubs; #ifdef __WIN32__ # define TclUnixWaitForFile 0 # define TclpReaddir 0 +# define TclpIsAtty 0 #elif defined(__CYGWIN__) +# define TclpIsAtty TclPlatIsAtty # define TclWinSetInterfaces (void (*) (int)) doNothing # define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing # define TclWinFlushDirtyChannels doNothing @@ -87,6 +89,12 @@ MODULE_SCOPE TclTomMathStubs tclTomMathStubs; static Tcl_Encoding winTCharEncoding; +static int +TclpIsAtty(int fd) +{ + return isatty(fd); +} + int TclWinGetPlatformId() { @@ -451,7 +459,7 @@ TclIntStubs tclIntStubs = { TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, -#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ +#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_TCL) /* UNIX */ TclGetAndDetachPids, /* 0 */ TclpCloseFile, /* 1 */ TclpCreateCommandChannel, /* 2 */ @@ -500,7 +508,7 @@ TclIntPlatStubs tclIntPlatStubs = { TclpCreateCommandChannel, /* 13 */ TclpCreatePipe, /* 14 */ TclpCreateProcess, /* 15 */ - NULL, /* 16 */ + TclpIsAtty, /* 16 */ NULL, /* 17 */ TclpMakeFile, /* 18 */ TclpOpenFile, /* 19 */ @@ -649,19 +657,19 @@ TclStubs tclStubs = { Tcl_DbCkalloc, /* 6 */ Tcl_DbCkfree, /* 7 */ Tcl_DbCkrealloc, /* 8 */ -#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ Tcl_CreateFileHandler, /* 9 */ #endif /* UNIX */ -#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ +#if defined(__WIN32__) /* WIN */ NULL, /* 9 */ #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ Tcl_CreateFileHandler, /* 9 */ #endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ Tcl_DeleteFileHandler, /* 10 */ #endif /* UNIX */ -#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ +#if defined(__WIN32__) /* WIN */ NULL, /* 10 */ #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ @@ -823,10 +831,10 @@ TclStubs tclStubs = { Tcl_GetMaster, /* 164 */ Tcl_GetNameOfExecutable, /* 165 */ Tcl_GetObjResult, /* 166 */ -#if !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */ +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ Tcl_GetOpenFile, /* 167 */ #endif /* UNIX */ -#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ +#if defined(__WIN32__) /* WIN */ NULL, /* 167 */ #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ |
