2 * Copyright (c) 1996 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
6 static int _flock_dummy;
8 # if defined( sun ) && defined( __svr4__ )
10 #include <sys/types.h>
14 #include </usr/ucbinclude/sys/file.h>
16 int flock( fd, operation )
23 if ( operation & LOCK_NB ) {
29 if ( operation & LOCK_EX ) {
33 if ( operation & LOCK_SH ) {
37 if ( operation & LOCK_UN ) {
45 if (( rc = fcntl( fd, F_SETLK, &l )) < 0 ) {
46 if ( errno == EAGAIN || errno == EACCES ) {