Blame misc/sys/uio.h

Packit Service 82fcde
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _SYS_UIO_H
Packit Service 82fcde
#define _SYS_UIO_H	1
Packit Service 82fcde
Packit Service 82fcde
#include <features.h>
Packit Service 82fcde
#include <sys/types.h>
Packit Service 82fcde
#include <bits/types/struct_iovec.h>
Packit Service 82fcde
#include <bits/uio_lim.h>
Packit Service 82fcde
#ifdef __IOV_MAX
Packit Service 82fcde
# define UIO_MAXIOV __IOV_MAX
Packit Service 82fcde
#else
Packit Service 82fcde
# undef UIO_MAXIOV
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
__BEGIN_DECLS
Packit Service 82fcde
Packit Service 82fcde
/* Read data from file descriptor FD, and put the result in the
Packit Service 82fcde
   buffers described by IOVEC, which is a vector of COUNT 'struct iovec's.
Packit Service 82fcde
   The buffers are filled in the order specified.
Packit Service 82fcde
   Operates just like 'read' (see <unistd.h>) except that data are
Packit Service 82fcde
   put in IOVEC instead of a contiguous buffer.
Packit Service 82fcde
Packit Service 82fcde
   This function is a cancellation point and therefore not marked with
Packit Service 82fcde
   __THROW.  */
Packit Service 82fcde
extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
Packit Service 82fcde
  __wur;
Packit Service 82fcde
Packit Service 82fcde
/* Write data pointed by the buffers described by IOVEC, which
Packit Service 82fcde
   is a vector of COUNT 'struct iovec's, to file descriptor FD.
Packit Service 82fcde
   The data is written in the order specified.
Packit Service 82fcde
   Operates just like 'write' (see <unistd.h>) except that the data
Packit Service 82fcde
   are taken from IOVEC instead of a contiguous buffer.
Packit Service 82fcde
Packit Service 82fcde
   This function is a cancellation point and therefore not marked with
Packit Service 82fcde
   __THROW.  */
Packit Service 82fcde
extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
Packit Service 82fcde
  __wur;
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
#ifdef __USE_MISC
Packit Service 82fcde
# ifndef __USE_FILE_OFFSET64
Packit Service 82fcde
/* Read data from file descriptor FD at the given position OFFSET
Packit Service 82fcde
   without change the file pointer, and put the result in the buffers
Packit Service 82fcde
   described by IOVEC, which is a vector of COUNT 'struct iovec's.
Packit Service 82fcde
   The buffers are filled in the order specified.  Operates just like
Packit Service 82fcde
   'pread' (see <unistd.h>) except that data are put in IOVEC instead
Packit Service 82fcde
   of a contiguous buffer.
Packit Service 82fcde
Packit Service 82fcde
   This function is a cancellation point and therefore not marked with
Packit Service 82fcde
   __THROW.  */
Packit Service 82fcde
extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
Packit Service 82fcde
		       __off_t __offset) __wur;
Packit Service 82fcde
Packit Service 82fcde
/* Write data pointed by the buffers described by IOVEC, which is a
Packit Service 82fcde
   vector of COUNT 'struct iovec's, to file descriptor FD at the given
Packit Service 82fcde
   position OFFSET without change the file pointer.  The data is
Packit Service 82fcde
   written in the order specified.  Operates just like 'pwrite' (see
Packit Service 82fcde
   <unistd.h>) except that the data are taken from IOVEC instead of a
Packit Service 82fcde
   contiguous buffer.
Packit Service 82fcde
Packit Service 82fcde
   This function is a cancellation point and therefore not marked with
Packit Service 82fcde
   __THROW.  */
Packit Service 82fcde
extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
Packit Service 82fcde
			__off_t __offset) __wur;
Packit Service 82fcde
Packit Service 82fcde
# else
Packit Service 82fcde
#  ifdef __REDIRECT
Packit Service 82fcde
extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,
Packit Service 82fcde
				    int __count, __off64_t __offset),
Packit Service 82fcde
			   preadv64) __wur;
Packit Service 82fcde
extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
Packit Service 82fcde
				     int __count, __off64_t __offset),
Packit Service 82fcde
			   pwritev64) __wur;
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define preadv preadv64
Packit Service 82fcde
#   define pwritev pwritev64
Packit Service 82fcde
#  endif
Packit Service 82fcde
# endif
Packit Service 82fcde
Packit Service 82fcde
# ifdef __USE_LARGEFILE64
Packit Service 82fcde
/* Read data from file descriptor FD at the given position OFFSET
Packit Service 82fcde
   without change the file pointer, and put the result in the buffers
Packit Service 82fcde
   described by IOVEC, which is a vector of COUNT 'struct iovec's.
Packit Service 82fcde
   The buffers are filled in the order specified.  Operates just like
Packit Service 82fcde
   'pread' (see <unistd.h>) except that data are put in IOVEC instead
Packit Service 82fcde
   of a contiguous buffer.
Packit Service 82fcde
Packit Service 82fcde
   This function is a cancellation point and therefore not marked with
Packit Service 82fcde
   __THROW.  */
Packit Service 82fcde
extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
Packit Service 82fcde
			 __off64_t __offset) __wur;
Packit Service 82fcde
Packit Service 82fcde
/* Write data pointed by the buffers described by IOVEC, which is a
Packit Service 82fcde
   vector of COUNT 'struct iovec's, to file descriptor FD at the given
Packit Service 82fcde
   position OFFSET without change the file pointer.  The data is
Packit Service 82fcde
   written in the order specified.  Operates just like 'pwrite' (see
Packit Service 82fcde
   <unistd.h>) except that the data are taken from IOVEC instead of a
Packit Service 82fcde
   contiguous buffer.
Packit Service 82fcde
Packit Service 82fcde
   This function is a cancellation point and therefore not marked with
Packit Service 82fcde
   __THROW.  */
Packit Service 82fcde
extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
Packit Service 82fcde
			  __off64_t __offset) __wur;
Packit Service 82fcde
# endif
Packit Service 82fcde
#endif	/* Use misc.  */
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
#ifdef __USE_GNU
Packit Service 82fcde
# ifndef __USE_FILE_OFFSET64
Packit Service 82fcde
/* Same as preadv but with an additional flag argumenti defined at uio.h.  */
Packit Service 82fcde
extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count,
Packit Service 82fcde
			__off_t __offset, int ___flags) __wur;
Packit Service 82fcde
Packit Service 82fcde
/* Same as preadv but with an additional flag argument defined at uio.h.  */
Packit Service 82fcde
extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
Packit Service 82fcde
			 __off_t __offset, int __flags) __wur;
Packit Service 82fcde
Packit Service 82fcde
# else
Packit Service 82fcde
#  ifdef __REDIRECT
Packit Service 82fcde
extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,
Packit Service 82fcde
				      int __count, __off64_t __offset,
Packit Service 82fcde
				      int __flags),
Packit Service 82fcde
			   pwritev64v2) __wur;
Packit Service 82fcde
extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
Packit Service 82fcde
				     int __count, __off64_t __offset,
Packit Service 82fcde
				     int __flags),
Packit Service 82fcde
			   preadv64v2) __wur;
Packit Service 82fcde
#  else
Packit Service 82fcde
#   define preadv2 preadv64v2
Packit Service 82fcde
#   define pwritev2 pwritev64v2
Packit Service 82fcde
#  endif
Packit Service 82fcde
# endif
Packit Service 82fcde
Packit Service 82fcde
# ifdef __USE_LARGEFILE64
Packit Service 82fcde
/* Same as preadv but with an additional flag argumenti defined at uio.h.  */
Packit Service 82fcde
extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec,
Packit Service 82fcde
			   int __count, __off64_t __offset,
Packit Service 82fcde
			   int ___flags) __wur;
Packit Service 82fcde
Packit Service 82fcde
/* Same as preadv but with an additional flag argument defined at uio.h.  */
Packit Service 82fcde
extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev,
Packit Service 82fcde
			    int __count, __off64_t __offset,
Packit Service 82fcde
			    int __flags) __wur;
Packit Service 82fcde
# endif
Packit Service 82fcde
#endif /* Use GNU.  */
Packit Service 82fcde
Packit Service 82fcde
__END_DECLS
Packit Service 82fcde
Packit Service 82fcde
/* Some operating systems provide system-specific extensions to this
Packit Service 82fcde
   header.  */
Packit Service 82fcde
#ifdef __USE_GNU
Packit Service 82fcde
# include <bits/uio-ext.h>
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
#endif /* sys/uio.h */