Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/wsock32/socketwrap.h

    r7461 r21916  
    22#define __SOCKETWRAP_H__
    33
    4 #include <sys\socket.h>
    5 #include <sys\ioctl.h>
     4#include <sys/socket.h>
     5#include <sys/ioctl.h>
    66#include <netdb.h>
    7 #include <netinet\in.h>
    8 #include <netinet\tcp.h>
     7#include <netinet/in.h>
     8#include <netinet/tcp.h>
    99#include <nerrno.h>
    1010
     
    1818
    1919    return yyrc;
    20 } 
     20}
    2121
    2222#undef  accept
     
    2929    addsockettolist(a);
    3030    SetFS(sel);
    31 } 
     31}
    3232
    3333#undef  addsockettolist
     
    4343
    4444    return yyrc;
    45 } 
     45}
    4646
    4747#undef  bind
     
    5757
    5858    return yyrc;
    59 } 
     59}
    6060
    6161#undef  connect
     
    7171
    7272    return yyrc;
    73 } 
     73}
    7474
    7575#undef  gethostid
     
    8585
    8686    return yyrc;
    87 } 
     87}
    8888
    8989#undef  getpeername
     
    9999
    100100    return yyrc;
    101 } 
     101}
    102102
    103103#undef  getsockname
     
    113113
    114114    return yyrc;
    115 } 
     115}
    116116
    117117#undef  getsockopt
    118118#define getsockopt _getsockopt
    119119
    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 } 
     120inline 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}
    130130
    131131#undef  ioctl
    132 #define ioctl _ioctl
     132#define ioctl _os2_ioctl
    133133
    134134inline int _listen(int a, int b)
     
    141141
    142142    return yyrc;
    143 } 
     143}
    144144
    145145#undef  listen
     
    155155
    156156    return yyrc;
    157 } 
     157}
    158158
    159159#undef  recvmsg
     
    169169
    170170    return yyrc;
    171 } 
     171}
    172172
    173173#undef  recv
     
    183183
    184184    return yyrc;
    185 } 
     185}
    186186
    187187#undef  recvfrom
     
    197197
    198198    return yyrc;
    199 } 
     199}
    200200
    201201#undef  removesocketfromlist
    202202#define removesocketfromlist _removesocketfromlist
    203203
    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 } 
     204inline 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}
    214214
    215215#undef  select
    216 #define select _select
     216#define select _os2_select
    217217
    218218inline int _send(int a, char *b, int c, int d)
     
    225225
    226226    return yyrc;
    227 } 
     227}
    228228
    229229#undef  send
     
    239239
    240240    return yyrc;
    241 } 
     241}
    242242
    243243#undef  sendmsg
     
    253253
    254254    return yyrc;
    255 } 
     255}
    256256
    257257#undef  sendto
     
    267267
    268268    return yyrc;
    269 } 
     269}
    270270
    271271#undef  setsockopt
     
    281281
    282282    return yyrc;
    283 } 
     283}
    284284
    285285#undef  sock_init
     
    295295
    296296    return yyrc;
    297 } 
     297}
    298298
    299299#undef  sock_errno
     
    306306    psock_errno(a);
    307307    SetFS(sel);
    308 } 
     308}
    309309
    310310#undef  psock_errno
     
    320320
    321321    return yyrc;
    322 } 
     322}
    323323
    324324#undef  socket
     
    334334
    335335    return yyrc;
    336 } 
     336}
    337337
    338338#undef  soclose
     
    348348
    349349    return yyrc;
    350 } 
     350}
    351351
    352352#undef  so_cancel
     
    362362
    363363    return yyrc;
    364 } 
     364}
    365365
    366366#undef  readv
     
    376376
    377377    return yyrc;
    378 } 
     378}
    379379
    380380#undef  writev
     
    390390
    391391    return yyrc;
    392 } 
     392}
    393393
    394394#undef  shutdown
     
    404404
    405405    return yyrc;
    406 } 
     406}
    407407
    408408#undef  Raccept
     
    418418
    419419    return yyrc;
    420 } 
     420}
    421421
    422422#undef  Rbind
     
    432432
    433433    return yyrc;
    434 } 
     434}
    435435
    436436#undef  Rconnect
     
    446446
    447447    return yyrc;
    448 } 
     448}
    449449
    450450#undef  Rgetsockname
     
    460460
    461461    return yyrc;
    462 } 
     462}
    463463
    464464#undef  Rlisten
     
    474474
    475475    return yyrc;
    476 } 
     476}
    477477
    478478#undef  gethostname
     
    488488
    489489    return yyrc;
    490 } 
     490}
    491491
    492492#undef  gethostbyname
     
    502502
    503503    return yyrc;
    504 } 
     504}
    505505
    506506#undef  gethostbyaddr
     
    516516
    517517    return yyrc;
    518 } 
     518}
    519519
    520520#undef  getnetbyname
     
    530530
    531531    return yyrc;
    532 } 
     532}
    533533
    534534#undef  getnetbyaddr
     
    544544
    545545    return yyrc;
    546 } 
     546}
    547547
    548548#undef  getservbyname
     
    558558
    559559    return yyrc;
    560 } 
     560}
    561561
    562562#undef  getservbyport
     
    572572
    573573    return yyrc;
    574 } 
     574}
    575575
    576576#undef  getprotobyname
     
    586586
    587587    return yyrc;
    588 } 
     588}
    589589
    590590#undef  getprotobynumber
     
    597597    sethostent(a);
    598598    SetFS(sel);
    599 } 
     599}
    600600
    601601#undef  sethostent
     
    611611
    612612    return yyrc;
    613 } 
     613}
    614614
    615615#undef  gethostent
     
    622622    endhostent();
    623623    SetFS(sel);
    624 } 
     624}
    625625
    626626#undef  endhostent
     
    633633    setnetent(a);
    634634    SetFS(sel);
    635 } 
     635}
    636636
    637637#undef  setnetent
     
    647647
    648648    return yyrc;
    649 } 
     649}
    650650
    651651#undef  getnetent
     
    658658    endnetent();
    659659    SetFS(sel);
    660 } 
     660}
    661661
    662662#undef  endnetent
     
    669669    setprotoent(a);
    670670    SetFS(sel);
    671 } 
     671}
    672672
    673673#undef  setprotoent
     
    683683
    684684    return yyrc;
    685 } 
     685}
    686686
    687687#undef  getprotoent
     
    694694    endprotoent();
    695695    SetFS(sel);
    696 } 
     696}
    697697
    698698#undef  endprotoent
     
    705705    setservent(a);
    706706    SetFS(sel);
    707 } 
     707}
    708708
    709709#undef  setservent
     
    719719
    720720    return yyrc;
    721 } 
     721}
    722722
    723723#undef  getservent
     
    730730    endservent();
    731731    SetFS(sel);
    732 } 
     732}
    733733
    734734#undef  endservent
     
    744744
    745745    return yyrc;
    746 } 
     746}
    747747
    748748#undef  tcp_h_errno
     
    758758
    759759    return yyrc;
    760 } 
     760}
    761761
    762762#undef  Rgethostbyname
Note: See TracChangeset for help on using the changeset viewer.