unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Zack Weinberg <zackw@panix.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH v4] Use a proper C tokenizer to implement the obsolete typedefs test.
Date: Mon, 11 Mar 2019 23:47:44 -0400	[thread overview]
Message-ID: <f1d09baf-1082-846d-ce82-6f800df50ec6@redhat.com> (raw)
In-Reply-To: <CAKCAbMg-iK8MPRizK=eaWHZaZG293D6ynbnJEsZqJxiAq9Zjow@mail.gmail.com>

On 3/11/19 8:59 PM, Zack Weinberg wrote:
> On Mon, Mar 11, 2019 at 2:57 PM Carlos O'Donell <carlos@redhat.com> wrote:
>>>       * scripts/check-obsolete-constructs.py: New test script.
>>>         * scripts/check-installed-headers.sh: Remove tests for
>>>         obsolete typedefs, superseded by check-obsolete-constructs.py.
>>>         * Rules: Run scripts/check-obsolete-constructs.py over $(headers)
>>>         as a special test.  Update commentary.
>>>         * posix/bits/types.h (__SQUAD_TYPE, __S64_TYPE): Define as __int64_t.
>>>         (__UQUAD_TYPE, __U64_TYPE): Define as __uint64_t.
>>>         Update commentary.
>>>         * posix/sys/types.h (__u_intN_t): Remove.
>>>         (u_int8_t): Typedef using __uint8_t.
>>>         (u_int16_t): Typedef using __uint16_t.
>>>         (u_int32_t): Typedef using __uint32_t.
>>>         (u_int64_t): Typedef using __uint64_t.
>>
>> OK for master if you:
>> - Fix the conditional in check-installed-headers.sh.
>>
>> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> 
> Is it now the convention that we put Reviewed-by: lines into the final
> commit message, or just that we say that on the mailing list?

Please ad the reviewed-by lines into the final commit message.

I would like to see this become the way in which we more accurately
track reviewer participation and highlight the value of reviewers
to everyone investing in glibc.

>>>              if $cc_cmd -fsyntax-only $lang_mode "$cih_test_c" 2>&1
>>> -            then
>>> -                includes=$($cc_cmd -fsyntax-only -H $lang_mode \
>>> -                              "$cih_test_c" 2>&1 | sed -ne 's/^[.][.]* //p')
>>> -                for h in $includes; do
>>> -                    # Don't repeat work.
>>> -                    eval 'case "$h" in ('"$already"') continue;; esac'
>>> -
>>> -                    if grep -qE "$obsolete_type_re" "$h"; then
>>> -                        echo "*** Obsolete types detected:"
>>> -                        grep -HE "$obsolete_type_re" "$h"
>>> -                        failed=1
>>> -                    fi
>>> -                    already="$already|$h"
>>> -                done
>>> -            else
>>> -                failed=1
>>> +            then :
>>> +            else failed=1
>>
>> Why not 'if ! $cc_cmd ...' ? Which avoids the odd empty if block e.g. ":".
> 
> `if ! ...` is not portable shell, despite being included in the POSIX
> shell language.  See
> https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Builtins.html
> (under `!`) `if command_1; then :; else command_2; fi` is the
> alternative idiom I learned back in the days of SunOS 4.

Holy snicker doodles. #TIL.

> Possibly `if ! ...` is portable enough for this script, but I try not
> to think about whether semi-portable shell constructs are portable
> enough for the current script.
> 
> Do you still want me to change it?

No.

-- 
Cheers,
Carlos.

  reply	other threads:[~2019-03-12  3:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 14:59 [PATCH v4] Use a proper C tokenizer to implement the obsolete typedefs test Zack Weinberg
2019-03-11 18:57 ` Carlos O'Donell
2019-03-12  0:59   ` Zack Weinberg
2019-03-12  3:47     ` Carlos O'Donell [this message]
2019-03-13 13:47       ` Zack Weinberg
2019-03-13 22:16         ` Joseph Myers
2019-03-14 13:00           ` Carlos O'Donell
2019-03-14 13:21             ` Zack Weinberg
2019-03-14 18:06               ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1d09baf-1082-846d-ce82-6f800df50ec6@redhat.com \
    --to=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=zackw@panix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).