head	1.1;
access;
symbols
	V1_12:1.1
	V1_11:1.1
	V1_10:1.1
	V1_9:1.1
	V1_8:1.1
	V1_7:1.1
	V1_6:1.1
	V1_5:1.1
	V1_4:1.1
	V1_3:1.1
	V1_2:1.1
	V1_1:1.1;
locks
	olsen:1.1; strict;
comment	@ * @;


1.1
date	99.02.12.10.58.55;	author olsen;	state Exp;
branches;
next	;


desc
@.
@


1.1
log
@.
@
text
@#ifndef _WRAPPER_FCNTL_H
#define _WRAPPER_FCNTL_H 1

/*
 * $Id: fcntl.h 1.1 1999/02/12 10:58:55 olsen Exp olsen $
 *
 * :ts=4
 *
 * AmigaOS wrapper routines for Samba 2.0.0, using the AmiTCP V4 API
 * and the SAS/C V6.58 compiler.
 *
 * Copyright (C) 1999 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 */
@
