At 9:15 PM -0500 10/31/00, Andy Dougherty wrote:
>  > >On Tue, 31 Oct 2000, Andy Dougherty wrote:
>>  >
>  > >> Hmm.  Sounds like we need a d_fcntl_can_lock Configure variable.
>  > >> Then VMS and DOS/DJGPP could set that to undef.
>
>I'll try to get around to handling the Configure end with at least a dummy
>test in the next couple of days.  Feel free to remind me if I don't
>actually get around to it.

Thanks.  Should this be one of those try.c tests?  That could take
care of Peter Farley's concern that the functionality not be
unnecessarily disabled if it becomes available.  Something like the
following might work if Configure can check the exit status.  This
fails appropriately on VMS but I don't have anywhere to test for
success.


#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("manifest", 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
}

-- 
____________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

Reply via email to