From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: newlib@sourceware.org
Subject: Re: devctl.h missing extern C
Date: Thu, 13 Feb 2020 21:28:00 -0000 [thread overview]
Message-ID: <3e1fceff-4dd0-f4b6-8faa-6ff59b96dac1@SystematicSw.ab.ca> (raw)
In-Reply-To: <CAF9ehCVKg9vUSoF7+Mp1uU7DD2PwFnkwFsGwvh3oKjqUv=hhXw@mail.gmail.com>
On 2020-02-10 09:10, Joel Sherrill wrote:
> I noticed devctl.h is missing extern C. Does newlib have rules
> on where they go? In stdio.h they were deeper in the file than
> my normal style.
>
> Obviously, I will be following up shortly with a patch.
Many headers now include _ansi.h which defines _{BEGIN,END}_STD_C and use those:
at the start after the include guard and setup (conditional) feature tests and
sets, and includes, before any functional declarations or definitions; and at
the end before SSP features tests and includes.
Others may have a __cplusplus test right after the include guard test, before
the include guard symbol definition; and the closing brace right before the
guard endif; otherwise as with the macros above.
You can get a sense of the usage with:
$ egrep -C3 __cplusplus newlib/**/include/**/*.h
$ egrep -C3 '_ansi\.h|_(BEGIN|END)_STD_C' newlib/**/include/**/*.h
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
prev parent reply other threads:[~2020-02-13 21:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 16:10 Joel Sherrill
2020-02-13 21:28 ` Brian Inglis [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e1fceff-4dd0-f4b6-8faa-6ff59b96dac1@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=newlib@sourceware.org \
/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).