Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #104086
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <kst-u@mib.org> |
| Newsgroups | comp.lang.c |
| Subject | Re: Standard Headers |
| Date | Fri, 17 Feb 2017 12:27:52 -0800 |
| Organization | None to speak of |
| Lines | 28 |
| Message-ID | <lnefywpnp3.fsf@kst-u.example.com> (permalink) |
| References | <o878ij$840$1@dont-email.me> <lnino8pw3y.fsf@kst-u.example.com> <o87d7a$r22$1@dont-email.me> <4dd9eb2c-684d-4d93-84f3-039a3247625b@googlegroups.com> <o87g88$6jh$1@dont-email.me> <20170217195405.58a5e1b7a9384bc637d922ca@gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | mx02.eternal-september.org; posting-host="3490c05baafeea877b77d6bc7baf0dff"; logging-data="13064"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zvuCNwKdLk2KnLF8vAfzo" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
| Cancel-Lock | sha1:bWfkMcfXK8CMnmLMqACWBd3E/U4= sha1:oaEsv9StMm4D/mLbwkhMGOlfGUs= |
| Xref | csiph.com comp.lang.c:104086 |
Show key headers only | View raw
GOTHIER Nathan <nathan.gothier@gmail.com> writes:
> On Fri, 17 Feb 2017 18:45:05 +0000
> BartC <bc@freeuk.com> wrote:
>> Perhaps they could all have been extracted into their own common header.
>>
>> (Or even, as I suggested some years ago, just have one giant header for
>> everything. Then most #ifs would disappear.)
>
> The common header for NULL (and other definitions) is <stddef.h>. The
> fact that NULL is defined in other headers can be the result of the
> <stddef.h> inclusion.
No, standard headers may not include each other (or must behave as
if they do not include each other) unless specifically permitted
or required to do so.
For example, NULL and size_t are defined in both <stddef.h> and
<stdio.h> (and in some other standard headers), but <stdio.h> may
not simply include <stddef.h>. The declarations that are required
for both headers are *only* those that are required for <stdio.h>
-- for example setvbuf() has a parameter of type size_t. <stdio.h>
may not define the offsetof() macro, either directly or indirectly.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Standard Headers BartC <bc@freeuk.com> - 2017-02-17 16:34 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-17 08:50 -0800
Re: Standard Headers luser droog <luser.droog@gmail.com> - 2017-02-17 09:08 -0800
Re: Standard Headers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-17 20:31 +0000
Re: Standard Headers GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-17 18:09 +0100
Re: Standard Headers "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-02-17 09:18 -0800
Re: Standard Headers Keith Thompson <kst-u@mib.org> - 2017-02-17 09:26 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-17 17:53 +0000
Re: Standard Headers me <crisdunbar@gmail.com> - 2017-02-17 10:23 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-17 18:45 +0000
Re: Standard Headers GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-17 19:54 +0100
Re: Standard Headers Keith Thompson <kst-u@mib.org> - 2017-02-17 12:27 -0800
Re: Standard Headers jameskuyper@verizon.net - 2017-02-17 11:38 -0800
Re: Standard Headers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-17 20:49 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-17 13:29 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-17 22:13 +0000
Re: Standard Headers Nick Bowler <nbowler@draconx.ca> - 2017-02-17 22:28 +0000
Re: Standard Headers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-18 02:48 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-18 10:26 -0800
Re: Standard Headers bart4858@gmail.com - 2017-02-18 11:08 -0800
Re: Standard Headers supercat@casperkitty.com - 2017-02-18 11:45 -0800
Re: Standard Headers Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-19 13:45 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-19 22:39 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-19 16:00 -0800
csiph-web