1 #include "ruby/config.h" 5 #elif defined HAVE_FCNTL && defined HAVE_FCNTL_H && !defined(__native_client__) 28 flock(
int fd,
int operation)
34 lock.l_type = F_RDLCK;
37 lock.l_type = F_WRLCK;
40 lock.l_type = F_UNLCK;
47 lock.l_start = lock.l_len = 0L;
49 return fcntl(fd, (operation &
LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
52 #elif defined(HAVE_LOCKF) 93 flock(
int fd,
int operation)
103 return lockf (fd, F_LOCK, 0);
111 return lockf (fd, F_TLOCK, 0);
115 return lockf (fd, F_ULOCK, 0);
int flock(int fd, int operation)
void rb_notimplement(void)