* devctl.h missing extern C
@ 2020-02-10 16:10 Joel Sherrill
2020-02-13 21:28 ` Brian Inglis
0 siblings, 1 reply; 2+ messages in thread
From: Joel Sherrill @ 2020-02-10 16:10 UTC (permalink / raw)
To: Newlib
Hi
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.
Thanks.
--joel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: devctl.h missing extern C
2020-02-10 16:10 devctl.h missing extern C Joel Sherrill
@ 2020-02-13 21:28 ` Brian Inglis
0 siblings, 0 replies; 2+ messages in thread
From: Brian Inglis @ 2020-02-13 21:28 UTC (permalink / raw)
To: newlib
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-13 21:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 16:10 devctl.h missing extern C Joel Sherrill
2020-02-13 21:28 ` Brian Inglis
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).