/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2016 Gary Mills
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#ifndef __SYS_FCNTLCOM_H
#define __SYS_FCNTLCOM_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Rewack the FXXXXX values as _FXXXX so that _POSIX_SOURCE works.
*/
/*
* Flag values for open(2) and fcntl(2)
* The kernel adds 1 to the open modes to turn it into some
* combination of FREAD and FWRITE.
*/
/* O_SYNC _FSYNC not posix, defined below */
#ifndef _POSIX_SOURCE
/*
* Flags that work for fcntl(fd, F_SETFL, FXXXX)
*/
/*
* Flags that are disallowed for fcntl's (FCNTLCANT);
* used for opens, internal state, or locking.
*/
/*
* The rest of the flags, used only for opens
*/
#endif /* !_POSIX_SOURCE */
/* XXX close on exec request; must match UF_EXCLOSE in user.h */
/* fcntl(2) requests */
#ifndef _POSIX_SOURCE
#endif /* !_POSIX_SOURCE */
#ifndef _POSIX_SOURCE
#endif /* !_POSIX_SOURCE */
/* Needed by flock.c */
/* fcntl(2) flags (l_type field of flock structure) */
#ifndef _POSIX_SOURCE
#endif /* !_POSIX_SOURCE */
/* needed for _syscall(SYS_openat, AT_FDCWD, ...) */
#include <sys/stdtypes.h>
/* file segment locking set data type - information passed to system by user */
struct flock {
};
#ifndef _POSIX_SOURCE
/* extended file segment locking set data type */
struct eflock {
};
#endif /* !_POSIX_SOURCE */
#ifndef KERNEL
int open(/* char *path, int flags, mode_t modes */);
int creat(/* char *path, mode_t modes */);
int fcntl(/* int fd, cmd, ... */);
#endif /* !KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* __SYS_FCNTLCOM_H */