diff options
author | Yang Tse <yangsita@gmail.com> | 2007-02-22 02:51:54 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-02-22 02:51:54 +0000 |
commit | 915e774a42ad19ad9e8afb8c21ccee88ade22a94 (patch) | |
tree | 760640e0797b16889555a0e5c8c52023041e2fe6 /ares_process.c | |
parent | 5f5a8ca90580d8fb12f7c3a843ce5a203942dab5 (diff) | |
download | c-ares-915e774a42ad19ad9e8afb8c21ccee88ade22a94.tar.gz c-ares-915e774a42ad19ad9e8afb8c21ccee88ade22a94.tar.bz2 c-ares-915e774a42ad19ad9e8afb8c21ccee88ade22a94.zip |
Check for stdbool.h at configuration stage, and include it if available.
Check for lowercase 'bool' type at configuration stage. If not available
provide a suitable replacement with a type definition of 'unsigned char'
in setup_once.h
Move definitions of TRUE and FALSE to setup_once.h
Diffstat (limited to 'ares_process.c')
-rw-r--r-- | ares_process.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ares_process.c b/ares_process.c index 480948e..6b1b071 100644 --- a/ares_process.c +++ b/ares_process.c @@ -54,10 +54,6 @@ #include "ares_dns.h" #include "ares_private.h" -#ifndef TRUE -/* at least Solaris 7 does not have TRUE at this point */ -#define TRUE 1 -#endif static int try_again(int errnum); static void write_tcp_data(ares_channel channel, fd_set *write_fds, @@ -532,7 +528,7 @@ static int nonblock(ares_socket_t sockfd, /* operate on this */ int flags; flags = fcntl(sockfd, F_GETFL, 0); - if (TRUE == nonblock) + if (FALSE != nonblock) return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); else return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); |