diff --git a/lib/cshutdn.c b/lib/cshutdn.c index c8b40dc321..aeea9bdc3e 100644 --- a/lib/cshutdn.c +++ b/lib/cshutdn.c @@ -498,7 +498,7 @@ void Curl_cshutdn_setfds(struct cshutdn *cshutdn, Curl_detach_connection(data); for(i = 0; i < ps.num; i++) { -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif @@ -506,7 +506,7 @@ void Curl_cshutdn_setfds(struct cshutdn *cshutdn, FD_SET(ps.sockets[i], read_fd_set); if(ps.actions[i] & CURL_POLL_OUT) FD_SET(ps.sockets[i], write_fd_set); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if((ps.actions[i] & (CURL_POLL_OUT | CURL_POLL_IN)) && diff --git a/lib/multi.c b/lib/multi.c index 926698a423..8543bfa8e5 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1154,7 +1154,7 @@ CURLMcode curl_multi_fdset(CURLM *m, if(!FDSET_SOCK(ps.sockets[i])) /* pretend it does not exist */ continue; -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif @@ -1162,7 +1162,7 @@ CURLMcode curl_multi_fdset(CURLM *m, FD_SET(ps.sockets[i], read_fd_set); if(ps.actions[i] & CURL_POLL_OUT) FD_SET(ps.sockets[i], write_fd_set); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if((int)ps.sockets[i] > this_max_fd) diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c index 8268d0a1a3..1c8e99b99e 100644 --- a/src/tool_cb_rea.c +++ b/src/tool_cb_rea.c @@ -71,12 +71,12 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) timeout.tv_usec = (int)((wait%1000)*1000); FD_ZERO(&bits); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(per->infd, &bits); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(!select(per->infd + 1, &bits, NULL, NULL, &timeout)) @@ -161,12 +161,12 @@ int tool_readbusy_cb(void *clientp, timeout.tv_usec = 1000; FD_ZERO(&bits); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(per->infd, &bits); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif select(per->infd + 1, &bits, NULL, NULL, &timeout); diff --git a/tests/libtest/lib1960.c b/tests/libtest/lib1960.c index 4fb7247073..ef8b3b8308 100644 --- a/tests/libtest/lib1960.c +++ b/tests/libtest/lib1960.c @@ -64,7 +64,7 @@ static int sockopt_cb(void *clientp, return CURL_SOCKOPT_ALREADY_CONNECTED; } -#if defined(__AMIGA__) +#ifdef __AMIGA__ #define my_inet_pton(x,y,z) inet_pton(x,(unsigned char *)y,z) #else #define my_inet_pton(x,y,z) inet_pton(x,y,z) diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c index d971799da8..3a15bfb0a2 100644 --- a/tests/libtest/lib530.c +++ b/tests/libtest/lib530.c @@ -235,12 +235,12 @@ static void t530_updateFdSet(struct t530_Sockets *sockets, fd_set* fdset, { int i; for(i = 0; i < sockets->count; ++i) { -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sockets->sockets[i], fdset); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(*maxFd < sockets->sockets[i] + 1) { diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index fbd329b64a..7ba53aca3d 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -182,12 +182,12 @@ static void t582_updateFdSet(struct t582_Sockets *sockets, fd_set* fdset, { int i; for(i = 0; i < sockets->count; ++i) { -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sockets->sockets[i], fdset); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(*maxFd < sockets->sockets[i] + 1) { diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c index 76ef715011..d8946127da 100644 --- a/tests/server/mqttd.c +++ b/tests/server/mqttd.c @@ -666,12 +666,12 @@ static bool mqttd_incoming(curl_socket_t listenfd) FD_ZERO(&fds_err); /* there's always a socket to wait for */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sockfd, &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index c17bca34bf..c8b21beee9 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -965,12 +965,12 @@ static bool juggle(curl_socket_t *sockfdp, FD_ZERO(&fds_write); FD_ZERO(&fds_err); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET((curl_socket_t)fileno(stdin), &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif @@ -981,12 +981,12 @@ static bool juggle(curl_socket_t *sockfdp, /* server mode */ sockfd = listenfd; /* there's always a socket to wait for */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sockfd, &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif maxfd = (int)sockfd; @@ -1002,12 +1002,12 @@ static bool juggle(curl_socket_t *sockfdp, } else { /* there's always a socket to wait for */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sockfd, &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif maxfd = (int)sockfd; @@ -1019,12 +1019,12 @@ static bool juggle(curl_socket_t *sockfdp, sockfd = *sockfdp; /* sockfd turns CURL_SOCKET_BAD when our connection has been closed */ if(CURL_SOCKET_BAD != sockfd) { -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sockfd, &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif maxfd = (int)sockfd; diff --git a/tests/server/socksd.c b/tests/server/socksd.c index 70e27af2ff..d991f71922 100644 --- a/tests/server/socksd.c +++ b/tests/server/socksd.c @@ -629,35 +629,35 @@ static bool socksd_incoming(curl_socket_t listenfd) FD_ZERO(&fds_err); /* there's always a socket to wait for */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sockfd, &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif for(i = 0; i < 2; i++) { if(c[i].used) { curl_socket_t fd = c[i].clientfd; -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(fd, &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if((int)fd > maxfd) maxfd = (int)fd; fd = c[i].remotefd; -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(fd, &fds_read); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if((int)fd > maxfd) diff --git a/tests/server/sws.c b/tests/server/sws.c index f49f22339d..74a5addd38 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -830,12 +830,12 @@ static int sws_get_request(curl_socket_t sock, struct sws_httprequest *req) FD_ZERO(&input); FD_ZERO(&output); got = 0; -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(sock, &input); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif do { @@ -1307,12 +1307,12 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port) timeout.tv_sec = 1; /* 1000 ms */ FD_ZERO(&output); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(serverfd, &output); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif while(1) { @@ -1439,12 +1439,12 @@ static void http_connect(curl_socket_t *infdp, /* listener socket is monitored to allow client to establish secondary tunnel only when this tunnel is not established and primary one is fully operational */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(rootfd, &input); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif maxfd = rootfd; @@ -1456,12 +1456,12 @@ static void http_connect(curl_socket_t *infdp, if(clientfd[i] != CURL_SOCKET_BAD) { if(poll_client_rd[i]) { /* unless told not to do so, monitor readability */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(clientfd[i], &input); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(clientfd[i] > maxfd) @@ -1470,12 +1470,12 @@ static void http_connect(curl_socket_t *infdp, if(poll_client_wr[i] && toc[i]) { /* unless told not to do so, monitor writability if there is data ready to be sent to client */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(clientfd[i], &output); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(clientfd[i] > maxfd) @@ -1486,12 +1486,12 @@ static void http_connect(curl_socket_t *infdp, if(serverfd[i] != CURL_SOCKET_BAD) { if(poll_server_rd[i]) { /* unless told not to do so, monitor readability */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(serverfd[i], &input); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(serverfd[i] > maxfd) @@ -1500,12 +1500,12 @@ static void http_connect(curl_socket_t *infdp, if(poll_server_wr[i] && tos[i]) { /* unless told not to do so, monitor writability if there is data ready to be sent to server */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(serverfd[i], &output); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(serverfd[i] > maxfd) @@ -2322,12 +2322,12 @@ static int test_sws(int argc, char *argv[]) for(socket_idx = 0; socket_idx < num_sockets; ++socket_idx) { /* Listen on all sockets */ -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warith-conversion" #endif FD_SET(all_sockets[socket_idx], &input); -#if defined(__DJGPP__) +#ifdef __DJGPP__ #pragma GCC diagnostic pop #endif if(all_sockets[socket_idx] > maxfd)