diff options
Diffstat (limited to 'ares/setup_once.h')
-rw-r--r-- | ares/setup_once.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/ares/setup_once.h b/ares/setup_once.h index 59ed25cb2..85a291a81 100644 --- a/ares/setup_once.h +++ b/ares/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. |