Changeset 21916 for trunk/src/wsock32/socketwrap.h
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
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/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
Note:
See TracChangeset
for help on using the changeset viewer.