lock_exnb.c
changeset 0 068428edee47
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lock_exnb.c	Fri Oct 19 14:06:22 2007 +0200
@@ -0,0 +1,11 @@
+#include <sys/types.h>
+#include <sys/file.h>
+#include <fcntl.h>
+#include "hasflock.h"
+#include "lock.h"
+
+#ifdef HASFLOCK
+int lock_exnb(fd) int fd; { return flock(fd,LOCK_EX | LOCK_NB); }
+#else
+int lock_exnb(fd) int fd; { return lockf(fd,2,0); }
+#endif