modernc.org/cc@v1.0.1/v2/headers/linux_386/usr/include/i386-linux-gnu/sys/uio.h (about)

     1  /* Copyright (C) 1991-2018 Free Software Foundation, Inc.
     2     This file is part of the GNU C Library.
     3  
     4     The GNU C Library is free software; you can redistribute it and/or
     5     modify it under the terms of the GNU Lesser General Public
     6     License as published by the Free Software Foundation; either
     7     version 2.1 of the License, or (at your option) any later version.
     8  
     9     The GNU C Library is distributed in the hope that it will be useful,
    10     but WITHOUT ANY WARRANTY; without even the implied warranty of
    11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    12     Lesser General Public License for more details.
    13  
    14     You should have received a copy of the GNU Lesser General Public
    15     License along with the GNU C Library; if not, see
    16     <http://www.gnu.org/licenses/>.  */
    17  
    18  #ifndef _SYS_UIO_H
    19  #define _SYS_UIO_H	1
    20  
    21  #include <features.h>
    22  #include <sys/types.h>
    23  #include <bits/types/struct_iovec.h>
    24  #include <bits/uio_lim.h>
    25  #ifdef __IOV_MAX
    26  # define UIO_MAXIOV __IOV_MAX
    27  #else
    28  # undef UIO_MAXIOV
    29  #endif
    30  
    31  __BEGIN_DECLS
    32  /* Read data from file descriptor FD, and put the result in the
    33     buffers described by IOVEC, which is a vector of COUNT 'struct iovec's.
    34     The buffers are filled in the order specified.
    35     Operates just like 'read' (see <unistd.h>) except that data are
    36     put in IOVEC instead of a contiguous buffer.
    37  
    38     This function is a cancellation point and therefore not marked with
    39     __THROW.  */
    40  extern ssize_t readv(int __fd, const struct iovec *__iovec, int __count) __wur;
    41  
    42  /* Write data pointed by the buffers described by IOVEC, which
    43     is a vector of COUNT 'struct iovec's, to file descriptor FD.
    44     The data is written in the order specified.
    45     Operates just like 'write' (see <unistd.h>) except that the data
    46     are taken from IOVEC instead of a contiguous buffer.
    47  
    48     This function is a cancellation point and therefore not marked with
    49     __THROW.  */
    50  extern ssize_t writev(int __fd, const struct iovec *__iovec, int __count) __wur;
    51  
    52  #ifdef __USE_MISC
    53  # ifndef __USE_FILE_OFFSET64
    54  /* Read data from file descriptor FD at the given position OFFSET
    55     without change the file pointer, and put the result in the buffers
    56     described by IOVEC, which is a vector of COUNT 'struct iovec's.
    57     The buffers are filled in the order specified.  Operates just like
    58     'pread' (see <unistd.h>) except that data are put in IOVEC instead
    59     of a contiguous buffer.
    60  
    61     This function is a cancellation point and therefore not marked with
    62     __THROW.  */
    63  extern ssize_t preadv(int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __wur;
    64  
    65  /* Write data pointed by the buffers described by IOVEC, which is a
    66     vector of COUNT 'struct iovec's, to file descriptor FD at the given
    67     position OFFSET without change the file pointer.  The data is
    68     written in the order specified.  Operates just like 'pwrite' (see
    69     <unistd.h>) except that the data are taken from IOVEC instead of a
    70     contiguous buffer.
    71  
    72     This function is a cancellation point and therefore not marked with
    73     __THROW.  */
    74  extern ssize_t pwritev(int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __wur;
    75  
    76  # else
    77  #  ifdef __REDIRECT
    78  extern ssize_t __REDIRECT(preadv, (int __fd, const struct iovec * __iovec, int __count, __off64_t __offset), preadv64) __wur;
    79  extern ssize_t __REDIRECT(pwritev, (int __fd, const struct iovec * __iovec, int __count, __off64_t __offset), pwritev64) __wur;
    80  #  else
    81  #   define preadv preadv64
    82  #   define pwritev pwritev64
    83  #  endif
    84  # endif
    85  
    86  # ifdef __USE_LARGEFILE64
    87  /* Read data from file descriptor FD at the given position OFFSET
    88     without change the file pointer, and put the result in the buffers
    89     described by IOVEC, which is a vector of COUNT 'struct iovec's.
    90     The buffers are filled in the order specified.  Operates just like
    91     'pread' (see <unistd.h>) except that data are put in IOVEC instead
    92     of a contiguous buffer.
    93  
    94     This function is a cancellation point and therefore not marked with
    95     __THROW.  */
    96  extern ssize_t preadv64(int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __wur;
    97  
    98  /* Write data pointed by the buffers described by IOVEC, which is a
    99     vector of COUNT 'struct iovec's, to file descriptor FD at the given
   100     position OFFSET without change the file pointer.  The data is
   101     written in the order specified.  Operates just like 'pwrite' (see
   102     <unistd.h>) except that the data are taken from IOVEC instead of a
   103     contiguous buffer.
   104  
   105     This function is a cancellation point and therefore not marked with
   106     __THROW.  */
   107  extern ssize_t pwritev64(int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __wur;
   108  # endif
   109  #endif				/* Use misc.  */
   110  
   111  #ifdef __USE_GNU
   112  # ifndef __USE_FILE_OFFSET64
   113  /* Same as preadv but with an additional flag argumenti defined at uio.h.  */
   114  extern ssize_t preadv2(int __fp, const struct iovec *__iovec, int __count, __off_t __offset, int ___flags) __wur;
   115  
   116  /* Same as preadv but with an additional flag argument defined at uio.h.  */
   117  extern ssize_t pwritev2(int __fd, const struct iovec *__iodev, int __count, __off_t __offset, int __flags) __wur;
   118  
   119  # else
   120  #  ifdef __REDIRECT
   121  extern ssize_t __REDIRECT(pwritev2, (int __fd, const struct iovec * __iovec, int __count, __off64_t __offset, int __flags), pwritev64v2) __wur;
   122  extern ssize_t __REDIRECT(preadv2, (int __fd, const struct iovec * __iovec, int __count, __off64_t __offset, int __flags), preadv64v2) __wur;
   123  #  else
   124  #   define preadv2 preadv64v2
   125  #   define pwritev2 pwritev64v2
   126  #  endif
   127  # endif
   128  
   129  # ifdef __USE_LARGEFILE64
   130  /* Same as preadv but with an additional flag argumenti defined at uio.h.  */
   131  extern ssize_t preadv64v2(int __fp, const struct iovec *__iovec, int __count, __off64_t __offset, int ___flags) __wur;
   132  
   133  /* Same as preadv but with an additional flag argument defined at uio.h.  */
   134  extern ssize_t pwritev64v2(int __fd, const struct iovec *__iodev, int __count, __off64_t __offset, int __flags) __wur;
   135  # endif
   136  #endif				/* Use GNU.  */
   137  
   138  __END_DECLS
   139  /* Some operating systems provide system-specific extensions to this
   140     header.  */
   141  #ifdef __USE_GNU
   142  # include <bits/uio-ext.h>
   143  #endif
   144  #endif				/* sys/uio.h */