Changeset 21916 for trunk/src/wsock32
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 8 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/wsock32/asyncapi.cpp
r21656 r21916 408 408 409 409 #ifdef DEBUG_LOGGING 410 c har *pszEvent = NULL;410 const char *pszEvent = NULL; 411 411 412 412 switch(event) { -
trunk/src/wsock32/dbglocal.cpp
r6375 r21916 19 19 USHORT DbgEnabledLvl2WSOCK32[DBG_MAXFILES] = {0}; 20 20 21 static c har*DbgFileNames[DBG_MAXFILES] =21 static const char *DbgFileNames[DBG_MAXFILES] = 22 22 { 23 23 "initterm", -
trunk/src/wsock32/new/wsock32.h
r3218 r21916 17 17 18 18 #define TCPV40HDRS 19 #include <sys \socket.h>20 #include <sys \ioctl.h>19 #include <sys/socket.h> 20 #include <sys/ioctl.h> 21 21 #include <netdb.h> 22 #include <netinet \in.h>23 #include <netinet \tcp.h>22 #include <netinet/in.h> 23 #include <netinet/tcp.h> 24 24 #include <nerrno.h> 25 #include <sys \time.h>25 #include <sys/time.h> 26 26 27 27 #include <odinwrap.h> … … 173 173 } _ws_protoent; 174 174 175 typedef struct ws_servent 175 typedef struct ws_servent 176 176 { 177 177 char * s_name; /* official service name */ -
trunk/src/wsock32/socketwrap.h
r7461 r21916 2 2 #define __SOCKETWRAP_H__ 3 3 4 #include <sys \socket.h>5 #include <sys \ioctl.h>4 #include <sys/socket.h> 5 #include <sys/ioctl.h> 6 6 #include <netdb.h> 7 #include <netinet \in.h>8 #include <netinet \tcp.h>7 #include <netinet/in.h> 8 #include <netinet/tcp.h> 9 9 #include <nerrno.h> 10 10 … … 18 18 19 19 return yyrc; 20 } 20 } 21 21 22 22 #undef accept … … 29 29 addsockettolist(a); 30 30 SetFS(sel); 31 } 31 } 32 32 33 33 #undef addsockettolist … … 43 43 44 44 return yyrc; 45 } 45 } 46 46 47 47 #undef bind … … 57 57 58 58 return yyrc; 59 } 59 } 60 60 61 61 #undef connect … … 71 71 72 72 return yyrc; 73 } 73 } 74 74 75 75 #undef gethostid … … 85 85 86 86 return yyrc; 87 } 87 } 88 88 89 89 #undef getpeername … … 99 99 100 100 return yyrc; 101 } 101 } 102 102 103 103 #undef getsockname … … 113 113 114 114 return yyrc; 115 } 115 } 116 116 117 117 #undef getsockopt 118 118 #define getsockopt _getsockopt 119 119 120 inline int _ ioctl(int a, int b, char *c, int d)121 { 122 int yyrc; 123 USHORT sel = RestoreOS2FS(); 124 125 yyrc = ioctl(a, b, c, d);126 SetFS(sel); 127 128 return yyrc; 129 } 120 inline int _os2_ioctl(int a, int b, char *c, int d) 121 { 122 int yyrc; 123 USHORT sel = RestoreOS2FS(); 124 125 yyrc = os2_ioctl(a, b, c, d); 126 SetFS(sel); 127 128 return yyrc; 129 } 130 130 131 131 #undef ioctl 132 #define ioctl _ ioctl132 #define ioctl _os2_ioctl 133 133 134 134 inline int _listen(int a, int b) … … 141 141 142 142 return yyrc; 143 } 143 } 144 144 145 145 #undef listen … … 155 155 156 156 return yyrc; 157 } 157 } 158 158 159 159 #undef recvmsg … … 169 169 170 170 return yyrc; 171 } 171 } 172 172 173 173 #undef recv … … 183 183 184 184 return yyrc; 185 } 185 } 186 186 187 187 #undef recvfrom … … 197 197 198 198 return yyrc; 199 } 199 } 200 200 201 201 #undef removesocketfromlist 202 202 #define removesocketfromlist _removesocketfromlist 203 203 204 inline int _ select(int *a, int b, int c, int d, long e)205 { 206 int yyrc; 207 USHORT sel = RestoreOS2FS(); 208 209 yyrc = select(a, b, c, d, e);210 SetFS(sel); 211 212 return yyrc; 213 } 204 inline int _os2_select(int *a, int b, int c, int d, long e) 205 { 206 int yyrc; 207 USHORT sel = RestoreOS2FS(); 208 209 yyrc = os2_select(a, b, c, d, e); 210 SetFS(sel); 211 212 return yyrc; 213 } 214 214 215 215 #undef select 216 #define select _ select216 #define select _os2_select 217 217 218 218 inline int _send(int a, char *b, int c, int d) … … 225 225 226 226 return yyrc; 227 } 227 } 228 228 229 229 #undef send … … 239 239 240 240 return yyrc; 241 } 241 } 242 242 243 243 #undef sendmsg … … 253 253 254 254 return yyrc; 255 } 255 } 256 256 257 257 #undef sendto … … 267 267 268 268 return yyrc; 269 } 269 } 270 270 271 271 #undef setsockopt … … 281 281 282 282 return yyrc; 283 } 283 } 284 284 285 285 #undef sock_init … … 295 295 296 296 return yyrc; 297 } 297 } 298 298 299 299 #undef sock_errno … … 306 306 psock_errno(a); 307 307 SetFS(sel); 308 } 308 } 309 309 310 310 #undef psock_errno … … 320 320 321 321 return yyrc; 322 } 322 } 323 323 324 324 #undef socket … … 334 334 335 335 return yyrc; 336 } 336 } 337 337 338 338 #undef soclose … … 348 348 349 349 return yyrc; 350 } 350 } 351 351 352 352 #undef so_cancel … … 362 362 363 363 return yyrc; 364 } 364 } 365 365 366 366 #undef readv … … 376 376 377 377 return yyrc; 378 } 378 } 379 379 380 380 #undef writev … … 390 390 391 391 return yyrc; 392 } 392 } 393 393 394 394 #undef shutdown … … 404 404 405 405 return yyrc; 406 } 406 } 407 407 408 408 #undef Raccept … … 418 418 419 419 return yyrc; 420 } 420 } 421 421 422 422 #undef Rbind … … 432 432 433 433 return yyrc; 434 } 434 } 435 435 436 436 #undef Rconnect … … 446 446 447 447 return yyrc; 448 } 448 } 449 449 450 450 #undef Rgetsockname … … 460 460 461 461 return yyrc; 462 } 462 } 463 463 464 464 #undef Rlisten … … 474 474 475 475 return yyrc; 476 } 476 } 477 477 478 478 #undef gethostname … … 488 488 489 489 return yyrc; 490 } 490 } 491 491 492 492 #undef gethostbyname … … 502 502 503 503 return yyrc; 504 } 504 } 505 505 506 506 #undef gethostbyaddr … … 516 516 517 517 return yyrc; 518 } 518 } 519 519 520 520 #undef getnetbyname … … 530 530 531 531 return yyrc; 532 } 532 } 533 533 534 534 #undef getnetbyaddr … … 544 544 545 545 return yyrc; 546 } 546 } 547 547 548 548 #undef getservbyname … … 558 558 559 559 return yyrc; 560 } 560 } 561 561 562 562 #undef getservbyport … … 572 572 573 573 return yyrc; 574 } 574 } 575 575 576 576 #undef getprotobyname … … 586 586 587 587 return yyrc; 588 } 588 } 589 589 590 590 #undef getprotobynumber … … 597 597 sethostent(a); 598 598 SetFS(sel); 599 } 599 } 600 600 601 601 #undef sethostent … … 611 611 612 612 return yyrc; 613 } 613 } 614 614 615 615 #undef gethostent … … 622 622 endhostent(); 623 623 SetFS(sel); 624 } 624 } 625 625 626 626 #undef endhostent … … 633 633 setnetent(a); 634 634 SetFS(sel); 635 } 635 } 636 636 637 637 #undef setnetent … … 647 647 648 648 return yyrc; 649 } 649 } 650 650 651 651 #undef getnetent … … 658 658 endnetent(); 659 659 SetFS(sel); 660 } 660 } 661 661 662 662 #undef endnetent … … 669 669 setprotoent(a); 670 670 SetFS(sel); 671 } 671 } 672 672 673 673 #undef setprotoent … … 683 683 684 684 return yyrc; 685 } 685 } 686 686 687 687 #undef getprotoent … … 694 694 endprotoent(); 695 695 SetFS(sel); 696 } 696 } 697 697 698 698 #undef endprotoent … … 705 705 setservent(a); 706 706 SetFS(sel); 707 } 707 } 708 708 709 709 #undef setservent … … 719 719 720 720 return yyrc; 721 } 721 } 722 722 723 723 #undef getservent … … 730 730 endservent(); 731 731 SetFS(sel); 732 } 732 } 733 733 734 734 #undef endservent … … 744 744 745 745 return yyrc; 746 } 746 } 747 747 748 748 #undef tcp_h_errno … … 758 758 759 759 return yyrc; 760 } 760 } 761 761 762 762 #undef Rgethostbyname -
trunk/src/wsock32/wsock32.cpp
r21456 r21916 1039 1039 //****************************************************************************** 1040 1040 //****************************************************************************** 1041 c har *debugsockopt(int optname)1041 const char *debugsockopt(int optname) 1042 1042 { 1043 1043 switch(optname) { … … 1732 1732 1733 1733 localhost_address = *(unsigned long *)&addr->sin_addr; 1734 localhost.h_name = "localhost"; /* This is what the old workaround did. */1734 localhost.h_name = (char *)"localhost"; /* This is what the old workaround did. */ 1735 1735 localhost.h_addrtype = AF_INET; 1736 1736 localhost.h_length = 4; -
trunk/src/wsock32/wsock32.def
r21308 r21916 10 10 IMPORTS 11 11 ; this is not in every so32dll.lib 12 winsockcleanupsockets = SO32DLL. WINSOCKCLEANUPSOCKETS12 winsockcleanupsockets = SO32DLL.38 ; WINSOCKCLEANUPSOCKETS 13 13 14 14 … … 19 19 ; ---------------------- 20 20 21 accept = _OS2accept@12@122 bind = _OS2bind@12@223 closesocket = _OS2closesocket@4@324 connect = _OS2connect@12@425 getpeername = _OS2getpeername@12@526 getsockname = _OS2getsockname@12@627 getsockopt = _OS2getsockopt@20@728 htonl = _OS2htonl@4@829 htons = _OS2htons@4@930 inet_addr = _OS2inet_addr@4@1031 inet_ntoa = _OS2inet_ntoa@4@1132 ioctlsocket = _OS2ioctlsocket@12@1233 listen = _OS2listen@8@1334 ntohl = _OS2ntohl@4@1435 ntohs = _OS2ntohs@4@1536 recv = _OS2recv@16@1637 recvfrom = _OS2recvfrom@24@1738 select = _OS2select@20@1839 send = _OS2send@16@1940 sendto = _OS2sendto@24@2041 setsockopt = _OS2setsockopt@20@2142 shutdown = _OS2shutdown@8@2243 socket = _OS2socket@12@2321 accept = "_OS2accept@12" @1 22 bind = "_OS2bind@12" @2 23 closesocket = "_OS2closesocket@4" @3 24 connect = "_OS2connect@12" @4 25 getpeername = "_OS2getpeername@12" @5 26 getsockname = "_OS2getsockname@12" @6 27 getsockopt = "_OS2getsockopt@20" @7 28 htonl = "_OS2htonl@4" @8 29 htons = "_OS2htons@4" @9 30 inet_addr = "_OS2inet_addr@4" @10 31 inet_ntoa = "_OS2inet_ntoa@4" @11 32 ioctlsocket = "_OS2ioctlsocket@12" @12 33 listen = "_OS2listen@8" @13 34 ntohl = "_OS2ntohl@4" @14 35 ntohs = "_OS2ntohs@4" @15 36 recv = "_OS2recv@16" @16 37 recvfrom = "_OS2recvfrom@24" @17 38 select = "_OS2select@20" @18 39 send = "_OS2send@16" @19 40 sendto = "_OS2sendto@24" @20 41 setsockopt = "_OS2setsockopt@20" @21 42 shutdown = "_OS2shutdown@8" @22 43 socket = "_OS2socket@12" @23 44 44 45 gethostbyaddr = _OS2gethostbyaddr@12@5146 gethostbyname = _OS2gethostbyname@4@5247 getprotobyname = _OS2getprotobyname@4@5348 getprotobynumber = _OS2getprotobynumber@4@5449 getservbyname = _OS2getservbyname@8@5550 getservbyport = _OS2getservbyport@8@5651 gethostname = _OS2gethostname@8@5745 gethostbyaddr = "_OS2gethostbyaddr@12" @51 46 gethostbyname = "_OS2gethostbyname@4" @52 47 getprotobyname = "_OS2getprotobyname@4" @53 48 getprotobynumber = "_OS2getprotobynumber@4" @54 49 getservbyname = "_OS2getservbyname@8" @55 50 getservbyport = "_OS2getservbyport@8" @56 51 gethostname = "_OS2gethostname@8" @57 52 52 53 53 ; ---------------------------- … … 55 55 ; ---------------------------- 56 56 57 WSAAsyncSelect = _WSAAsyncSelect@16@10158 WSAAsyncGetHostByAddr = _WSAAsyncGetHostByAddr@28@10259 WSAAsyncGetHostByName = _WSAAsyncGetHostByName@20@10360 WSAAsyncGetProtoByNumber = _WSAAsyncGetProtoByNumber@20@10461 WSAAsyncGetProtoByName = _WSAAsyncGetProtoByName@20@10562 WSAAsyncGetServByPort = _WSAAsyncGetServByPort@24@10663 WSAAsyncGetServByName = _WSAAsyncGetServByName@24@10764 WSACancelAsyncRequest = _WSACancelAsyncRequest@4@10865 WSASetBlockingHook = _WSASetBlockingHook@4@10966 WSAUnhookBlockingHook = _WSAUnhookBlockingHook@0@11067 WSAGetLastError = _WSAGetLastError@0@11168 WSASetLastError = _WSASetLastError@4@11269 WSACancelBlockingCall = _WSACancelBlockingCall@0@11370 WSAIsBlocking = _WSAIsBlocking@0@11471 WSAStartup = _WSAStartup@8@11572 WSACleanup = _WSACleanup@0@11673 __WSAFDIsSet = ___WSAFDIsSet@8@15157 WSAAsyncSelect = "_WSAAsyncSelect@16" @101 58 WSAAsyncGetHostByAddr = "_WSAAsyncGetHostByAddr@28" @102 59 WSAAsyncGetHostByName = "_WSAAsyncGetHostByName@20" @103 60 WSAAsyncGetProtoByNumber = "_WSAAsyncGetProtoByNumber@20" @104 61 WSAAsyncGetProtoByName = "_WSAAsyncGetProtoByName@20" @105 62 WSAAsyncGetServByPort = "_WSAAsyncGetServByPort@24" @106 63 WSAAsyncGetServByName = "_WSAAsyncGetServByName@24" @107 64 WSACancelAsyncRequest = "_WSACancelAsyncRequest@4" @108 65 WSASetBlockingHook = "_WSASetBlockingHook@4" @109 66 WSAUnhookBlockingHook = "_WSAUnhookBlockingHook@0" @110 67 WSAGetLastError = "_WSAGetLastError@0" @111 68 WSASetLastError = "_WSASetLastError@4" @112 69 WSACancelBlockingCall = "_WSACancelBlockingCall@0" @113 70 WSAIsBlocking = "_WSAIsBlocking@0" @114 71 WSAStartup = "_WSAStartup@8" @115 72 WSACleanup = "_WSACleanup@0" @116 73 __WSAFDIsSet = "___WSAFDIsSet@8" @151 74 74 75 rcmd = _OS2rcmd@24@110276 rexec = _OS2rexec@24@110377 WSARecvEx = _WSARecvEx@16@110778 s_perror = _OS2s_perror@8@110875 rcmd = "_OS2rcmd@24" @1102 76 rexec = "_OS2rexec@24" @1103 77 WSARecvEx = "_WSARecvEx@16" @1107 78 s_perror = "_OS2s_perror@8" @1108 79 79 80 80 ; ------------------- … … 116 116 ; ----------------------- 117 117 118 _OS2gethostname@8@2000118 "_OS2gethostname@8" @2000 119 119 120 120 ; functions for ws2_32 implemented here 121 WSAEventSelect = _WSAEventSelect@12@3001122 WSAEnumNetworkEvents = _WSAEnumNetworkEvents@12@3002121 WSAEventSelect = "_WSAEventSelect@12" @3001 122 WSAEnumNetworkEvents = "_WSAEnumNetworkEvents@12" @3002 -
trunk/src/wsock32/wsock32.h
r21417 r21916 17 17 18 18 #include "socketwrap.h" 19 #include <sys \time.h>19 #include <sys/time.h> 20 20 21 21 #include <odinwrap.h> 22 23 #ifdef __EMX__ 24 // EMX 0.6.4 and before lacks this 25 #ifndef SOCBASEERR 26 #define SOCBASEERR 0 27 #endif 28 #endif 22 29 23 30 #ifndef IP_TTL … … 128 135 typedef u_int SOCKET; 129 136 137 #ifndef FD_SETSIZE 130 138 #define FD_SETSIZE 64 139 #endif 131 140 132 141 #pragma pack(1)
Note:
See TracChangeset
for help on using the changeset viewer.