?RCS: $Id: d_msg_flags.U 59 2010-12-12 10:14:03Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_recvmsg: Trylink cat i_systypes i_sysselct i_syssock \ i_winsock2 i_mswsock d_windows ?MAKE: -pick add $@ %< ?S:d_recvmsg: ?S: This variable conditionally defines the HAS_RECVMSG symbol, ?S: which indicates to the C program that the recvmsg() function is ?S: available. ?S:. ?C:HAS_RECVMSG: ?C: This symbol, if defined, indicates that the recvmsg() function ?C: is available. ?C:. ?H:#$d_recvmsg HAS_RECVMSG /**/ ?H:. ?LINT:set d_recvmsg : check for recvmsg function $cat >try.c < #endif #ifdef I_SYS_SOCKET #include #endif #ifdef I_WINSOCK2 #include #endif #ifdef I_MSWSOCK #include #endif int main(void) { static struct msghdr msg; int ret, fd, flags; fd = 1; flags = 1; msg.msg_name = (void *) 0; msg.msg_namelen |= 1; msg.msg_iov = (void *) 0; msg.msg_iovlen |= 1; /* msg.msg_flags is intentionally excluded, see other unit */ msg.msg_control = (void *) 0; msg.msg_controllen |= 1; ret = recvmsg(fd, &msg, flags); return ret ? 0 : 1; } EOC cyn='recvmsg' set d_recvmsg eval $trylink