| От | Ewan Mellor |
|---|---|
| Тема | bool exported to user namespace |
| Дата | |
| Msg-id | 357C09BB.7D7BC1D7@nexus.co.uk обсуждение |
| Список | pgsql-hackers |
In interfaces/libpq/libpq-fe.h there is this well-meaning comment: /* * We can't use the conventional "bool", because we are designed to be * included in a user's program, and user may already have that type * defined. Pqbool, on the other hand, is unlikely to be used. */ Unfortunately, libpq-fe.h includes libpq/pgcomm.h, which in turn includes c.h, which defines the bool type. This causes me problems as the code I am working with also defines bool. Of c.h, the only section that pqcomm.h requires is section 3 (standard system types). What I have done locally, therefore, is to move that section into a new file (sys_types.h) and include that from pqcomm.h instead of c.h. Does this solution seem reasonable, or does anyone have a different idea about the way the include files should be arranged? If there are no objections, I can submit a patch if you want. Ewan Mellor.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера