Re: [HACKERS] Re: include-file cleanup
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] Re: include-file cleanup |
Дата | |
Msg-id | 19759.932224907@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: include-file cleanup (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] Re: include-file cleanup
|
Список | pgsql-hackers |
Bruce Momjian <maillist@candle.pha.pa.us> writes: >> 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)); Ah, well there is the problem: you are (in effect) assuming that if stdlib.h defines random() on your platform, then it does so on everyone's platform. If that were true, we'd not need port/random.c... I think your script ought to be set up to ignore system headers completely, and only look at our own headers to determine which symbols are defined where. In theory, only config.h and c.h should contain any substitutes for system-header symbols, so if you explicitly exclude those two from removal then there should be no portability issue. But I'd be happier if you changed the script so that its decisions are not affected by the contents of system headers. regards, tom lane
В списке pgsql-hackers по дате отправления: