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 05:09:21
Message-ID: 199907170509.BAA22868@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Because the random prototype is in stdlib.h in BSD/OS, and that file was
already #included. Seems it must be in another file in your OS.

stdlib.h:168: long random __P((void));

--
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 Roberto Colmegna 1999-07-17 05:27:26 PostGress Table Split
Previous Message Tom Lane 1999-07-17 04:51:58 Re: include-file cleanup