From 6edbdf3817936bfb8f515d5f8c89088d686a926a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 26 Mar 2012 07:20:37 +0000 Subject: forgot 3 stub macros for cygwin: TclpCreateProcess, TclpMakefile and TclpOpenFile --- generic/tclIntPlatDecls.h | 49 ++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 297895f..b46b859 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -709,26 +709,35 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #undef TclpLocaltime_unix #undef TclpGmtime_unix -#if !defined(__WIN32__) && !defined(MAC_TCL) && !defined(__CYGWIN__) && defined(USE_TCL_STUBS) -#undef TclpCreateTempFile -#define TclpCreateTempFile ((TclFile (*) _ANSI_ARGS_((CONST char *))) \ - tclIntPlatStubsPtr->tclWinGetPlatformId) -#undef TclpCreateProcess -#define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ - CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ - tclIntPlatStubsPtr->tclWinGetTclInstance) -#undef TclpMakeFile -#define TclpMakeFile ((TclFile (*) _ANSI_ARGS_((Tcl_Channel channel, \ - int direction))) tclIntPlatStubsPtr->tclWinNToHS) -#undef TclpOpenFile -#define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ - tclIntPlatStubsPtr->tclWinNToHS) -#undef TclGetAndDetachPids -#define TclGetAndDetachPids ((void (*) _ANSI_ARGS_((Tcl_Interp *, Tcl_Channel))) \ - tclIntPlatStubsPtr->tclWinConvertError) -#undef TclpCloseFile -#define TclpCloseFile ((int (*) _ANSI_ARGS_((TclFile))) \ - tclIntPlatStubsPtr->tclWinConvertWSAError) +#if !defined(__WIN32__) && !defined(MAC_TCL) && defined(USE_TCL_STUBS) +# ifdef __CYGWIN__ +# define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ + CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ + tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) +# define TclpMakeFile ((TclFile (*) _ANSI_ARGS_((Tcl_Channel channel, \ + int direction))) tclIntPlatStubsPtr->tclMacOSXMatchType) +# define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ + tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) +# else +# define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ + CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ + tclIntPlatStubsPtr->tclWinGetTclInstance) +# define TclpMakeFile ((TclFile (*) _ANSI_ARGS_((Tcl_Channel channel, \ + int direction))) tclIntPlatStubsPtr->tclWinNToHS) +# define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ + tclIntPlatStubsPtr->tclWinNToHS) + +# undef TclpCreateTempFile +# undef TclGetAndDetachPids +# undef TclpCloseFile + +# define TclpCreateTempFile ((TclFile (*) _ANSI_ARGS_((CONST char *))) \ + tclIntPlatStubsPtr->tclWinGetPlatformId) +# define TclGetAndDetachPids ((void (*) _ANSI_ARGS_((Tcl_Interp *, Tcl_Channel))) \ + tclIntPlatStubsPtr->tclWinConvertError) +# define TclpCloseFile ((int (*) _ANSI_ARGS_((TclFile))) \ + tclIntPlatStubsPtr->tclWinConvertWSAError) +# endif #endif #endif /* _TCLINTPLATDECLS */ -- cgit v0.12