Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-11-27
09:34 • Closed ticket [561301ffff]: #define layering in tclWinSock.c plus 7 other ch... artifact: 66db8e8be5 user: davygrvy
2002-06-11
05:12 • Ticket [561301ffff]: 4 changes artifact: 97f0ba8462 user: davygrvy
2002-05-28
07:27 • Ticket [561301ffff]: 4 changes artifact: 201d702234 user: davygrvy
07:27 • Add attachment patch.txt to ticket [561301ffff] artifact: af2356cbde user: davygrvy
00:27 • New ticket [561301ffff] #define layering in tclWinSock.c. artifact: 033d27c1d8 user: davygrvy

#define layering in tclWinSock.c

Closed / Fixed561301ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 24 years ago
Descriptionplain2002-05-28 00:27:06
win/tclWinPort.h sets the following defines:

/*
 * The following defines map from standard socket 
names to our internal
 * wrappers that redirect through the winSock function 
table (see the
 * file tclWinSock.c).
 */

#define getservbynameTclWinGetServByName
#define getsockoptTclWinGetSockOpt
#define ntohsTclWinNToHS
#define setsockoptTclWinSetSockOpt


These are not undefined when building tclWinSock.c, so 
the winSock function table (internally) has 
winSock.TclWinNToHS for what should be 
winSock.ntohs as the symbol name.  This isn't causing 
any confusion as TclWinNToHS() calls 
winSock.TclWinNToHS, but isn't a good way of doing 
things and isn't what was meant to happen.

Reminds me of the #define panic in tcl.h that causes 
problems in Berkeley DB as it uses panic in a structure 
name, and has caused a whole mess of problems for 
me in the past.
davygrvyplain2002-05-28 07:27:06
File Added - 23847: patch.txt
davygrvyplain2002-06-11 05:12:42
Logged In: YES 
user_id=7549

PS. yet *another* reason to get TclSockMinimumBuffers out 
of tclIOSock.c and into a native source file like tclWinSock.c

Why wrap in convoluded #defines what should be done with 
platform specific code?  At least there, the SOCKET != int 
issue under win64 can be handled gracefully.
davygrvyplain2002-11-27 09:34:23
Logged In: YES 
user_id=7549

added to HEAD.
Log in (anonymous is fine) to add a comment.

Attachments: