From: Nathan Sidwell Date: Thu, 25 Feb 2021 16:30:17 +0000 (-0800) Subject: c++tools: Make NETWORKING define check consistent [PR 98318] X-Git-Tag: basepoints/gcc-12~859 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f08c08531b61b68a41c9c5403ec0cc288ae3aba;p=thirdparty%2Fgcc.git 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. --- diff --git a/c++tools/server.cc b/c++tools/server.cc index 8514ef6293be..21c7d468aa02 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 #include // Select or epoll -#ifdef NETWORKING +#if NETWORKING #ifdef HAVE_EPOLL /* epoll_create, epoll_ctl, epoll_pwait */ #include @@ -91,7 +91,7 @@ along with GCC; see the file COPYING3. If not see #define DIR_SEPARATOR '/' #endif -#ifdef NETWORKING +#if NETWORKING struct netmask { in6_addr addr; unsigned bits; @@ -161,7 +161,7 @@ static bool flag_xlate = false; /* Root binary directory. */ static const char *flag_root = "gcm.cache"; -#ifdef NETWORKING +#if NETWORKING static netmask_set_t netmask_set; static netmask_vec_t accept_addrs; @@ -233,7 +233,7 @@ error (const char *msg, ...) exit (1); } -#ifdef NETWORKING +#if NETWORKING /* Progress messages to the user. */ static bool ATTRIBUTE_PRINTF_1 ATTRIBUTE_COLD noisy (const char *fmt, ...) @@ -414,7 +414,7 @@ process_args (int argc, char **argv) return optind; } -#ifdef NETWORKING +#if NETWORKING /* Manipulate the EPOLL state, or do nothing, if there is epoll. */ @@ -871,7 +871,7 @@ main (int argc, char *argv[]) /* Ignore sigpipe, so read/write get an error. */ signal (SIGPIPE, SIG_IGN); #endif -#ifdef NETWORKING +#if NETWORKING #ifdef SIGINT signal (SIGINT, kill_signal); #endif @@ -935,7 +935,7 @@ main (int argc, char *argv[]) } #endif -#ifdef NETWORKING +#if NETWORKING if (sock_fd >= 0) { server (name[0] != '=', sock_fd, &r);