diff options
| author | Tom Lane | 1998-10-06 02:31:42 +0000 |
|---|---|---|
| committer | Tom Lane | 1998-10-06 02:31:42 +0000 |
| commit | 9e23ab9b5c62ff048584ba3e5de646eff5017fca (patch) | |
| tree | 4175c983968b5339825f1a83c49bf066059cfcab /src/configure.in | |
| parent | 16c6545d5644354da1c7764f710d4de98e754df2 (diff) | |
Add configure test to make sure fcntl(SETLK) is available,
and make backend/libpq/pqcomm.c only try to lock the socket file when
the call exists. Also, change open-RDONLY to open-WRONLY; at least
on my platform, you can't get a write lock on a file you didn't open
for writing.
Diffstat (limited to 'src/configure.in')
| -rw-r--r-- | src/configure.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/configure.in b/src/configure.in index 1410d4c09f5..7b299662305 100644 --- a/src/configure.in +++ b/src/configure.in @@ -526,6 +526,15 @@ AC_TRY_LINK([#include <sys/types.h> [AC_DEFINE(HAVE_UNION_SEMUN) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) +AC_MSG_CHECKING(for fcntl(F_SETLK)) +AC_TRY_LINK([#include <fcntl.h>], + [struct flock lck; + lck.l_whence = SEEK_SET; lck.l_start = lck.l_len = 0; + lck.l_type = F_WRLCK; + fcntl(0, F_SETLK, &lck);], + [AC_DEFINE(HAVE_FCNTL_SETLK) AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + AC_MSG_CHECKING(for good DBL_MIN) AC_TRY_RUN([#include <stdlib.h> #include <math.h> |
