flock replacement

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2690 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-08-01 16:18:48 +00:00
parent 9ff39f750b
commit ce7be18043
2 changed files with 34 additions and 0 deletions

View File

@@ -222,6 +222,23 @@ int rcmd(char **ahost, unsigned short inport, const char *locuser,
const char *remuser, const char *cmd, int *fd2p);
#endif
#ifndef HAVE_FLOCK
#ifndef LOCK_SH
#define LOCK_SH 1 /* Shared lock */
#endif
#ifndef LOCK_EX
#define LOCK_EX 2 /* Exclusive lock */
#endif
#ifndef LOCK_NB
#define LOCK_NB 4 /* Don't block when locking */
#endif
#ifndef LOCK_UN
#define LOCK_UN 8 /* Unlock */
#endif
int flock(int fd, int operation);
#endif /* HAVE_FLOCK */
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>

View File

@@ -222,6 +222,23 @@ int rcmd(char **ahost, unsigned short inport, const char *locuser,
const char *remuser, const char *cmd, int *fd2p);
#endif
#ifndef HAVE_FLOCK
#ifndef LOCK_SH
#define LOCK_SH 1 /* Shared lock */
#endif
#ifndef LOCK_EX
#define LOCK_EX 2 /* Exclusive lock */
#endif
#ifndef LOCK_NB
#define LOCK_NB 4 /* Don't block when locking */
#endif
#ifndef LOCK_UN
#define LOCK_UN 8 /* Unlock */
#endif
int flock(int fd, int operation);
#endif /* HAVE_FLOCK */
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>