diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-22 21:34:27 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-22 21:34:27 (GMT) |
commit | 6efd3e5fb18780e9e765151e807ed04c34293aa6 (patch) | |
tree | a0689274b7976a41688599a7ac390b3ea85b3966 /generic/tclStubInit.c | |
parent | 90b55a0053849e5a6c0483f716de14cb4639ce08 (diff) | |
download | tcl-6efd3e5fb18780e9e765151e807ed04c34293aa6.zip tcl-6efd3e5fb18780e9e765151e807ed04c34293aa6.tar.gz tcl-6efd3e5fb18780e9e765151e807ed04c34293aa6.tar.bz2 |
add TclWinConvertError and TclWinConvertWSAError for cygwin
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r-- | generic/tclStubInit.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 9ca1750..b363f24 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -68,9 +68,9 @@ Tcl_NotifierProcs tclOriginalNotifier = { #define TclWinAddProcess winAddProcess #define TclpGetTZName pGetTZName #define TclWinNoBackslash winNoBackslash -#define TclWinSetInterfaces winSetInterfaces -#define TclWinFlushDirtyChannels winFlushDirtyChannels -#define TclWinResetInterfaces winResetInterfaces +#define TclWinSetInterfaces (void (*) _ANSI_ARGS_((int))) doNothing +#define TclWinFlushDirtyChannels doNothing +#define TclWinResetInterfaces doNothing static Tcl_Encoding winTCharEncoding; @@ -84,60 +84,55 @@ TclWinGetPlatformId() static int TclWinGetTclInstance() { - /* TODO: implementation */ + Tcl_Panic("TclWinGetTclInstance not yet implemented for CYGWIN"); return 0; } static unsigned short TclWinNToHS(unsigned short ns) { - /* TODO: implementation */ + Tcl_Panic("TclWinNToHS not yet implemented for CYGWIN"); return (unsigned short) -1; } static int TclWinSetSockOpt(int s, int level, int optname, const char *optval, int optlen) { - /* TODO: implementation */ + Tcl_Panic("TclWinSetSockOpt not yet implemented for CYGWIN"); return -1; } static void TclWinAddProcess(void *hProcess, unsigned long id) { - /* TODO: implementation */ + Tcl_Panic("TclWinAddProcess not yet implemented for CYGWIN"); } static char * TclpGetTZName(int isdst) { /* TODO: implementation */ + Tcl_Panic("TclpGetTZName not yet implemented for CYGWIN"); return 0; } static char * TclWinNoBackslash(char *path) { - /* TODO: implementation */ - return 0; -} + char *p; -static void -TclWinSetInterfaces(int wide) -{ - /* TODO: implementation */ -} - -static void -TclWinFlushDirtyChannels(void) -{ - /* TODO: implementation */ + for (p = path; *p != '\0'; p++) { + if (*p == '\\') { + *p = '/'; + } + } + return path; } static void -TclWinResetInterfaces(void) +doNothing(void) { - /* TODO: implementation */ + /* dummy implementation, no need to do anything */ } static char * @@ -177,6 +172,8 @@ Tcl_WinTCharToUtf( #define TclMacOSXNotifierAddRunLoopMode (void (*) _ANSI_ARGS_((CONST void *))) TclpOpenFile #elif !defined(__WIN32__) /* UNIX and MAC */ +# define TclWinConvertError (void (*) _ANSI_ARGS_((unsigned int))) TclGetAndDetachPids +# define TclWinConvertWSAError (void (*) _ANSI_ARGS_((unsigned int))) TclpCloseFile # define TclWinGetPlatformId (int (*)()) TclpCreateTempFile # define TclWinGetTclInstance (int (*)()) TclpCreateProcess # define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile @@ -437,8 +434,8 @@ TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ TclpCreateCommandChannel, /* 2 */ TclpCreatePipe, /* 3 */ TclWinGetTclInstance, /* 4 */ @@ -467,6 +464,8 @@ TclIntPlatStubs tclIntPlatStubs = { TclWinFlushDirtyChannels, /* 27 */ TclWinResetInterfaces, /* 28 */ TclWinCPUID, /* 29 */ + TclGetAndDetachPids, /* 30 */ + TclpCloseFile, /* 31 */ #endif /* UNIX */ #ifdef __WIN32__ TclWinConvertError, /* 0 */ |