/* fcntl.h (libExt+gcc): $Id: fcntl.h,v 1.2 2000/07/29 09:01:02 amai Exp $*/

#ifndef _FCNTL_H
#define _FCNTL_H

#include <sys/fcntl.h>

#if defined (__cplusplus)
extern "C" {
#endif

extern int creat(__const__ char *, int);
extern int fcntl(int, int, ...);
extern int open(__const__ char *, int, ...);

#if !defined (_POSIX_SOURCE)
extern int flock (int, int);
#endif

#if (!defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && \
     !defined(_XOPEN_SOURCE)) || \
    (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE_EXTENDED - 0 == 1)
#ifndef F_ULOCK
#define F_ULOCK         0
#define F_LOCK          1
#define F_TLOCK         2
#define F_TEST          3
#endif
extern int lockf(int,int,off_t);
#endif /* (!defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)) || ... */

#if !defined (_POSIX_SOURCE) || defined (_WITH_UNDERSCORE)
int _creat (__const__ char *, int);
int _fcntl (int, int, ...);
int _flock (int, int);
int _open (__const__ char *, int, ...);
#endif


#if defined (__cplusplus)
}
#endif

#endif /* not _FCNTL_H */
