Improve const use in zlib-using code

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Improve const use in zlib-using code
Дата
Msg-id 33462926-bb1e-7cc9-8d92-d86318e8ed1d@eisentraut.org
обсуждение исходный текст
Ответы Re: Improve const use in zlib-using code  ("Tristan Partin" <tristan@neon.tech>)
Список pgsql-hackers
Now that we have effectively de-supported CentOS 6, by removing support 
for its OpenSSL version, I think we could also modernize the use of some 
other libraries, such as zlib.

If we define ZLIB_CONST before including zlib.h, zlib augments some
interfaces with const decorations.  By doing that we can keep our own
interfaces cleaner and can remove some unconstify calls.

ZLIB_CONST was introduced in zlib 1.2.5.2 (17 Dec 2011); CentOS 6 has 
zlib-1.2.3-29.el6.x86_64.

Note that if you use this patch and compile on CentOS 6, it still works, 
you just get a few compiler warnings about discarding qualifiers.  Old 
environments tend to produce more compiler warnings anyway, so this 
doesn't seem so bad.
Вложения

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

Предыдущее
От: Andrey Lepikhov
Дата:
Сообщение: Re: [PoC] Reducing planning time when tables have many partitions
Следующее
От: Yugo NAGATA
Дата:
Сообщение: Re: pgbnech: allow to cancel queries during benchmark