Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | implement TclWinGetSockOpt and TclWinGetServByName for cygwi (should work, but not yet tested on UNIX) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | bug-3508771 |
Files: | files | file ages | folders |
SHA1: |
6d0fea34a0b8cc30fdee8947ac76c197 |
User & Date: | jan.nijtmans 2012-04-24 12:55:42 |
Context
2012-04-24
| ||
13:10 | oops, wrong signature Closed-Leaf check-in: af92e19f2c user: jan.nijtmans tags: bug-3508771 | |
12:55 | implement TclWinGetSockOpt and TclWinGetServByName for cygwi (should work, but not yet tested on UNI... check-in: 6d0fea34a0 user: jan.nijtmans tags: bug-3508771 | |
08:34 | merge trunk check-in: 38c53e8aac user: jan.nijtmans tags: bug-3508771 | |
Changes
Changes to generic/tclInt.decls.
︙ | ︙ | |||
949 950 951 952 953 954 955 956 | declare 0 unix { void TclWinConvertError(unsigned int errCode) } # On non-cygwin, this is actually a reference to TclpCloseFile declare 1 unix { void TclWinConvertWSAError(unsigned int errCode) } declare 2 unix { | > < | > | > | 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 | declare 0 unix { void TclWinConvertError(unsigned int errCode) } # On non-cygwin, this is actually a reference to TclpCloseFile declare 1 unix { void TclWinConvertWSAError(unsigned int errCode) } # On non-cygwin, this is actually a reference to TclpCreateCommandChannel declare 2 unix { struct servent *TclWinGetServByName(const char *nm, const char *proto) } # On non-cygwin, this is actually a reference to TclpCreatePipe declare 3 unix { int TclWinGetSockOpt(void *s, int level, int optname, char *optval, int *optlen) } # On non-cygwin, this is actually a reference to TclpCreateProcess declare 4 unix { void *TclWinGetTclInstance(void) } # Signature changed in 8.1: # declare 5 unix { |
︙ | ︙ | |||
1001 1002 1003 1004 1005 1006 1007 1008 | declare 11 unix { struct tm *TclpLocaltime_unix(TclpTime_t_CONST clock) } # On cygwin, this is actually a reference to TclpCloseFile declare 12 unix { struct tm *TclpGmtime_unix(TclpTime_t_CONST clock) } declare 13 unix { | > > < > | 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 | declare 11 unix { struct tm *TclpLocaltime_unix(TclpTime_t_CONST clock) } # On cygwin, this is actually a reference to TclpCloseFile declare 12 unix { struct tm *TclpGmtime_unix(TclpTime_t_CONST clock) } # On cygwin, this is a reference to TclpCreateCommandChannel # Otherwise, this is a reference to TclpInetNtoa declare 13 unix { void TclIntPlatReserved13(void) } #On cygwin, TclpCreateProcess is here declare 15 unix { int TclMacOSXGetFileAttribute(Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr) } #On cygwin, TclpMakeFile is here |
︙ | ︙ | |||
1046 1047 1048 1049 1050 1051 1052 | } declare 30 unix { void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan) } declare 31 unix { int TclpCloseFile(TclFile file) } | | | | < > | | < > | | | < > | | | 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 | } declare 30 unix { void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan) } declare 31 unix { int TclpCloseFile(TclFile file) } declare 32 unix { Tcl_Channel TclpCreateCommandChannel(TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr) } declare 33 unix { int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) } declare 34 unix { int TclpCreateProcess(Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr) } declare 35 unix { char *TclpInetNtoa(struct in_addr addr) } declare 36 unix { TclFile TclpMakeFile(Tcl_Channel channel, int direction) } declare 37 unix { TclFile TclpOpenFile(const char *fname, int mode) } declare 38 unix { int TclUnixWaitForFile(int fd, int mask, int timeout) } # Local Variables: # mode: tcl # End: |
Changes to generic/tclIntPlatDecls.h.
︙ | ︙ | |||
28 29 30 31 32 33 34 | #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ /* 0 */ EXTERN void TclWinConvertError _ANSI_ARGS_((unsigned int errCode)); /* 1 */ EXTERN void TclWinConvertWSAError _ANSI_ARGS_(( unsigned int errCode)); /* 2 */ | | < < | | < > | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ /* 0 */ EXTERN void TclWinConvertError _ANSI_ARGS_((unsigned int errCode)); /* 1 */ EXTERN void TclWinConvertWSAError _ANSI_ARGS_(( unsigned int errCode)); /* 2 */ EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char *nm, CONST char *proto)); /* 3 */ EXTERN int TclWinGetSockOpt _ANSI_ARGS_((VOID *s, int level, int optname, char *optval, int *optlen)); /* 4 */ EXTERN VOID * TclWinGetTclInstance _ANSI_ARGS_((void)); /* Slot 5 is reserved */ /* 6 */ EXTERN unsigned short TclWinNToHS _ANSI_ARGS_((unsigned short ns)); /* 7 */ EXTERN int TclWinSetSockOpt _ANSI_ARGS_((VOID *s, int level, int optname, CONST char *optval, int optlen)); /* 8 */ EXTERN int TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); /* 9 */ EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* 10 */ EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR *dir)); /* 11 */ EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_(( TclpTime_t_CONST clock)); /* 12 */ EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 13 */ EXTERN void TclIntPlatReserved13 _ANSI_ARGS_((void)); /* Slot 14 is reserved */ /* 15 */ EXTERN int TclMacOSXGetFileAttribute _ANSI_ARGS_(( Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)); /* Slot 16 is reserved */ /* Slot 17 is reserved */ |
︙ | ︙ | |||
95 96 97 98 99 100 101 | EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 30 */ EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 31 */ EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); | | > > > > | > > | > | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 30 */ EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 31 */ EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); /* 32 */ EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_(( TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)); /* 33 */ EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe, TclFile *writePipe)); /* 34 */ EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); /* 35 */ EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr)); /* 36 */ EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 37 */ EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char *fname, int mode)); /* 38 */ |
︙ | ︙ | |||
263 264 265 266 267 268 269 | typedef struct TclIntPlatStubs { int magic; struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ void (*tclWinConvertError) _ANSI_ARGS_((unsigned int errCode)); /* 0 */ void (*tclWinConvertWSAError) _ANSI_ARGS_((unsigned int errCode)); /* 1 */ | | | | | | | | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | typedef struct TclIntPlatStubs { int magic; struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ void (*tclWinConvertError) _ANSI_ARGS_((unsigned int errCode)); /* 0 */ void (*tclWinConvertWSAError) _ANSI_ARGS_((unsigned int errCode)); /* 1 */ struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char *nm, CONST char *proto)); /* 2 */ int (*tclWinGetSockOpt) _ANSI_ARGS_((VOID *s, int level, int optname, char *optval, int *optlen)); /* 3 */ VOID * (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */ VOID *reserved5; unsigned short (*tclWinNToHS) _ANSI_ARGS_((unsigned short ns)); /* 6 */ int (*tclWinSetSockOpt) _ANSI_ARGS_((VOID *s, int level, int optname, CONST char *optval, int optlen)); /* 7 */ int (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */ int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */ Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR *dir)); /* 10 */ struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 11 */ struct tm * (*tclpGmtime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 12 */ void (*tclIntPlatReserved13) _ANSI_ARGS_((void)); /* 13 */ VOID *reserved14; int (*tclMacOSXGetFileAttribute) _ANSI_ARGS_((Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)); /* 15 */ VOID *reserved16; VOID *reserved17; int (*tclMacOSXMatchType) _ANSI_ARGS_((Tcl_Interp *interp, CONST char *pathName, CONST char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types)); /* 18 */ void (*tclMacOSXNotifierAddRunLoopMode) _ANSI_ARGS_((CONST VOID *runLoopMode)); /* 19 */ void (*tclWinAddProcess) _ANSI_ARGS_((VOID *hProcess, unsigned int id)); /* 20 */ VOID *reserved21; TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char *contents)); /* 22 */ VOID *reserved23; char * (*tclWinNoBackslash) _ANSI_ARGS_((char *path)); /* 24 */ VOID *reserved25; void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */ void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */ void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */ int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 29 */ void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 30 */ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 31 */ Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)); /* 32 */ int (*tclpCreatePipe) _ANSI_ARGS_((TclFile *readPipe, TclFile *writePipe)); /* 33 */ int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); /* 34 */ char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr)); /* 35 */ TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 36 */ TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char *fname, int mode)); /* 37 */ int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 38 */ #endif /* UNIX */ #ifdef __WIN32__ void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */ void (*tclWinConvertWSAError) _ANSI_ARGS_((DWORD errCode)); /* 1 */ |
︙ | ︙ | |||
387 388 389 390 391 392 393 | #define TclWinConvertError \ (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ #endif #ifndef TclWinConvertWSAError #define TclWinConvertWSAError \ (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ #endif | | | | | | | | 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | #define TclWinConvertError \ (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ #endif #ifndef TclWinConvertWSAError #define TclWinConvertWSAError \ (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ #endif #ifndef TclWinGetServByName #define TclWinGetServByName \ (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */ #endif #ifndef TclWinGetSockOpt #define TclWinGetSockOpt \ (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */ #endif #ifndef TclWinGetTclInstance #define TclWinGetTclInstance \ (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */ #endif /* Slot 5 is reserved */ #ifndef TclWinNToHS |
︙ | ︙ | |||
428 429 430 431 432 433 434 | #define TclpLocaltime_unix \ (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ #endif #ifndef TclpGmtime_unix #define TclpGmtime_unix \ (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ #endif | | | | | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | #define TclpLocaltime_unix \ (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ #endif #ifndef TclpGmtime_unix #define TclpGmtime_unix \ (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ #endif #ifndef TclIntPlatReserved13 #define TclIntPlatReserved13 \ (tclIntPlatStubsPtr->tclIntPlatReserved13) /* 13 */ #endif /* Slot 14 is reserved */ #ifndef TclMacOSXGetFileAttribute #define TclMacOSXGetFileAttribute \ (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */ #endif /* Slot 16 is reserved */ |
︙ | ︙ | |||
486 487 488 489 490 491 492 | #define TclGetAndDetachPids \ (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 30 */ #endif #ifndef TclpCloseFile #define TclpCloseFile \ (tclIntPlatStubsPtr->tclpCloseFile) /* 31 */ #endif | | | > > > > > > | > > > | 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | #define TclGetAndDetachPids \ (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 30 */ #endif #ifndef TclpCloseFile #define TclpCloseFile \ (tclIntPlatStubsPtr->tclpCloseFile) /* 31 */ #endif #ifndef TclpCreateCommandChannel #define TclpCreateCommandChannel \ (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 32 */ #endif #ifndef TclpCreatePipe #define TclpCreatePipe \ (tclIntPlatStubsPtr->tclpCreatePipe) /* 33 */ #endif #ifndef TclpCreateProcess #define TclpCreateProcess \ (tclIntPlatStubsPtr->tclpCreateProcess) /* 34 */ #endif #ifndef TclpInetNtoa #define TclpInetNtoa \ (tclIntPlatStubsPtr->tclpInetNtoa) /* 35 */ #endif #ifndef TclpMakeFile #define TclpMakeFile \ (tclIntPlatStubsPtr->tclpMakeFile) /* 36 */ #endif #ifndef TclpOpenFile #define TclpOpenFile \ (tclIntPlatStubsPtr->tclpOpenFile) /* 37 */ |
︙ | ︙ | |||
730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ /* !END!: Do not edit above this line. */ #undef TclpLocaltime_unix #undef TclpGmtime_unix #if !defined(__WIN32__) && !defined(MAC_TCL) # undef TclpGetPid # define TclpGetPid(pid) ((unsigned long) (pid)) # if defined(USE_TCL_STUBS) # undef TclpCreateProcess # undef TclpMakeFile # undef TclpOpenFile # 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))) \ | > > > > | > > > > > > > > > > > | 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ /* !END!: Do not edit above this line. */ #undef TclpLocaltime_unix #undef TclpGmtime_unix #undef TclIntPlatReserved13 #if !defined(__WIN32__) && !defined(MAC_TCL) # undef TclpGetPid # define TclpGetPid(pid) ((unsigned long) (pid)) # if defined(USE_TCL_STUBS) # undef TclpCreateProcess # undef TclpMakeFile # undef TclpOpenFile # undef TclpCreateCommandChannel # 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) # define TclpCreateCommandChannel ((Tcl_Channel (*) _ANSI_ARGS_((TclFile, TclFile, \ TclFile, int, Tcl_Pid *))) tclIntPlatStubsPtr->tclIntPlatReserved13) # 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->tclWinSetSockOpt) # define TclpCreateCommandChannel ((Tcl_Channel (*) _ANSI_ARGS_((TclFile, TclFile, \ TclFile, int, Tcl_Pid *))) tclIntPlatStubsPtr->tclWinGetServByName) # undef TclpCreateTempFile # undef TclGetAndDetachPids # undef TclpCloseFile # undef TclpCreatePipe # undef TclpInetNtoa # undef TclUnixWaitForFile # 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) # define TclpCreatePipe ((int (*)_ANSI_ARGS_((TclFile *, TclFile *))) \ tclIntPlatStubsPtr->tclWinGetSockOpt) # define TclpInetNtoa ((char *(*) _ANSI_ARGS_((struct in_addr addr))) \ tclIntPlatStubsPtr->tclIntPlatReserved13) # define TclUnixWaitForFile (int (*) _ANSI_ARGS_((int, int, int))) \ tclIntPlatStubsPtr->tclpGetPid) # endif # endif #endif #endif /* _TCLINTPLATDECLS */ |
Changes to generic/tclStubInit.c.
︙ | ︙ | |||
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | #define TclWinGetPlatformId winGetPlatformId #define Tcl_WinUtfToTChar winUtfToTChar #define Tcl_WinTCharToUtf winTCharToUtf #define TclWinGetTclInstance winGetTclInstance #define TclWinNToHS winNToHS #define TclWinSetSockOpt winSetSockOpt #define TclWinNoBackslash winNoBackslash #define TclWinSetInterfaces (void (*) (int)) doNothing #define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing #define TclWinFlushDirtyChannels doNothing #define TclWinResetInterfaces doNothing #define TclpGetPid getPid static Tcl_Encoding winTCharEncoding; static int | > > > | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | #define TclWinGetPlatformId winGetPlatformId #define Tcl_WinUtfToTChar winUtfToTChar #define Tcl_WinTCharToUtf winTCharToUtf #define TclWinGetTclInstance winGetTclInstance #define TclWinNToHS winNToHS #define TclWinSetSockOpt winSetSockOpt #define TclWinGetSockOpt winGetSockOpt #define TclWinGetServByName winGetServByName #define TclWinNoBackslash winNoBackslash #define TclWinSetInterfaces (void (*) (int)) doNothing #define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing #define TclIntPlatReserved13 (void (*) ()) TclpCreateCommandChannel #define TclWinFlushDirtyChannels doNothing #define TclWinResetInterfaces doNothing #define TclpGetPid getPid static Tcl_Encoding winTCharEncoding; static int |
︙ | ︙ | |||
115 116 117 118 119 120 121 122 123 124 125 126 127 128 | static int TclWinSetSockOpt(void *s, int level, int optname, const char *optval, int optlen) { return setsockopt((int) s, level, optname, optval, optlen); } static char * TclWinNoBackslash(char *path) { char *p; for (p = path; *p != '\0'; p++) { | > > > > > > > > > > > > > | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | static int TclWinSetSockOpt(void *s, int level, int optname, const char *optval, int optlen) { return setsockopt((int) s, level, optname, optval, optlen); } static int TclWinGetSockOpt(void *s, int level, int optname, char *optval, int optlen) { return getsockopt((int) s, level, optname, optval, optlen); } struct servent * TclWinGetServByName(const char *name, const char *proto) { return getservbyname(name, proto); } static char * TclWinNoBackslash(char *path) { char *p; for (p = path; *p != '\0'; p++) { |
︙ | ︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 199 | #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 (void *(*)()) TclpCreateProcess # define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile # define TclWinSetSockOpt (int (*) _ANSI_ARGS_((void *, int, int, CONST char *, int))) TclpOpenFile # define TclWinAddProcess 0 # define TclWinNoBackslash 0 # define TclWinSetInterfaces 0 # define TclWinFlushDirtyChannels 0 # define TclWinResetInterfaces 0 # define TclpGetPid 0 # define TclMacOSXGetFileAttribute 0 /* Only implemented in Tcl >= 8.5 */ | > > > | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | #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 (void *(*)()) TclpCreateProcess # define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile # define TclWinSetSockOpt (int (*) _ANSI_ARGS_((void *, int, int, CONST char *, int))) TclpOpenFile # define TclWinGetSockOpt (int (*) _ANSI_ARGS_((void *, int, int, char *, int))) TclpCreatePipe # define TclWinGetServByName (struct servent *(*) _ANSI_ARGS_((const char *nm, const char *proto))) TclpCreateCommandChannel # define TclIntPlatReserved13 (void (*) ()) TclpInetNtoa # define TclWinAddProcess 0 # define TclWinNoBackslash 0 # define TclWinSetInterfaces 0 # define TclWinFlushDirtyChannels 0 # define TclWinResetInterfaces 0 # define TclpGetPid 0 # define TclMacOSXGetFileAttribute 0 /* Only implemented in Tcl >= 8.5 */ |
︙ | ︙ | |||
454 455 456 457 458 459 460 | TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ TclWinConvertError, /* 0 */ TclWinConvertWSAError, /* 1 */ | | | | | | | | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ TclWinConvertError, /* 0 */ TclWinConvertWSAError, /* 1 */ TclWinGetServByName, /* 2 */ TclWinGetSockOpt, /* 3 */ TclWinGetTclInstance, /* 4 */ NULL, /* 5 */ TclWinNToHS, /* 6 */ TclWinSetSockOpt, /* 7 */ TclpGetPid, /* 8 */ TclWinGetPlatformId, /* 9 */ TclpReaddir, /* 10 */ TclpLocaltime_unix, /* 11 */ TclpGmtime_unix, /* 12 */ TclIntPlatReserved13, /* 13 */ NULL, /* 14 */ TclMacOSXGetFileAttribute, /* 15 */ NULL, /* 16 */ NULL, /* 17 */ TclMacOSXMatchType, /* 18 */ TclMacOSXNotifierAddRunLoopMode, /* 19 */ TclWinAddProcess, /* 20 */ NULL, /* 21 */ TclpCreateTempFile, /* 22 */ NULL, /* 23 */ TclWinNoBackslash, /* 24 */ NULL, /* 25 */ TclWinSetInterfaces, /* 26 */ TclWinFlushDirtyChannels, /* 27 */ TclWinResetInterfaces, /* 28 */ TclWinCPUID, /* 29 */ TclGetAndDetachPids, /* 30 */ TclpCloseFile, /* 31 */ TclpCreateCommandChannel, /* 32 */ TclpCreatePipe, /* 33 */ TclpCreateProcess, /* 34 */ TclpInetNtoa, /* 35 */ TclpMakeFile, /* 36 */ TclpOpenFile, /* 37 */ TclUnixWaitForFile, /* 38 */ #endif /* UNIX */ #ifdef __WIN32__ TclWinConvertError, /* 0 */ TclWinConvertWSAError, /* 1 */ |
︙ | ︙ |
Changes to unix/tclUnixPort.h.
︙ | ︙ | |||
694 695 696 697 698 699 700 | EXTERN Tcl_DirEntry * TclpReaddir(DIR *); #ifndef TclpLocaltime EXTERN struct tm * TclpLocaltime(TclpTime_t_CONST); #endif #ifndef TclpGmtime EXTERN struct tm * TclpGmtime(TclpTime_t_CONST); #endif | < | 694 695 696 697 698 699 700 701 702 703 704 705 706 707 | EXTERN Tcl_DirEntry * TclpReaddir(DIR *); #ifndef TclpLocaltime EXTERN struct tm * TclpLocaltime(TclpTime_t_CONST); #endif #ifndef TclpGmtime EXTERN struct tm * TclpGmtime(TclpTime_t_CONST); #endif #define inet_ntoa(x) TclpInetNtoa(x) #else typedef int TclpMutex; #define TclpMutexInit(a) #define TclpMutexLock(a) #define TclpMutexUnlock(a) #endif /* TCL_THREADS */ |
︙ | ︙ |