Blame sysdeps/unix/sysv/linux/bits/fcntl-linux.h

Packit 6c4009
/* O_*, F_*, FD_* bit values for Linux.
Packit 6c4009
   Copyright (C) 2001-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef	_FCNTL_H
Packit 6c4009
# error "Never use <bits/fcntl-linux.h> directly; include <fcntl.h> instead."
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* This file contains shared definitions between Linux architectures
Packit 6c4009
   and is included by <bits/fcntl.h> to declare them.  The various
Packit 6c4009
   #ifndef cases allow the architecture specific file to define those
Packit 6c4009
   values with different values.
Packit 6c4009
Packit 6c4009
   A minimal <bits/fcntl.h> contains just:
Packit 6c4009
Packit 6c4009
   struct flock {...}
Packit 6c4009
   #ifdef __USE_LARGEFILE64
Packit 6c4009
   struct flock64 {...}
Packit 6c4009
   #endif
Packit 6c4009
   #include <bits/fcntl-linux.h>
Packit 6c4009
*/
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
# include <bits/types/struct_iovec.h>
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* open/fcntl.  */
Packit 6c4009
#define O_ACCMODE	   0003
Packit 6c4009
#define O_RDONLY	     00
Packit 6c4009
#define O_WRONLY	     01
Packit 6c4009
#define O_RDWR		     02
Packit 6c4009
#ifndef O_CREAT
Packit 6c4009
# define O_CREAT	   0100	/* Not fcntl.  */
Packit 6c4009
#endif
Packit 6c4009
#ifndef O_EXCL
Packit 6c4009
# define O_EXCL		   0200	/* Not fcntl.  */
Packit 6c4009
#endif
Packit 6c4009
#ifndef O_NOCTTY
Packit 6c4009
# define O_NOCTTY	   0400	/* Not fcntl.  */
Packit 6c4009
#endif
Packit 6c4009
#ifndef O_TRUNC
Packit 6c4009
# define O_TRUNC	  01000	/* Not fcntl.  */
Packit 6c4009
#endif
Packit 6c4009
#ifndef O_APPEND
Packit 6c4009
# define O_APPEND	  02000
Packit 6c4009
#endif
Packit 6c4009
#ifndef O_NONBLOCK
Packit 6c4009
# define O_NONBLOCK	  04000
Packit 6c4009
#endif
Packit 6c4009
#ifndef O_NDELAY
Packit 6c4009
# define O_NDELAY	O_NONBLOCK
Packit 6c4009
#endif
Packit 6c4009
#ifndef O_SYNC
Packit 6c4009
# define O_SYNC	       04010000
Packit 6c4009
#endif
Packit 6c4009
#define O_FSYNC		O_SYNC
Packit 6c4009
#ifndef O_ASYNC
Packit 6c4009
# define O_ASYNC	 020000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_LARGEFILE
Packit 6c4009
# define __O_LARGEFILE	0100000
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifndef __O_DIRECTORY
Packit 6c4009
# define __O_DIRECTORY	0200000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_NOFOLLOW
Packit 6c4009
# define __O_NOFOLLOW	0400000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_CLOEXEC
Packit 6c4009
# define __O_CLOEXEC   02000000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_DIRECT
Packit 6c4009
# define __O_DIRECT	 040000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_NOATIME
Packit 6c4009
# define __O_NOATIME   01000000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_PATH
Packit 6c4009
# define __O_PATH     010000000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_DSYNC
Packit 6c4009
# define __O_DSYNC	 010000
Packit 6c4009
#endif
Packit 6c4009
#ifndef __O_TMPFILE
Packit 6c4009
# define __O_TMPFILE   (020000000 | __O_DIRECTORY)
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifndef F_GETLK
Packit 6c4009
# ifndef __USE_FILE_OFFSET64
Packit 6c4009
#  define F_GETLK	5	/* Get record locking info.  */
Packit 6c4009
#  define F_SETLK	6	/* Set record locking info (non-blocking).  */
Packit 6c4009
#  define F_SETLKW	7	/* Set record locking info (blocking).  */
Packit 6c4009
# else
Packit 6c4009
#  define F_GETLK	F_GETLK64  /* Get record locking info.  */
Packit 6c4009
#  define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
Packit 6c4009
#  define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
#ifndef F_GETLK64
Packit 6c4009
# define F_GETLK64	12	/* Get record locking info.  */
Packit 6c4009
# define F_SETLK64	13	/* Set record locking info (non-blocking).  */
Packit 6c4009
# define F_SETLKW64	14	/* Set record locking info (blocking).  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* open file description locks.
Packit 6c4009
Packit 6c4009
   Usually record locks held by a process are released on *any* close and are
Packit 6c4009
   not inherited across a fork.
Packit 6c4009
Packit 6c4009
   These cmd values will set locks that conflict with process-associated record
Packit 6c4009
   locks, but are "owned" by the opened file description, not the process.
Packit 6c4009
   This means that they are inherited across fork or clone with CLONE_FILES
Packit 6c4009
   like BSD (flock) locks, and they are only released automatically when the
Packit 6c4009
   last reference to the the file description against which they were acquired
Packit 6c4009
   is put. */
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
# define F_OFD_GETLK	36
Packit 6c4009
# define F_OFD_SETLK	37
Packit 6c4009
# define F_OFD_SETLKW	38
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_LARGEFILE64
Packit 6c4009
# define O_LARGEFILE __O_LARGEFILE
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_XOPEN2K8
Packit 6c4009
# define O_DIRECTORY	__O_DIRECTORY	/* Must be a directory.  */
Packit 6c4009
# define O_NOFOLLOW	__O_NOFOLLOW	/* Do not follow links.  */
Packit 6c4009
# define O_CLOEXEC	__O_CLOEXEC	/* Set close_on_exec.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
# define O_DIRECT	__O_DIRECT	/* Direct disk access.  */
Packit 6c4009
# define O_NOATIME	__O_NOATIME	/* Do not set atime.  */
Packit 6c4009
# define O_PATH		__O_PATH	/* Resolve pathname but do not open file.  */
Packit 6c4009
# define O_TMPFILE	__O_TMPFILE	/* Atomically create nameless file.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* For now, Linux has no separate synchronicity options for read
Packit 6c4009
   operations.  We define O_RSYNC therefore as the same as O_SYNC
Packit 6c4009
   since this is a superset.  */
Packit 6c4009
#if defined __USE_POSIX199309 || defined __USE_UNIX98
Packit 6c4009
# define O_DSYNC	__O_DSYNC	/* Synchronize data.  */
Packit 6c4009
# if defined __O_RSYNC
Packit 6c4009
#  define O_RSYNC	__O_RSYNC	/* Synchronize read operations.  */
Packit 6c4009
# else
Packit 6c4009
#  define O_RSYNC	O_SYNC		/* Synchronize read operations.  */
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Values for the second argument to `fcntl'.  */
Packit 6c4009
#define F_DUPFD		0	/* Duplicate file descriptor.  */
Packit 6c4009
#define F_GETFD		1	/* Get file descriptor flags.  */
Packit 6c4009
#define F_SETFD		2	/* Set file descriptor flags.  */
Packit 6c4009
#define F_GETFL		3	/* Get file status flags.  */
Packit 6c4009
#define F_SETFL		4	/* Set file status flags.  */
Packit 6c4009
Packit 6c4009
#ifndef __F_SETOWN
Packit 6c4009
# define __F_SETOWN	8
Packit 6c4009
# define __F_GETOWN	9
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
Packit 6c4009
# define F_SETOWN	__F_SETOWN /* Get owner (process receiving SIGIO).  */
Packit 6c4009
# define F_GETOWN	__F_GETOWN /* Set owner (process receiving SIGIO).  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifndef __F_SETSIG
Packit 6c4009
# define __F_SETSIG	10	/* Set number of signal to be sent.  */
Packit 6c4009
# define __F_GETSIG	11	/* Get number of signal to be sent.  */
Packit 6c4009
#endif
Packit 6c4009
#ifndef __F_SETOWN_EX
Packit 6c4009
# define __F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
Packit 6c4009
# define __F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
# define F_SETSIG	__F_SETSIG	/* Set number of signal to be sent.  */
Packit 6c4009
# define F_GETSIG	__F_GETSIG	/* Get number of signal to be sent.  */
Packit 6c4009
# define F_SETOWN_EX	__F_SETOWN_EX	/* Get owner (thread receiving SIGIO).  */
Packit 6c4009
# define F_GETOWN_EX	__F_GETOWN_EX	/* Set owner (thread receiving SIGIO).  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
# define F_SETLEASE	1024	/* Set a lease.  */
Packit 6c4009
# define F_GETLEASE	1025	/* Enquire what lease is active.  */
Packit 6c4009
# define F_NOTIFY	1026	/* Request notifications on a directory.  */
Packit 6c4009
# define F_SETPIPE_SZ	1031	/* Set pipe page size array.  */
Packit 6c4009
# define F_GETPIPE_SZ	1032	/* Set pipe page size array.  */
Packit 6c4009
# define F_ADD_SEALS	1033	/* Add seals to file.  */
Packit 6c4009
# define F_GET_SEALS	1034	/* Get seals for file.  */
Packit 6c4009
/* Set / get write life time hints.  */
Packit 6c4009
# define F_GET_RW_HINT	1035
Packit 6c4009
# define F_SET_RW_HINT	1036
Packit 6c4009
# define F_GET_FILE_RW_HINT	1037
Packit 6c4009
# define F_SET_FILE_RW_HINT	1038
Packit 6c4009
#endif
Packit 6c4009
#ifdef __USE_XOPEN2K8
Packit 6c4009
# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with
Packit 6c4009
				   close-on-exit set.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* For F_[GET|SET]FD.  */
Packit 6c4009
#define FD_CLOEXEC	1	/* Actually anything with low bit set goes */
Packit 6c4009
Packit 6c4009
#ifndef F_RDLCK
Packit 6c4009
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
Packit 6c4009
# define F_RDLCK		0	/* Read lock.  */
Packit 6c4009
# define F_WRLCK		1	/* Write lock.  */
Packit 6c4009
# define F_UNLCK		2	/* Remove lock.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* For old implementation of BSD flock.  */
Packit 6c4009
#ifndef F_EXLCK
Packit 6c4009
# define F_EXLCK		4	/* or 3 */
Packit 6c4009
# define F_SHLCK		8	/* or 4 */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_MISC
Packit 6c4009
/* Operations for BSD flock, also used by the kernel implementation.  */
Packit 6c4009
# define LOCK_SH	1	/* Shared lock.  */
Packit 6c4009
# define LOCK_EX	2	/* Exclusive lock.  */
Packit 6c4009
# define LOCK_NB	4	/* Or'd with one of the above to prevent
Packit 6c4009
				   blocking.  */
Packit 6c4009
# define LOCK_UN	8	/* Remove lock.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
# define LOCK_MAND	32	/* This is a mandatory flock:  */
Packit 6c4009
# define LOCK_READ	64	/* ... which allows concurrent read operations.  */
Packit 6c4009
# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
Packit 6c4009
# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* Types of directory notifications that may be requested with F_NOTIFY.  */
Packit 6c4009
# define DN_ACCESS	0x00000001	/* File accessed.  */
Packit 6c4009
# define DN_MODIFY	0x00000002	/* File modified.  */
Packit 6c4009
# define DN_CREATE	0x00000004	/* File created.  */
Packit 6c4009
# define DN_DELETE	0x00000008	/* File removed.  */
Packit 6c4009
# define DN_RENAME	0x00000010	/* File renamed.  */
Packit 6c4009
# define DN_ATTRIB	0x00000020	/* File changed attributes.  */
Packit 6c4009
# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* Owner types.  */
Packit 6c4009
enum __pid_type
Packit 6c4009
  {
Packit 6c4009
    F_OWNER_TID = 0,		/* Kernel thread.  */
Packit 6c4009
    F_OWNER_PID,		/* Process.  */
Packit 6c4009
    F_OWNER_PGRP,		/* Process group.  */
Packit 6c4009
    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
Packit 6c4009
  };
Packit 6c4009
Packit 6c4009
/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
Packit 6c4009
struct f_owner_ex
Packit 6c4009
  {
Packit 6c4009
    enum __pid_type type;	/* Owner type of ID.  */
Packit 6c4009
    __pid_t pid;		/* ID of owner.  */
Packit 6c4009
  };
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* Types of seals.  */
Packit 6c4009
# define F_SEAL_SEAL	0x0001	/* Prevent further seals from being set.  */
Packit 6c4009
# define F_SEAL_SHRINK	0x0002	/* Prevent file from shrinking.  */
Packit 6c4009
# define F_SEAL_GROW	0x0004	/* Prevent file from growing.  */
Packit 6c4009
# define F_SEAL_WRITE	0x0008	/* Prevent writes.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* Hint values for F_{GET,SET}_RW_HINT.  */
Packit Service 381234
# define RWH_WRITE_LIFE_NOT_SET	0
Packit Service 381234
# define RWF_WRITE_LIFE_NOT_SET	RWH_WRITE_LIFE_NOT_SET
Packit 6c4009
# define RWH_WRITE_LIFE_NONE	1
Packit 6c4009
# define RWH_WRITE_LIFE_SHORT	2
Packit 6c4009
# define RWH_WRITE_LIFE_MEDIUM	3
Packit 6c4009
# define RWH_WRITE_LIFE_LONG	4
Packit 6c4009
# define RWH_WRITE_LIFE_EXTREME	5
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Define some more compatibility macros to be backward compatible with
Packit 6c4009
   BSD systems which did not managed to hide these kernel macros.  */
Packit 6c4009
#ifdef	__USE_MISC
Packit 6c4009
# define FAPPEND	O_APPEND
Packit 6c4009
# define FFSYNC		O_FSYNC
Packit 6c4009
# define FASYNC		O_ASYNC
Packit 6c4009
# define FNONBLOCK	O_NONBLOCK
Packit 6c4009
# define FNDELAY	O_NDELAY
Packit 6c4009
#endif /* Use misc.  */
Packit 6c4009
Packit 6c4009
#ifndef __POSIX_FADV_DONTNEED
Packit 6c4009
#  define __POSIX_FADV_DONTNEED	4
Packit 6c4009
#  define __POSIX_FADV_NOREUSE	5
Packit 6c4009
#endif
Packit 6c4009
/* Advise to `posix_fadvise'.  */
Packit 6c4009
#ifdef __USE_XOPEN2K
Packit 6c4009
# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
Packit 6c4009
# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
Packit 6c4009
# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.  */
Packit 6c4009
# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
Packit 6c4009
# define POSIX_FADV_DONTNEED	__POSIX_FADV_DONTNEED /* Don't need these pages.  */
Packit 6c4009
# define POSIX_FADV_NOREUSE	__POSIX_FADV_NOREUSE /* Data will be accessed once.  */
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* Flags for SYNC_FILE_RANGE.  */
Packit 6c4009
# define SYNC_FILE_RANGE_WAIT_BEFORE	1 /* Wait upon writeout of all pages
Packit 6c4009
					     in the range before performing the
Packit 6c4009
					     write.  */
Packit 6c4009
# define SYNC_FILE_RANGE_WRITE		2 /* Initiate writeout of all those
Packit 6c4009
					     dirty pages in the range which are
Packit 6c4009
					     not presently under writeback.  */
Packit 6c4009
# define SYNC_FILE_RANGE_WAIT_AFTER	4 /* Wait upon writeout of all pages in
Packit 6c4009
					     the range after performing the
Packit 6c4009
					     write.  */
Packit 6c4009
Packit 6c4009
/* Flags for SPLICE and VMSPLICE.  */
Packit 6c4009
# define SPLICE_F_MOVE		1	/* Move pages instead of copying.  */
Packit 6c4009
# define SPLICE_F_NONBLOCK	2	/* Don't block on the pipe splicing
Packit 6c4009
					   (but we may still block on the fd
Packit 6c4009
					   we splice from/to).  */
Packit 6c4009
# define SPLICE_F_MORE		4	/* Expect more data.  */
Packit 6c4009
# define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Flags for fallocate.  */
Packit 6c4009
# include <linux/falloc.h>
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* File handle structure.  */
Packit 6c4009
struct file_handle
Packit 6c4009
{
Packit 6c4009
  unsigned int handle_bytes;
Packit 6c4009
  int handle_type;
Packit 6c4009
  /* File identifier.  */
Packit 6c4009
  unsigned char f_handle[0];
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
/* Maximum handle size (for now).  */
Packit 6c4009
# define MAX_HANDLE_SZ	128
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
Packit 6c4009
/* Provide kernel hint to read ahead.  */
Packit 6c4009
extern __ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
Packit 6c4009
    __THROW;
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Selective file content synch'ing.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
Packit 6c4009
			    unsigned int __flags);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Splice address range into a pipe.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern __ssize_t vmsplice (int __fdout, const struct iovec *__iov,
Packit 6c4009
			   size_t __count, unsigned int __flags);
Packit 6c4009
Packit 6c4009
/* Splice two files together.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
Packit 6c4009
			 __off64_t *__offout, size_t __len,
Packit 6c4009
			 unsigned int __flags);
Packit 6c4009
Packit 6c4009
/* In-kernel implementation of tee for pipe buffers.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern __ssize_t tee (int __fdin, int __fdout, size_t __len,
Packit 6c4009
		      unsigned int __flags);
Packit 6c4009
Packit 6c4009
/* Reserve storage for the data of the file associated with FD.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
# ifndef __USE_FILE_OFFSET64
Packit 6c4009
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
Packit 6c4009
# else
Packit 6c4009
#  ifdef __REDIRECT
Packit 6c4009
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
Packit 6c4009
				   __off64_t __len),
Packit 6c4009
		       fallocate64);
Packit 6c4009
#  else
Packit 6c4009
#   define fallocate fallocate64
Packit 6c4009
#  endif
Packit 6c4009
# endif
Packit 6c4009
# ifdef __USE_LARGEFILE64
Packit 6c4009
extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
Packit 6c4009
			__off64_t __len);
Packit 6c4009
# endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Map file name to file handle.  */
Packit 6c4009
extern int name_to_handle_at (int __dfd, const char *__name,
Packit 6c4009
			      struct file_handle *__handle, int *__mnt_id,
Packit 6c4009
			      int __flags) __THROW;
Packit 6c4009
Packit 6c4009
/* Open file using the file handle.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
Packit 6c4009
			      int __flags);
Packit 6c4009
Packit 6c4009
#endif	/* use GNU */
Packit 6c4009
Packit 6c4009
__END_DECLS