diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2000-11-03 10:32:14 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-04 00:20:02 +0000 |
commit | 9d9004a9b2b7cfeace32230c040f124d0607259a (patch) | |
tree | 0cf651529d27bf0a78abd5481bed14f31785ca39 /Configure | |
parent | a318903f974eb7986b0c4d33f6d08004a0b9b551 (diff) | |
download | perl-9d9004a9b2b7cfeace32230c040f124d0607259a.tar.gz |
Add FCNTL_CAN_LOCK.
Subject: Re: [ID 20001030.011] Not OK: perl v5.7.0 +DEVEL7481 on VMS_AXP V7.1 (UNINSTALLED)
Message-ID: <Pine.SOL.4.10.10011031528090.29-100000@maxwell.phys.lafayette.edu>
Subject: Re: [ID 20001030.011] Not OK: perl v5.7.0 +DEVEL7481 on VMS_AXP V7.1 (UNINSTALLED)
From: Andy Dougherty <doughera@lafayette.edu>
In-Reply-To: <4.3.1.0.20001031222203.00b24b20@pop5.banet.net>
Message-ID: <Pine.SOL.4.10.10011031532170.29-100000@maxwell.phys.lafayette.edu>
p4raw-id: //depot/perl@7536
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 52 |
1 files changed, 51 insertions, 1 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Wed Nov 1 16:26:50 EET 2000 [metaconfig 3.0 PL70] +# Generated on Sat Nov 4 01:58:40 EET 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >/tmp/c1$$ <<EOF @@ -348,6 +348,7 @@ d_endsent='' d_fchmod='' d_fchown='' d_fcntl='' +d_fcntl_can_lock='' d_fd_macros='' d_fd_set='' d_fds_bits='' @@ -8848,6 +8849,54 @@ eval $inlibc set fcntl d_fcntl eval $inlibc +echo " " +: See if fcntl-based locking works. +$cat >try.c <<'EOCP' +#include <stdlib.h> +#include <unistd.h> +#include <fcntl.h> +int main() { +#if defined(F_SETLK) && defined(F_SETLKW) + struct flock flock; + int retval, fd; + fd = open("try.c", O_RDONLY); + flock.l_type = F_RDLCK; + flock.l_whence = SEEK_SET; + flock.l_start = flock.l_len = 0; + retval = fcntl(fd, F_SETLK, &flock); + close(fd); + (retval < 0 ? exit(2) : exit(0)); +#else + exit(2); +#endif +} +EOCP +echo "Checking if fcntl-based file locking works... " +case "$d_fcntl" in +"$define") + set try + if eval $compile_ok; then + if ./try; then + echo "Yes, it seems to work." + val="$define" + else + echo "Nope, it didn't work." + val="$undef" + fi + else + echo "I'm unable to compile the test program, so I'll assume not." + val="$undef" + fi + ;; +*) val="$undef"; + echo "Nope, since you don't even have fcntl()." + ;; +esac +set d_fcntl_can_lock +eval $setvar +$rm -f try* + + hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift; while $test $# -ge 2; do case "$1" in @@ -15470,6 +15519,7 @@ d_eunice='$d_eunice' d_fchmod='$d_fchmod' d_fchown='$d_fchown' d_fcntl='$d_fcntl' +d_fcntl_can_lock='$d_fcntl_can_lock' d_fd_macros='$d_fd_macros' d_fd_set='$d_fd_set' d_fds_bits='$d_fds_bits' |