Re: include-file cleanup

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: include-file cleanup
Дата
Msg-id 199907170509.BAA22868@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: include-file cleanup  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Re: include-file cleanup  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: include-file cleanup
Следующее
От: "Roberto Colmegna"
Дата:
Сообщение: PostGress Table Split