mirror of
https://github.com/postgres/postgres.git
synced 2026-04-26 16:48:14 -04:00
Testing on CI showed that Cygwin's semctl() can fail with EAGAIN (possibly due to resource limits in cygserver that could be tuned, not examined). Switch to so-called POSIX semaphores instead, which don't seem to fail in that way (possibly due to a more direct implementation using Windows semaphore primitives instead of talking to cygserver, based on a cursory glance at the source). Other known problems still prevent PostgreSQL from running on Cygwin without random crashes, but this rarer problem was noticed while testing. Discussion: https://postgr.es/m/CA%2BhUKG%2BQ6DU4Ov9LrvUyDcF3oHS4KMRVSKmVGaeePq-kOyG9gA%40mail.gmail.com
22 lines
717 B
Text
22 lines
717 B
Text
# src/template/cygwin
|
|
|
|
# Prefer unnamed POSIX semaphores if available, unless user overrides choice
|
|
if test x"$PREFERRED_SEMAPHORES" = x"" ; then
|
|
PREFERRED_SEMAPHORES=UNNAMED_POSIX
|
|
fi
|
|
|
|
SRCH_LIB="/usr/local/lib"
|
|
|
|
# This is required for ppoll(2), and perhaps other things
|
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
|
|
|
# Extra CFLAGS for code that will go into a shared library
|
|
CFLAGS_SL=""
|
|
|
|
# --allow-multiple-definition is required to link pg_dump because it finds
|
|
# pg_toupper() etc. in both libpq and pgport
|
|
# we'd prefer to use --disable-auto-import to match MSVC linking behavior,
|
|
# but support for it in Cygwin is too haphazard
|
|
LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition -Wl,--enable-auto-import"
|
|
|
|
DLSUFFIX=".dll"
|