postgresql/src/include/port
Tom Lane 868b39a544 Fix build breakage on Solaris-alikes with late-model GCC.
Solaris has never bothered to add "const" to the second argument
of PAM conversation procs, as all other Unixen did decades ago.
This resulted in an "incompatible pointer" compiler warning when
building --with-pam, but had no more serious effect than that,
so we never did anything about it.  However, as of GCC 14 the
case is an error not warning by default.

To complicate matters, recent OpenIndiana (and maybe illumos
in general?) *does* supply the "const" by default, so we can't
just assume that platforms using our solaris template need help.

What we can do, short of building a configure-time probe,
is to make solaris.h #define _PAM_LEGACY_NONCONST, which
causes OpenIndiana's pam_appl.h to revert to the traditional
definition, and hopefully will have no effect anywhere else.
Then we can use that same symbol to control whether we include
"const" in the declaration of pam_passwd_conv_proc().

Bug: #18995
Reported-by: Andrew Watkins <awatkins1966@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/18995-82058da9ab4337a7@postgresql.org
Backpatch-through: 13
2025-07-23 15:44:29 -04:00
..
atomics Fix fallback implementation for pg_atomic_test_set_flag(). 2023-11-15 15:04:39 -06:00
win32 Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
win32_msvc windows: msvc: Define STDIN/OUT/ERR_FILENO. 2023-10-17 16:11:03 -05:00
aix.h Attempt to work around a 32bit xlc compiler bug from a different place. 2015-08-08 01:19:02 +02:00
atomics.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
cygwin.h Remove obsolete cygwin.h hack 2020-08-15 11:27:41 +02:00
darwin.h Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
freebsd.h Default to wal_sync_method=fdatasync on FreeBSD. 2021-02-15 16:04:59 +13:00
hpux.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
linux.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
netbsd.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
openbsd.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pg_bitutils.h Get rid of artificial restriction on hash table sizes on Windows. 2021-07-25 14:02:27 -04:00
pg_bswap.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_crc32c.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_iovec.h Probe for preadv/pwritev in a more macOS-friendly way. 2021-07-12 19:17:35 -04:00
pg_pthread.h Add missing pthread_barrier_t. 2021-03-10 17:44:04 +13:00
solaris.h Fix build breakage on Solaris-alikes with late-model GCC. 2025-07-23 15:44:29 -04:00
win32.h Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
win32_port.h Provide 64-bit ftruncate() and lseek() on Windows. 2025-01-09 14:57:52 +13:00
win32ntdll.h Add missing include guard to win32ntdll.h. 2024-11-08 09:35:45 +10:30