summaryrefslogtreecommitdiffstats
path: root/c++tools
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-02-25 08:30:17 -0800
committerNathan Sidwell <nathan@acm.org>2021-02-25 08:58:26 -0800
commit9f08c08531b61b68a41c9c5403ec0cc288ae3aba (patch)
treea5918bb76626a060c98cedc89823c3e3a858e8e3 /c++tools
parentlibstdc++: Use uint32_t for all year_month_day::_S_from_days arithmetic (diff)
downloadgcc-9f08c08531b61b68a41c9c5403ec0cc288ae3aba.tar.gz
gcc-9f08c08531b61b68a41c9c5403ec0cc288ae3aba.tar.bz2
gcc-9f08c08531b61b68a41c9c5403ec0cc288ae3aba.tar.xz
c++tools: Make NETWORKING define check consistent [PR 98318]
PR98318 also pointed out that the NETWORKING #define was being checked with both #if and #ifdef. Let's consistently use one form. c++tools/ * server.cc: Use #if NETWORKING not #ifdef, to be consistent with elsewhere.
Diffstat (limited to 'c++tools')
-rw-r--r--c++tools/server.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/c++tools/server.cc b/c++tools/server.cc
index 8514ef6293b..21c7d468aa0 100644
--- a/c++tools/server.cc
+++ b/c++tools/server.cc
@@ -63,7 +63,7 @@ along with GCC; see the file COPYING3. If not see
63#include <getopt.h> 63#include <getopt.h>
64 64
65// Select or epoll 65// Select or epoll
66#ifdef NETWORKING 66#if NETWORKING
67#ifdef HAVE_EPOLL 67#ifdef HAVE_EPOLL
68/* epoll_create, epoll_ctl, epoll_pwait */ 68/* epoll_create, epoll_ctl, epoll_pwait */
69#include <sys/epoll.h> 69#include <sys/epoll.h>
@@ -91,7 +91,7 @@ along with GCC; see the file COPYING3. If not see
91#define DIR_SEPARATOR '/' 91#define DIR_SEPARATOR '/'
92#endif 92#endif
93 93
94#ifdef NETWORKING 94#if NETWORKING
95struct netmask { 95struct netmask {
96 in6_addr addr; 96 in6_addr addr;
97 unsigned bits; 97 unsigned bits;
@@ -161,7 +161,7 @@ static bool flag_xlate = false;
161/* Root binary directory. */ 161/* Root binary directory. */
162static const char *flag_root = "gcm.cache"; 162static const char *flag_root = "gcm.cache";
163 163
164#ifdef NETWORKING 164#if NETWORKING
165static netmask_set_t netmask_set; 165static netmask_set_t netmask_set;
166 166
167static netmask_vec_t accept_addrs; 167static netmask_vec_t accept_addrs;
@@ -233,7 +233,7 @@ error (const char *msg, ...)
233 exit (1); 233 exit (1);
234} 234}
235 235
236#ifdef NETWORKING 236#if NETWORKING
237/* Progress messages to the user. */ 237/* Progress messages to the user. */
238static bool ATTRIBUTE_PRINTF_1 ATTRIBUTE_COLD 238static bool ATTRIBUTE_PRINTF_1 ATTRIBUTE_COLD
239noisy (const char *fmt, ...) 239noisy (const char *fmt, ...)
@@ -414,7 +414,7 @@ process_args (int argc, char **argv)
414 return optind; 414 return optind;
415} 415}
416 416
417#ifdef NETWORKING 417#if NETWORKING
418 418
419/* Manipulate the EPOLL state, or do nothing, if there is epoll. */ 419/* Manipulate the EPOLL state, or do nothing, if there is epoll. */
420 420
@@ -871,7 +871,7 @@ main (int argc, char *argv[])
871 /* Ignore sigpipe, so read/write get an error. */ 871 /* Ignore sigpipe, so read/write get an error. */
872 signal (SIGPIPE, SIG_IGN); 872 signal (SIGPIPE, SIG_IGN);
873#endif 873#endif
874#ifdef NETWORKING 874#if NETWORKING
875#ifdef SIGINT 875#ifdef SIGINT
876 signal (SIGINT, kill_signal); 876 signal (SIGINT, kill_signal);
877#endif 877#endif
@@ -935,7 +935,7 @@ main (int argc, char *argv[])
935 } 935 }
936#endif 936#endif
937 937
938#ifdef NETWORKING 938#if NETWORKING
939 if (sock_fd >= 0) 939 if (sock_fd >= 0)
940 { 940 {
941 server (name[0] != '=', sock_fd, &r); 941 server (name[0] != '=', sock_fd, &r);