Re: include-file cleanup

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

> It took a little work to recompile after the include-file cleanups :-(.
> You got overenthusiastic about removing #includes, apparently.
> I have checked in changes for the ones that caused compile failures
> or warnings here, but there may be more.

I have reviewed and replaced config.h in all files it appeared in in
6.5, where postgres.h or c.h were not already included. I have also
removed config.h from the cleaning script, just as postgres.h was never
removed.

I imagine running this only every year or two.

> One thing that particularly disturbs me is that "config.h" was removed
> from some of the files in src/backend/port/. I had to put this back
> in the ones used on my platform. I didn't touch anything I didn't get
> a warning from, but I would strongly counsel making sure that config.h
> still gets included *everywhere*, even if it doesn't seem necessary.

I put them all back in the port/ directory. This is also the reason I
did not change any of the system includes, because different OS's need
different includes.

> Failing to do so may cause subtle problems due to #define symbols not
> being defined where they should be or prototypes not being visible that
> should be. This is especially dangerous in platform-specific code.

Yes, I know I fixed a number of places where tests were made before
postgres.h/c.h/config.h were included.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-07-17 04:51:58 Re: include-file cleanup
Previous Message Wayne Piekarski 1999-07-17 03:40:04 Fix up for BTP_CHAIN problems