Description: Code
#ifndef _FCNTL_H
#define _FCNTL_H 1
#include <features.h>
__BEGIN_DECLS
#include <bits/fcntl.h>
#ifdef __USE_XOPEN
# include <sys/stat.h>
#endif
#ifdef __USE_MISC
# ifndef R_OK
# define R_OK 4
# define W_OK 2
# define X_OK 1
# define F_OK 0
# endif
#endif
#ifdef __USE_XOPEN
# define SEEK_SET 0
# define SEEK_CUR 1
# define SEEK_END 2
#endif
extern int fcntl (int __fd, int __cmd, ...) __THROW;
#ifndef __USE_FILE_OFFSET64
extern int open (__const char *__file, int __oflag, ...) __THROW;
#else
# ifdef __REDIRECT
extern int __REDIRECT (open, (__const char *__file, int __oflag, ...) __THROW,
open64);
# else
# define open open64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int open64 (__const char *__file, int __oflag, ...) __THROW;
#endif
#ifndef __USE_FILE_OFFSET64
extern int creat (__const char *__file, __mode_t __mode) __THROW;
#else
# ifdef __REDIRECT
extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode) __THROW,
creat64);
# else
# define creat creat64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int creat64 (__const char *__file, __mode_t __mode) __THROW;
#endif
#if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
&& !defined __USE_POSIX))
# define F_ULOCK 0
# define F_LOCK 1
# define F_TLOCK 2
# define F_TEST 3
# ifndef __USE_FILE_OFFSET64
extern int lockf (int __fd, int __cmd, __off_t __len) __THROW;
# else
# ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW,
lockf64);
# else
# define lockf lockf64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW;
# endif
#endif
#ifdef __USE_XOPEN2K
# ifndef __USE_FILE_OFFSET64
extern int posix_fadvise (int __fd, __off_t __offset, size_t __len,
int __advise) __THROW;
# else
# ifdef __REDIRECT
extern int __REDIRECT (posix_fadvise, (int __fd, __off64_t __offset,
size_t __len, int __advise) __THROW,
posix_fadvise64);
# else
# define posix_fadvise posix_fadvise64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fadvise64 (int __fd, __off64_t __offset, size_t __len,
int __advise) __THROW;
# endif
# ifndef __USE_FILE_OFFSET64
extern int posix_fallocate (int __fd, __off_t __offset, size_t __len) __THROW;
# else
# ifdef __REDIRECT
extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
size_t __len) __THROW,
posix_fallocate64);
# else
# define posix_fallocate posix_fallocate64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fallocate64 (int __fd, __off64_t __offset, size_t __len)
__THROW;
# endif
#endif
__END_DECLS
#endif