Patch to include c.h - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Patch to include c.h
Date
Msg-id CABwTF4VssPvF8rOP-u1BJ6KTQVgVxnNAza5VtO2Hg1HN1L440A@mail.gmail.com
Whole thread Raw
Responses Re: Patch to include c.h
List pgsql-hackers
I noticed that xlog.h uses PGDLLIMPORT, but it does not include c.h directly or indirectly. Also, in timestamp.h different code is enabled depending on HAVE_INT64_TMESTAMP being defined, but even though that macro is defined in pg_config.h, it does not automatically trickle down into this file, as it is supposed to.

Apparently all .c files manage to include c.h (directly or indirectly) before including these files, so the compilers do the right thing. But I caught these since I tried using an IDE, and it grays out sections to, or shows error-markers when it doesn't find a macro included directly or indirectly.

I vaguely remember a discussion where (I think) Bruce mentioned that we do or intend to do some kind of compilability check on individual h files. DO we have something in place to catch such things? I am sure there are many other places where such inclusions are omitted, but these are the ones I found on my first attempts to use this IDE.

Best regards,
--

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.
Next
From: Andres Freund
Date:
Subject: Re: embedded list v2