Re: [HACKERS] Re: include-file cleanup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: include-file cleanup
Date: 1999-07-17 17:56:11
Message-ID: 20447.932234171@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A further thought on the include-file cleanup: although you are right to
be wary of removing includes of system files, it would be a good idea to
remove *redundant* includes of system files.

In particular, since c.h includes <stdlib.h>, as well as <stddef.h>
and <stdarg.h> if they exist, it should not be necessary for any file
that includes c.h (either directly or via postgres.h) to pull these
in for itself. Removing the "retail" inclusions of these files that
are found in many source files would make life much easier for anyone
trying to port to a platform where they don't exist...

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.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-07-17 19:13:41 Re: [HACKERS] Re: include-file cleanup
Previous Message Tom Lane 1999-07-17 17:22:01 Re: [HACKERS] Merging old man pages