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