/*
 *  smoke16/include/fcntl.h - Flags for SMOKE-16 open() and fcntl() calls
 *  $Revision: 1.2 $
 *  Copyright 1997, Benjamin Sittler
 *
 *  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.
 *
 */

#ifndef SMOKE16__FCNTL_H_INCLUDED
#define SMOKE16__FCNTL_H_INCLUDED

/* access type flags for open()/fcntl() */

#define SMOKE16_O_RDONLY	0x0000 /* open read-only */
#define SMOKE16_O_WRONLY	0x0001 /* open write-only */
#define SMOKE16_O_RDWR		0x0002 /* open read-write */
#define SMOKE16_O_NDELAY	0x0004 /* use non-blocking I/O */
#define SMOKE16_O_APPEND	0x0008 /* append to file if it exists */
#define SMOKE16_O_CREAT		0x0010 /* create file if it does not exist */
#define SMOKE16_O_TRUNC		0x0020 /* truncate file if it exists */
#define SMOKE16_O_NOCTTY	0x0040 /* if opening a tty, don't let it control us */
#define SMOKE16_O_EXCL		0x0080 /* exclusively lock file */
#define SMOKE16_O_SYNC		0x0100 /* direct (synchronous) I/O */

#ifndef O_RDONLY /* That is, this is the only fcntl.h */

/* from ANSI C */
#define O_RDONLY	SMOKE16_O_RDONLY
#define O_WRONLY	SMOKE16_O_WRONLY
#define O_RDWR		SMOKE16_O_RDWR
#define O_APPEND	SMOKE16_O_APPEND
#define O_CREAT		SMOKE16_O_CREAT
#define O_TRUNC		SMOKE16_O_TRUNC

/* from various UNIX-like systems */
#define O_NDELAY	SMOKE16_O_NDELAY
#define O_NONBLOCK	SMOKE16_O_NDELAY
#define O_EXCL		SMOKE16_O_EXCL
#define O_SYNC		SMOKE16_O_SYNC
#define O_DIRECT	SMOKE16_O_SYNC
#define O_NOCTTY	SMOKE16_O_NOCTTY

/* ignored; for MS-DOS source compatibility */
#define O_BINARY	0
#define O_TEXT		0

#endif /* ! defined(O_RDONLY) */

#endif /* ! defined(SMOKE16__FCNTL_H_INCLUDED) */
