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 | 69565afab0be081211df57a245a222cbd3e43ed3 (patch) | |
tree | 834ab5e7265abad18a542da69d7d65fba831cee3 /lib/connect.c | |
parent | 39aac6352159b4ba92463ec95b9e3df49a5b6693 (diff) |
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 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/connect.c b/lib/connect.c index 2b8e11ff8..14e2ff038 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -79,11 +79,6 @@ #include <errno.h> #include <string.h> -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - #include "urldata.h" #include "sendf.h" #include "if2ip.h" @@ -122,7 +117,7 @@ int Curl_nonblock(curl_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)); |