From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111615 invoked by alias); 12 Sep 2017 08:13:46 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 101884 invoked by uid 89); 12 Sep 2017 08:13:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,SPF_PASS autolearn=ham version=3.3.2 spammy=nia, wrze, wrze=c5, H*r:10.10.10?= X-HELO: smtpo.poczta.interia.pl X-Interia-R: Interia X-Interia-R-IP: 156.67.106.30 X-Interia-R-Helo: <[10.10.10.1]> Date: Tue, 12 Sep 2017 08:13:00 -0000 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [RFC][PATCH 1/4][BZ 17083] getaddrinfo: Add comments for #else and #endif directives To: DJ Delorie CC: libc-alpha@sourceware.org From: =?UTF-8?Q?=C5=81ukasz_Stelmach?= Message-ID: <025A7C09-CCB4-4163-9662-EA2DCF581C04@poczta.fm> X-Interia-Antivirus: OK X-SW-Source: 2017-09/txt/msg00475.txt.bz2 Dnia 11 wrze=C5=9Bnia 2017 22:01:10 CEST, DJ Delorie napisa= =C5=82(a): > >=C5=81ukasz Stelmach writes: >> #if __BYTE_ORDER =3D=3D __BIG_ENDIAN >> # define htonl_c(n) n >> -#else >> +#else /* __BYTE_ORDER =3D=3D __BIG_ENDIAN */ >> # define htonl_c(n) __bswap_constant_32 (n) >> -#endif >> +#endif /* __BYTE_ORDER =3D=3D __BIG_ENDIAN */ > >What's our policy on inverting the logic sense in these comments when >they refer to the #else clause? If I were to answer that question (which I am not sure, because I was the f= irst to ask a question and I don't like when people answer my questions wit= h theirs) looking at the results of "git grep", I'd say, it is hard to tell= . It appears #else-es' comments contain not-ted conditions, but the syntax = is not clear. Which one would you recommend? /* Not __BYTE_ORDER =3D=3D __BIG_ENDIAN */ /* !(__BYTE_ORDER =3D=3D __BIG_ENDIAN) */ /* __BYTE_ORDER !=3D __BIG_ENDIAN */ --=20 =C5=81ukasz Stelmach z podr=C3=B3=C5=BCy