Mercurial > hgrepos > hgweb.cgi > imapext
comparison src/osdep/unix/flockcyg.h @ 0:ada5e610ab86
imap-2007e
author | yuuji@gentei.org |
---|---|
date | Mon, 14 Sep 2009 15:17:45 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ada5e610ab86 |
---|---|
1 /* ======================================================================== | |
2 * Copyright 1988-2006 University of Washington | |
3 * | |
4 * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 * you may not use this file except in compliance with the License. | |
6 * You may obtain a copy of the License at | |
7 * | |
8 * http://www.apache.org/licenses/LICENSE-2.0 | |
9 * | |
10 * | |
11 * ======================================================================== | |
12 */ | |
13 | |
14 /* | |
15 * Program: flock() emulation via fcntl() locking | |
16 * | |
17 * Author: Mark Crispin | |
18 * Networks and Distributed Computing | |
19 * Computing & Communications | |
20 * University of Washington | |
21 * Administration Building, AG-44 | |
22 * Seattle, WA 98195 | |
23 * Internet: MRC@CAC.Washington.EDU | |
24 * | |
25 * Date: 10 April 2001 | |
26 * Last Edited: 30 August 2006 | |
27 */ | |
28 | |
29 /* Cygwin does not seem to have the design flaw in fcntl() locking that | |
30 * most other systems do (see flocksim.c for details). If some cretin | |
31 * decides to implement that design flaw, then Cygwin will have to use | |
32 * flocksim. Also, we don't test NFS either | |
33 */ | |
34 | |
35 | |
36 #define flock flocksim /* use ours instead of theirs */ | |
37 | |
38 #undef LOCK_SH | |
39 #define LOCK_SH 1 /* shared lock */ | |
40 #undef LOCK_EX | |
41 #define LOCK_EX 2 /* exclusive lock */ | |
42 #undef LOCK_NB | |
43 #define LOCK_NB 4 /* no blocking */ | |
44 #undef LOCK_UN | |
45 #define LOCK_UN 8 /* unlock */ | |
46 | |
47 | |
48 /* Function prototypes */ | |
49 | |
50 int flocksim (int fd,int operation); |