Re: [HACKERS] Re: include-file cleanup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: include-file cleanup
Дата
Msg-id 25717.932248292@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: include-file cleanup  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Re: include-file cleanup  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> The problem is that we include system includes first.  Are there any
> system includes that require stdlib to be included first?

If so, they are supposed to include it for themselves.

Note: you can't really include ALL sys headers first, since some of them
need to be included conditionally, and the condition symbols are coming
from config.h...

> I have removed the duplicate system headers when postgres.h is included,
> and have added string.h and stdio.h to c.h, and have removed those from
> the files.  Now, many C files have _no_ system includes, because they
> come from postgres.h including c.h.

Sounds pretty good.

>> Also, I think some places include c.h without having included
>> postgres.h.  These should be checked to ensure that config.h has
>> been included first --- c.h depends on configuration symbols from
>> config.h to work properly.
>
> postgres.h include c.h, and config.h _now_ includes c.h.

OK, so then no .c files should be including c.h directly anymore?
Everything should include either postgres.h, or config.h if it's
not tightly tied to the system?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Merging old man pages
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: include-file cleanup