Re: include-file cleanup - Mailing list pgsql-hackers

From Tom Lane
Subject Re: include-file cleanup
Date
Msg-id 19088.932187118@sss.pgh.pa.us
Whole thread Raw
In response to Re: include-file cleanup  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: include-file cleanup
List pgsql-hackers
> 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.

OK, that sounds good.

The thing that bothers me is why config.h got removed from these
port files in the first place.  The compiler warning I got (because
I use gcc -Wmissing-prototypes) was that "random" and "srandom"
were defined without having been declared in any include file.
Now config.h provides prototypes for those functions --- inside
#ifdefs of course, but they are there.  Your script should have
noticed that the name "random" mentioned in config.h was also
mentioned in port/random.c, and therefore not removed the include
of config.h from random.c.  Why did it not make the connection?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: include-file cleanup
Next
From: Bruce Momjian
Date:
Subject: Re: include-file cleanup