00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #if __GNUC__ >= 3
00030 #pragma GCC system_header
00031 #endif
00032
00033
00034 #if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H
00035
00036
00037
00038
00039
00040
00041 #include_next <sys/socket.h>
00042
00043 #else
00044
00045
00046 #ifndef _GL_SYS_SOCKET_H
00047
00048 #if 1
00049
00050 # define _GL_ALREADY_INCLUDING_SYS_SOCKET_H
00051
00052
00053
00054 # include <sys/types.h>
00055
00056
00057 # include_next <sys/socket.h>
00058
00059 # undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H
00060
00061 #endif
00062
00063 #ifndef _GL_SYS_SOCKET_H
00064 #define _GL_SYS_SOCKET_H
00065
00066
00067 #ifndef _GL_CXXDEFS_H
00068 #define _GL_CXXDEFS_H
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 #if defined __cplusplus
00132 # define _GL_EXTERN_C extern "C"
00133 #else
00134 # define _GL_EXTERN_C extern
00135 #endif
00136
00137
00138
00139
00140
00141
00142
00143
00144 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
00145 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
00146 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
00147 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
00148
00149
00150
00151
00152
00153
00154
00155
00156 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
00157 _GL_EXTERN_C rettype func parameters_and_attributes
00158
00159
00160
00161
00162
00163
00164
00165 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
00166 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
00167 #if defined __cplusplus && defined GNULIB_NAMESPACE
00168 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
00169 namespace GNULIB_NAMESPACE \
00170 { \
00171 rettype (*const func) parameters = ::rpl_func; \
00172 } \
00173 _GL_EXTERN_C int _gl_cxxalias_dummy
00174 #else
00175 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
00176 _GL_EXTERN_C int _gl_cxxalias_dummy
00177 #endif
00178
00179
00180
00181
00182
00183
00184 #if defined __cplusplus && defined GNULIB_NAMESPACE
00185 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
00186 namespace GNULIB_NAMESPACE \
00187 { \
00188 rettype (*const func) parameters = \
00189 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
00190 } \
00191 _GL_EXTERN_C int _gl_cxxalias_dummy
00192 #else
00193 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
00194 _GL_EXTERN_C int _gl_cxxalias_dummy
00195 #endif
00196
00197
00198
00199
00200
00201
00202
00203
00204 #if defined __cplusplus && defined GNULIB_NAMESPACE
00205
00206
00207
00208
00209
00210
00211 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
00212 namespace GNULIB_NAMESPACE \
00213 { \
00214 static rettype (*func) parameters = ::func; \
00215 } \
00216 _GL_EXTERN_C int _gl_cxxalias_dummy
00217 #else
00218 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
00219 _GL_EXTERN_C int _gl_cxxalias_dummy
00220 #endif
00221
00222
00223
00224
00225
00226
00227 #if defined __cplusplus && defined GNULIB_NAMESPACE
00228 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
00229 namespace GNULIB_NAMESPACE \
00230 { \
00231 static rettype (*func) parameters = \
00232 reinterpret_cast<rettype(*)parameters>(::func); \
00233 } \
00234 _GL_EXTERN_C int _gl_cxxalias_dummy
00235 #else
00236 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
00237 _GL_EXTERN_C int _gl_cxxalias_dummy
00238 #endif
00239
00240
00241
00242
00243
00244
00245
00246 #if defined __cplusplus && defined GNULIB_NAMESPACE
00247
00248
00249
00250
00251
00252 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
00253 namespace GNULIB_NAMESPACE \
00254 { \
00255 static rettype (*func) parameters = \
00256 reinterpret_cast<rettype(*)parameters>( \
00257 (rettype2(*)parameters2)(::func)); \
00258 } \
00259 _GL_EXTERN_C int _gl_cxxalias_dummy
00260 #else
00261 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
00262 _GL_EXTERN_C int _gl_cxxalias_dummy
00263 #endif
00264
00265
00266
00267
00268
00269 #if defined __cplusplus && defined GNULIB_NAMESPACE
00270 # define _GL_CXXALIASWARN(func) \
00271 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
00272 # define _GL_CXXALIASWARN_1(func,namespace) \
00273 _GL_CXXALIASWARN_2 (func, namespace)
00274
00275
00276 # if !__OPTIMIZE__
00277 # define _GL_CXXALIASWARN_2(func,namespace) \
00278 _GL_WARN_ON_USE (func, \
00279 "The symbol ::" #func " refers to the system function. " \
00280 "Use " #namespace "::" #func " instead.")
00281 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00282 # define _GL_CXXALIASWARN_2(func,namespace) \
00283 extern __typeof__ (func) func
00284 # else
00285 # define _GL_CXXALIASWARN_2(func,namespace) \
00286 _GL_EXTERN_C int _gl_cxxalias_dummy
00287 # endif
00288 #else
00289 # define _GL_CXXALIASWARN(func) \
00290 _GL_EXTERN_C int _gl_cxxalias_dummy
00291 #endif
00292
00293
00294
00295
00296 #if defined __cplusplus && defined GNULIB_NAMESPACE
00297 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
00298 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
00299 GNULIB_NAMESPACE)
00300 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
00301 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
00302
00303
00304 # if !__OPTIMIZE__
00305 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00306 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
00307 "The symbol ::" #func " refers to the system function. " \
00308 "Use " #namespace "::" #func " instead.")
00309 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00310 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00311 extern __typeof__ (func) func
00312 # else
00313 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00314 _GL_EXTERN_C int _gl_cxxalias_dummy
00315 # endif
00316 #else
00317 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
00318 _GL_EXTERN_C int _gl_cxxalias_dummy
00319 #endif
00320
00321 #endif
00322
00323
00324
00325
00326
00327 #ifndef _GL_ARG_NONNULL
00328 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
00329 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
00330 # else
00331 # define _GL_ARG_NONNULL(params)
00332 # endif
00333 #endif
00334
00335
00336 #ifndef _GL_WARN_ON_USE
00337
00338 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
00339
00340 # define _GL_WARN_ON_USE(function, message) \
00341 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
00342 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00343
00344 # define _GL_WARN_ON_USE(function, message) \
00345 extern __typeof__ (function) function
00346 # else
00347 # define _GL_WARN_ON_USE(function, message) \
00348 _GL_WARN_EXTERN_C int _gl_warn_on_use
00349 # endif
00350 #endif
00351
00352
00353
00354
00355
00356
00357
00358 #ifndef _GL_WARN_ON_USE_CXX
00359 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
00360 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00361 extern rettype function parameters_and_attributes \
00362 __attribute__ ((__warning__ (msg)))
00363 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00364
00365 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00366 extern rettype function parameters_and_attributes
00367 # else
00368 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00369 _GL_WARN_EXTERN_C int _gl_warn_on_use
00370 # endif
00371 #endif
00372
00373
00374
00375 #ifndef _GL_WARN_EXTERN_C
00376 # if defined __cplusplus
00377 # define _GL_WARN_EXTERN_C extern "C"
00378 # else
00379 # define _GL_WARN_EXTERN_C extern
00380 # endif
00381 #endif
00382
00383 #if !1
00384 # if !GNULIB_defined_sa_family_t
00385 typedef unsigned short sa_family_t;
00386 # define GNULIB_defined_sa_family_t 1
00387 # endif
00388 #endif
00389
00390 #if 1
00391
00392 # if !1
00393 # ifndef ss_family
00394 # define ss_family __ss_family
00395 # endif
00396 # endif
00397 #else
00398 # include <alignof.h>
00399
00400
00401 # define __ss_aligntype unsigned long int
00402 # define _SS_SIZE 256
00403 # define _SS_PADSIZE \
00404 (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \
00405 ? sizeof (sa_family_t) \
00406 : alignof (__ss_aligntype)) \
00407 + sizeof (__ss_aligntype)))
00408
00409 # if !GNULIB_defined_struct_sockaddr_storage
00410 struct sockaddr_storage
00411 {
00412 sa_family_t ss_family;
00413 __ss_aligntype __ss_align;
00414 char __ss_padding[_SS_PADSIZE];
00415 };
00416 # define GNULIB_defined_struct_sockaddr_storage 1
00417 # endif
00418
00419 #endif
00420
00421 #if 1
00422
00423
00424
00425
00426 # if !defined SHUT_RD
00427 # define SHUT_RD 0
00428 # endif
00429 # if !defined SHUT_WR
00430 # define SHUT_WR 1
00431 # endif
00432 # if !defined SHUT_RDWR
00433 # define SHUT_RDWR 2
00434 # endif
00435
00436 #else
00437
00438 # ifdef __CYGWIN__
00439 # error "Cygwin does have a sys/socket.h, doesn't it?!?"
00440 # endif
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460 # if 0
00461 # include <winsock2.h>
00462 # endif
00463 # if 0
00464 # include <ws2tcpip.h>
00465 # endif
00466
00467
00468 # if !defined SHUT_RD && defined SD_RECEIVE
00469 # define SHUT_RD SD_RECEIVE
00470 # endif
00471 # if !defined SHUT_WR && defined SD_SEND
00472 # define SHUT_WR SD_SEND
00473 # endif
00474 # if !defined SHUT_RDWR && defined SD_BOTH
00475 # define SHUT_RDWR SD_BOTH
00476 # endif
00477
00478 # if 0
00479
00480 # include <sys/types.h>
00481 # include <io.h>
00482
00483 # if !GNULIB_defined_socklen_t
00484 typedef int socklen_t;
00485 # define GNULIB_defined_socklen_t 1
00486 # endif
00487
00488 # endif
00489
00490 #endif
00491
00492 #if 0
00493
00494 # if !GNULIB_defined_rpl_fd_isset
00495
00496
00497
00498 static inline int
00499 rpl_fd_isset (SOCKET fd, fd_set * set)
00500 {
00501 u_int i;
00502 if (set == NULL)
00503 return 0;
00504
00505 for (i = 0; i < set->fd_count; i++)
00506 if (set->fd_array[i] == fd)
00507 return 1;
00508
00509 return 0;
00510 }
00511
00512 # define GNULIB_defined_rpl_fd_isset 1
00513 # endif
00514
00515 # undef FD_ISSET
00516 # define FD_ISSET(fd, set) rpl_fd_isset(fd, set)
00517
00518 #endif
00519
00520
00521
00522 #if 0 && !defined _GL_UNISTD_H
00523 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00524 # undef close
00525 # define close close_used_without_including_unistd_h
00526 # else
00527 _GL_WARN_ON_USE (close,
00528 "close() used without including <unistd.h>");
00529 # endif
00530 #endif
00531
00532 #if 0 && !defined _GL_UNISTD_H
00533 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00534 # undef gethostname
00535 # define gethostname gethostname_used_without_including_unistd_h
00536 # else
00537 _GL_WARN_ON_USE (gethostname,
00538 "gethostname() used without including <unistd.h>");
00539 # endif
00540 #endif
00541
00542 #if 0
00543 # if 0
00544 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00545 # undef socket
00546 # define socket rpl_socket
00547 # endif
00548 _GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol));
00549 _GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol));
00550 # else
00551 _GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol));
00552 # endif
00553 _GL_CXXALIASWARN (socket);
00554 #elif 0
00555 # undef socket
00556 # define socket socket_used_without_requesting_gnulib_module_socket
00557 #elif defined GNULIB_POSIXCHECK
00558 # undef socket
00559 # if HAVE_RAW_DECL_SOCKET
00560 _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - "
00561 "use gnulib module socket for portability");
00562 # endif
00563 #endif
00564
00565 #if 0
00566 # if 0
00567 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00568 # undef connect
00569 # define connect rpl_connect
00570 # endif
00571 _GL_FUNCDECL_RPL (connect, int,
00572 (int fd, const struct sockaddr *addr, socklen_t addrlen)
00573 _GL_ARG_NONNULL ((2)));
00574 _GL_CXXALIAS_RPL (connect, int,
00575 (int fd, const struct sockaddr *addr, socklen_t addrlen));
00576 # else
00577
00578
00579 _GL_CXXALIAS_SYS_CAST (connect, int,
00580 (int fd,
00581 const struct sockaddr *addr, socklen_t addrlen));
00582 # endif
00583 _GL_CXXALIASWARN (connect);
00584 #elif 0
00585 # undef connect
00586 # define connect socket_used_without_requesting_gnulib_module_connect
00587 #elif defined GNULIB_POSIXCHECK
00588 # undef connect
00589 # if HAVE_RAW_DECL_CONNECT
00590 _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - "
00591 "use gnulib module connect for portability");
00592 # endif
00593 #endif
00594
00595 #if 0
00596 # if 0
00597 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00598 # undef accept
00599 # define accept rpl_accept
00600 # endif
00601 _GL_FUNCDECL_RPL (accept, int,
00602 (int fd, struct sockaddr *addr, socklen_t *addrlen));
00603 _GL_CXXALIAS_RPL (accept, int,
00604 (int fd, struct sockaddr *addr, socklen_t *addrlen));
00605 # else
00606
00607
00608 _GL_CXXALIAS_SYS_CAST (accept, int,
00609 (int fd, struct sockaddr *addr, socklen_t *addrlen));
00610 # endif
00611 _GL_CXXALIASWARN (accept);
00612 #elif 0
00613 # undef accept
00614 # define accept accept_used_without_requesting_gnulib_module_accept
00615 #elif defined GNULIB_POSIXCHECK
00616 # undef accept
00617 # if HAVE_RAW_DECL_ACCEPT
00618 _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - "
00619 "use gnulib module accept for portability");
00620 # endif
00621 #endif
00622
00623 #if 0
00624 # if 0
00625 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00626 # undef bind
00627 # define bind rpl_bind
00628 # endif
00629 _GL_FUNCDECL_RPL (bind, int,
00630 (int fd, const struct sockaddr *addr, socklen_t addrlen)
00631 _GL_ARG_NONNULL ((2)));
00632 _GL_CXXALIAS_RPL (bind, int,
00633 (int fd, const struct sockaddr *addr, socklen_t addrlen));
00634 # else
00635
00636
00637 _GL_CXXALIAS_SYS_CAST (bind, int,
00638 (int fd,
00639 const struct sockaddr *addr, socklen_t addrlen));
00640 # endif
00641 _GL_CXXALIASWARN (bind);
00642 #elif 0
00643 # undef bind
00644 # define bind bind_used_without_requesting_gnulib_module_bind
00645 #elif defined GNULIB_POSIXCHECK
00646 # undef bind
00647 # if HAVE_RAW_DECL_BIND
00648 _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - "
00649 "use gnulib module bind for portability");
00650 # endif
00651 #endif
00652
00653 #if 0
00654 # if 0
00655 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00656 # undef getpeername
00657 # define getpeername rpl_getpeername
00658 # endif
00659 _GL_FUNCDECL_RPL (getpeername, int,
00660 (int fd, struct sockaddr *addr, socklen_t *addrlen)
00661 _GL_ARG_NONNULL ((2, 3)));
00662 _GL_CXXALIAS_RPL (getpeername, int,
00663 (int fd, struct sockaddr *addr, socklen_t *addrlen));
00664 # else
00665
00666
00667 _GL_CXXALIAS_SYS_CAST (getpeername, int,
00668 (int fd, struct sockaddr *addr, socklen_t *addrlen));
00669 # endif
00670 _GL_CXXALIASWARN (getpeername);
00671 #elif 0
00672 # undef getpeername
00673 # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername
00674 #elif defined GNULIB_POSIXCHECK
00675 # undef getpeername
00676 # if HAVE_RAW_DECL_GETPEERNAME
00677 _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - "
00678 "use gnulib module getpeername for portability");
00679 # endif
00680 #endif
00681
00682 #if 0
00683 # if 0
00684 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00685 # undef getsockname
00686 # define getsockname rpl_getsockname
00687 # endif
00688 _GL_FUNCDECL_RPL (getsockname, int,
00689 (int fd, struct sockaddr *addr, socklen_t *addrlen)
00690 _GL_ARG_NONNULL ((2, 3)));
00691 _GL_CXXALIAS_RPL (getsockname, int,
00692 (int fd, struct sockaddr *addr, socklen_t *addrlen));
00693 # else
00694
00695
00696 _GL_CXXALIAS_SYS_CAST (getsockname, int,
00697 (int fd, struct sockaddr *addr, socklen_t *addrlen));
00698 # endif
00699 _GL_CXXALIASWARN (getsockname);
00700 #elif 0
00701 # undef getsockname
00702 # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname
00703 #elif defined GNULIB_POSIXCHECK
00704 # undef getsockname
00705 # if HAVE_RAW_DECL_GETSOCKNAME
00706 _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - "
00707 "use gnulib module getsockname for portability");
00708 # endif
00709 #endif
00710
00711 #if 0
00712 # if 0
00713 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00714 # undef getsockopt
00715 # define getsockopt rpl_getsockopt
00716 # endif
00717 _GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname,
00718 void *optval, socklen_t *optlen)
00719 _GL_ARG_NONNULL ((4, 5)));
00720 _GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname,
00721 void *optval, socklen_t *optlen));
00722 # else
00723
00724
00725 _GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname,
00726 void *optval, socklen_t *optlen));
00727 # endif
00728 _GL_CXXALIASWARN (getsockopt);
00729 #elif 0
00730 # undef getsockopt
00731 # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
00732 #elif defined GNULIB_POSIXCHECK
00733 # undef getsockopt
00734 # if HAVE_RAW_DECL_GETSOCKOPT
00735 _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - "
00736 "use gnulib module getsockopt for portability");
00737 # endif
00738 #endif
00739
00740 #if 0
00741 # if 0
00742 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00743 # undef listen
00744 # define listen rpl_listen
00745 # endif
00746 _GL_FUNCDECL_RPL (listen, int, (int fd, int backlog));
00747 _GL_CXXALIAS_RPL (listen, int, (int fd, int backlog));
00748 # else
00749 _GL_CXXALIAS_SYS (listen, int, (int fd, int backlog));
00750 # endif
00751 _GL_CXXALIASWARN (listen);
00752 #elif 0
00753 # undef listen
00754 # define listen listen_used_without_requesting_gnulib_module_listen
00755 #elif defined GNULIB_POSIXCHECK
00756 # undef listen
00757 # if HAVE_RAW_DECL_LISTEN
00758 _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - "
00759 "use gnulib module listen for portability");
00760 # endif
00761 #endif
00762
00763 #if 0
00764 # if 0
00765 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00766 # undef recv
00767 # define recv rpl_recv
00768 # endif
00769 _GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)
00770 _GL_ARG_NONNULL ((2)));
00771 _GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
00772 # else
00773 _GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
00774 # endif
00775 _GL_CXXALIASWARN (recv);
00776 #elif 0
00777 # undef recv
00778 # define recv recv_used_without_requesting_gnulib_module_recv
00779 #elif defined GNULIB_POSIXCHECK
00780 # undef recv
00781 # if HAVE_RAW_DECL_RECV
00782 _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - "
00783 "use gnulib module recv for portability");
00784 # endif
00785 #endif
00786
00787 #if 0
00788 # if 0
00789 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00790 # undef send
00791 # define send rpl_send
00792 # endif
00793 _GL_FUNCDECL_RPL (send, ssize_t,
00794 (int fd, const void *buf, size_t len, int flags)
00795 _GL_ARG_NONNULL ((2)));
00796 _GL_CXXALIAS_RPL (send, ssize_t,
00797 (int fd, const void *buf, size_t len, int flags));
00798 # else
00799 _GL_CXXALIAS_SYS (send, ssize_t,
00800 (int fd, const void *buf, size_t len, int flags));
00801 # endif
00802 _GL_CXXALIASWARN (send);
00803 #elif 0
00804 # undef send
00805 # define send send_used_without_requesting_gnulib_module_send
00806 #elif defined GNULIB_POSIXCHECK
00807 # undef send
00808 # if HAVE_RAW_DECL_SEND
00809 _GL_WARN_ON_USE (send, "send is not always POSIX compliant - "
00810 "use gnulib module send for portability");
00811 # endif
00812 #endif
00813
00814 #if 0
00815 # if 0
00816 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00817 # undef recvfrom
00818 # define recvfrom rpl_recvfrom
00819 # endif
00820 _GL_FUNCDECL_RPL (recvfrom, ssize_t,
00821 (int fd, void *buf, size_t len, int flags,
00822 struct sockaddr *from, socklen_t *fromlen)
00823 _GL_ARG_NONNULL ((2)));
00824 _GL_CXXALIAS_RPL (recvfrom, ssize_t,
00825 (int fd, void *buf, size_t len, int flags,
00826 struct sockaddr *from, socklen_t *fromlen));
00827 # else
00828
00829
00830 _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t,
00831 (int fd, void *buf, size_t len, int flags,
00832 struct sockaddr *from, socklen_t *fromlen));
00833 # endif
00834 _GL_CXXALIASWARN (recvfrom);
00835 #elif 0
00836 # undef recvfrom
00837 # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom
00838 #elif defined GNULIB_POSIXCHECK
00839 # undef recvfrom
00840 # if HAVE_RAW_DECL_RECVFROM
00841 _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - "
00842 "use gnulib module recvfrom for portability");
00843 # endif
00844 #endif
00845
00846 #if 0
00847 # if 0
00848 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00849 # undef sendto
00850 # define sendto rpl_sendto
00851 # endif
00852 _GL_FUNCDECL_RPL (sendto, ssize_t,
00853 (int fd, const void *buf, size_t len, int flags,
00854 const struct sockaddr *to, socklen_t tolen)
00855 _GL_ARG_NONNULL ((2)));
00856 _GL_CXXALIAS_RPL (sendto, ssize_t,
00857 (int fd, const void *buf, size_t len, int flags,
00858 const struct sockaddr *to, socklen_t tolen));
00859 # else
00860
00861
00862 _GL_CXXALIAS_SYS_CAST (sendto, ssize_t,
00863 (int fd, const void *buf, size_t len, int flags,
00864 const struct sockaddr *to, socklen_t tolen));
00865 # endif
00866 _GL_CXXALIASWARN (sendto);
00867 #elif 0
00868 # undef sendto
00869 # define sendto sendto_used_without_requesting_gnulib_module_sendto
00870 #elif defined GNULIB_POSIXCHECK
00871 # undef sendto
00872 # if HAVE_RAW_DECL_SENDTO
00873 _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - "
00874 "use gnulib module sendto for portability");
00875 # endif
00876 #endif
00877
00878 #if 0
00879 # if 0
00880 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00881 # undef setsockopt
00882 # define setsockopt rpl_setsockopt
00883 # endif
00884 _GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname,
00885 const void * optval, socklen_t optlen)
00886 _GL_ARG_NONNULL ((4)));
00887 _GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname,
00888 const void * optval, socklen_t optlen));
00889 # else
00890
00891
00892 _GL_CXXALIAS_SYS_CAST (setsockopt, int,
00893 (int fd, int level, int optname,
00894 const void * optval, socklen_t optlen));
00895 # endif
00896 _GL_CXXALIASWARN (setsockopt);
00897 #elif 0
00898 # undef setsockopt
00899 # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt
00900 #elif defined GNULIB_POSIXCHECK
00901 # undef setsockopt
00902 # if HAVE_RAW_DECL_SETSOCKOPT
00903 _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - "
00904 "use gnulib module setsockopt for portability");
00905 # endif
00906 #endif
00907
00908 #if 0
00909 # if 0
00910 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00911 # undef shutdown
00912 # define shutdown rpl_shutdown
00913 # endif
00914 _GL_FUNCDECL_RPL (shutdown, int, (int fd, int how));
00915 _GL_CXXALIAS_RPL (shutdown, int, (int fd, int how));
00916 # else
00917 _GL_CXXALIAS_SYS (shutdown, int, (int fd, int how));
00918 # endif
00919 _GL_CXXALIASWARN (shutdown);
00920 #elif 0
00921 # undef shutdown
00922 # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown
00923 #elif defined GNULIB_POSIXCHECK
00924 # undef shutdown
00925 # if HAVE_RAW_DECL_SHUTDOWN
00926 _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - "
00927 "use gnulib module shutdown for portability");
00928 # endif
00929 #endif
00930
00931 #if 0
00932 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00933 # undef select
00934 # define select select_used_without_including_sys_select_h
00935 # else
00936 _GL_WARN_ON_USE (select,
00937 "select() used without including <sys/select.h>");
00938 # endif
00939 #endif
00940
00941 #if 0
00942
00943
00944
00945
00946
00947 # if 1
00948 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00949 # define accept4 rpl_accept4
00950 # endif
00951 _GL_FUNCDECL_RPL (accept4, int,
00952 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
00953 int flags));
00954 _GL_CXXALIAS_RPL (accept4, int,
00955 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
00956 int flags));
00957 # else
00958 _GL_FUNCDECL_SYS (accept4, int,
00959 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
00960 int flags));
00961 _GL_CXXALIAS_SYS (accept4, int,
00962 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
00963 int flags));
00964 # endif
00965 _GL_CXXALIASWARN (accept4);
00966 #elif defined GNULIB_POSIXCHECK
00967 # undef accept4
00968 # if HAVE_RAW_DECL_ACCEPT4
00969 _GL_WARN_ON_USE (accept4, "accept4 is unportable - "
00970 "use gnulib module accept4 for portability");
00971 # endif
00972 #endif
00973
00974 #endif
00975 #endif
00976 #endif