diff options
author | max <max@tclers.tk> | 2014-02-28 11:05:35 (GMT) |
---|---|---|
committer | max <max@tclers.tk> | 2014-02-28 11:05:35 (GMT) |
commit | 4dd180a450af9fce8d8128ebc37dfe3aa3932c6e (patch) | |
tree | a82af5561cacf4f6a6214fe11faa0bbc675e47f6 | |
parent | 67ca0cb05fe3153db733521fbff66e5ba180358c (diff) | |
download | tcl-4dd180a450af9fce8d8128ebc37dfe3aa3932c6e.zip tcl-4dd180a450af9fce8d8128ebc37dfe3aa3932c6e.tar.gz tcl-4dd180a450af9fce8d8128ebc37dfe3aa3932c6e.tar.bz2 |
Make printf debugging switchable, because it affects 'make test'
-rw-r--r-- | win/tclWinSock.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 6afa094..905297e 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -47,7 +47,8 @@ #include "tclWinInt.h" -#if 1 +//#define DEBUGGING +#ifdef DEBUGGING #define DEBUG(x) fprintf(stderr, ">>> %s(%d): %s<<<\n", __FUNCTION__, __LINE__, x) #else #define DEBUG(x) @@ -284,7 +285,9 @@ void printaddrinfo(struct addrinfo *ai, char *prefix) host, sizeof(host), port, sizeof(port), NI_NUMERICHOST|NI_NUMERICSERV); +#ifdef DEBUGGING fprintf(stderr,"%s: [%s]:%s\n", prefix, host, port); +#endif } void printaddrinfolist(struct addrinfo *addrlist, char *prefix) { @@ -1250,7 +1253,9 @@ CreateClientSocket( DWORD error = (DWORD) WSAGetLastError(); DEBUG("connect()"); +#ifdef DEBUGGING // fprintf(stderr,"error = %lu\n", error); +#endif if (error == WSAEWOULDBLOCK) { ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey); DEBUG("WSAEWOULDBLOCK"); @@ -1268,7 +1273,9 @@ CreateClientSocket( } reenter: DEBUG("reenter"); +#ifdef DEBUGGING fprintf(stderr, "lastError: %d\n", infoPtr->lastError); +#endif /* * The connection is progressing in the background. */ |