| От | Peter Eisentraut |
|---|---|
| Тема | Move MAXIMUM_ALIGNOF definition to c.h |
| Дата | |
| Msg-id | 58cedbc7-5658-468d-868e-a4d06de04ca6@eisentraut.org обсуждение исходный текст |
| Ответы |
Re: Move MAXIMUM_ALIGNOF definition to c.h
|
| Список | pgsql-hackers |
As suggested at [0], we can move the computation of MAXIMUM_ALIGNOF from configure.ac and meson.build to c.h. This eliminates code duplication. (For example, the AIX patch contemplates some changes, so it would be good to make those in only one place.) Also, it used to be more complicated, but now it's not really a computation anymore, it's just a #define and two static assertions, so it's just much easier and natural this way. (For example, doing a symbol lookup on MAXIMUM_ALIGNOF will take you to a place with useful context, instead of to pg_config.h.) The only trick is that the there are some ordering problems in c.h. MAXIMUM_ALIGNOF is used in the definition of the int128, which comes very early, before the alignment handling. I moved the int128 stuff to later in the file, near other types with alignment dependencies. (If you look closer, you will find other opportunities for a more comprehensive reshuffling in c.h, but maybe that should be a separate project.) [0]: https://www.postgresql.org/message-id/CA%2BhUKGLQUivg-NC7dHdbRAPmG0Hapg1gGnygM5KgDfDM2a_TMg%40mail.gmail.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера