home *** CD-ROM | disk | FTP | other *** search
- #ifndef _WRAPPER_FCNTL_H
- #define _WRAPPER_FCNTL_H 1
-
- /*
- * $Id: fcntl.h 1.3 2000/12/25 11:49:31 olsen Exp olsen $
- *
- * :ts=4
- *
- * AmigaOS wrapper routines for Samba 2.0.0, using the AmiTCP V3 API
- * and the SAS/C V6.58 compiler.
- *
- * Copyright (C) 1999-2000 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
- *
- * 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 2 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, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- /****************************************************************************/
-
- #include "include:fcntl.h"
-
- /* We are going to replace these few. */
- #undef creat
- #undef lseek
- #undef open
- #undef read
- #undef write
- #undef close
-
- /****************************************************************************/
-
- #include <sys/types.h>
-
- /* Advisory file segment locking data type -
- * information passed to system by user
- */
- struct flock
- {
- short l_type; /* lock type: read/write, etc. */
- short l_whence; /* type of l_start */
- off_t l_start; /* starting offset */
- off_t l_len; /* len = 0 means until end of file */
- pid_t l_pid; /* lock owner */
- };
-
- #define F_GETLK 100 /* get record locking information */
- #define F_SETLK 101 /* set record locking information */
- #define F_SETLKW 102 /* F_SETLK; wait if blocked */
-
- #define F_RDLCK 1 /* shared or read lock */
- #define F_UNLCK 2 /* unlock */
- #define F_WRLCK 3 /* exclusive or write lock */
-
- /****************************************************************************/
-
- #define O_NONBLOCK 4 /* no delay */
-
- /****************************************************************************/
-
- #endif /* _WRAPPER_FCNTL_H */
-