diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-02 13:07:33 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-02 13:07:33 +0100 |
commit | da88c852dc91de8c8cfbe511844941cdaac2a577 (patch) | |
tree | 62ec6170697e75abc3f14e410383be32345afd68 /src/port/unistd.h | |
parent | e166237789f516eb8b231b132d30aebd2a6c9761 (diff) | |
download | wolfbones-da88c852dc91de8c8cfbe511844941cdaac2a577.tar.gz wolfbones-da88c852dc91de8c8cfbe511844941cdaac2a577.tar.bz2 |
cleanup in unistd.h and lockf
Diffstat (limited to 'src/port/unistd.h')
-rw-r--r-- | src/port/unistd.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/src/port/unistd.h b/src/port/unistd.h index 33be786..6a0bb91 100644 --- a/src/port/unistd.h +++ b/src/port/unistd.h @@ -1,12 +1,44 @@ +/* + Copyright (C) 2008 Andreas Baumann <abaumann@yahoo.com> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + #ifndef __UNISTD_H #define __UNISTD_H -#include "port/sys.h" +#include "port/sys_internal.h" #include <unistd.h> +#if !defined HAVE_LOCKF || defined TEST_LOCKF + +#include <sys/types.h> /* for off_t */ +#include <fcntl.h> /* for F_XXX constants */ + +#if !defined F_ULOCK +#define F_ULOCK 0 /* Unlock a previously locked region */ +#define F_LOCK 1 /* Lock exclusively */ +#define F_TLOCK 2 /* Test and lock exclusively */ +#define F_TEST 3 /* Test for a locked region */ +#endif + +extern int wolf_port_lockf( int fd, int cmd, off_t len ); #if !defined HAVE_LOCKF -#include "port/lockf.h" +#define lockf( fd, cmd, len ) wolf_port_lockf( fd, cmd, len ) #endif +#endif /* !defined HAVE_LOCKF || defined TEST_LOCKF */ + #endif /* ifndef __UNISTD_H */ |