mirror of
https://frontier.innolan.net/rainlance/c-ares.git
synced 2025-11-21 01:41:38 +00:00
Configure process now checks availability of recvfrom() socket function and
finds out its return type and the types of its arguments. Added definitions for non-configure systems config files, and introduced macro sreadfrom which will be used on udp sockets as a recvfrom() wrapper.
This commit is contained in:
33
setup_once.h
33
setup_once.h
@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2007 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
@ -191,6 +191,37 @@ struct timeval {
|
||||
#endif /* HAVE_SEND */
|
||||
|
||||
|
||||
#if defined(HAVE_RECVFROM)
|
||||
/*
|
||||
* Currently recvfrom is only used on udp sockets.
|
||||
*/
|
||||
#if !defined(RECVFROM_TYPE_ARG1) || \
|
||||
!defined(RECVFROM_TYPE_ARG2) || \
|
||||
!defined(RECVFROM_TYPE_ARG3) || \
|
||||
!defined(RECVFROM_TYPE_ARG4) || \
|
||||
!defined(RECVFROM_TYPE_ARG5) || \
|
||||
!defined(RECVFROM_TYPE_ARG6) || \
|
||||
!defined(RECVFROM_TYPE_RETV)
|
||||
/* */
|
||||
Error Missing_definition_of_return_and_arguments_types_of_recvfrom
|
||||
/* */
|
||||
#else
|
||||
#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1)(s), \
|
||||
(RECVFROM_TYPE_ARG2)(b), \
|
||||
(RECVFROM_TYPE_ARG3)(bl), \
|
||||
(RECVFROM_TYPE_ARG4)(0), \
|
||||
(RECVFROM_TYPE_ARG5)(f), \
|
||||
(RECVFROM_TYPE_ARG6)(fl))
|
||||
#endif
|
||||
#else /* HAVE_RECVFROM */
|
||||
#ifndef sreadfrom
|
||||
/* */
|
||||
Error Missing_definition_of_macro_sreadfrom
|
||||
/* */
|
||||
#endif
|
||||
#endif /* HAVE_RECVFROM */
|
||||
|
||||
|
||||
/*
|
||||
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
|
||||
* avoid negative number inputs with argument byte codes > 127.
|
||||
|
||||
Reference in New Issue
Block a user