diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-16 14:12:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-16 14:12:19 (GMT) |
commit | 213fb16f796e25f0c88151bdc79930aa44058d59 (patch) | |
tree | 639d07ad4bf1882f504f3b97ed94406b9b78e0bf | |
parent | ba983af978b8a50b61dd8dbebf32bdeed71a9837 (diff) | |
parent | 79c0ebdad2faa35f18303ba802eba9897e04e144 (diff) | |
download | tcl-213fb16f796e25f0c88151bdc79930aa44058d59.zip tcl-213fb16f796e25f0c88151bdc79930aa44058d59.tar.gz tcl-213fb16f796e25f0c88151bdc79930aa44058d59.tar.bz2 |
Fix compiler warnings in win32/cygwin build
-rw-r--r-- | generic/tclIntPlatDecls.h | 2 | ||||
-rw-r--r-- | generic/tclStubInit.c | 18 |
2 files changed, 14 insertions, 6 deletions
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index eb02bb7..ac06787 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -550,7 +550,7 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr; #undef TclpInetNtoa #define TclpInetNtoa inet_ntoa -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) # undef TclWinNToHS # undef TclWinGetServByName # undef TclWinGetSockOpt diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 097269f..7a84cba 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -44,6 +44,9 @@ #define TclBackgroundException Tcl_BackgroundException #undef Tcl_SetIntObj #undef TclpInetNtoa +#undef TclWinGetServByName +#undef TclWinGetSockOpt +#undef TclWinSetSockOpt /* See bug 510001: TclSockMinimumBuffers needs plat imp */ #ifdef _WIN64 @@ -111,7 +114,8 @@ TclpIsAtty(int fd) return isatty(fd); } -int +#define TclWinGetPlatformId winGetPlatformId +static int TclWinGetPlatformId() { /* Don't bother to determine the real platform on cygwin, @@ -127,27 +131,31 @@ void *TclWinGetTclInstance() return hInstance; } -int +#define TclWinSetSockOpt winSetSockOpt +static int TclWinSetSockOpt(SOCKET s, int level, int optname, const char *optval, int optlen) { return setsockopt((int) s, level, optname, optval, optlen); } -int +#define TclWinGetSockOpt winGetSockOpt +static int TclWinGetSockOpt(SOCKET s, int level, int optname, char *optval, int *optlen) { return getsockopt((int) s, level, optname, optval, optlen); } -struct servent * +#define TclWinGetServByName winGetServByName +static struct servent * TclWinGetServByName(const char *name, const char *proto) { return getservbyname(name, proto); } -char * +#define TclWinNoBackslash winNoBackslash +static char * TclWinNoBackslash(char *path) { char *p; |