Home | History | Annotate | Line # | Download | only in import
      1      1.1  christos /* Substitute for <sys/uio.h>.
      2  1.1.1.2  christos    Copyright (C) 2011-2022 Free Software Foundation, Inc.
      3      1.1  christos 
      4  1.1.1.2  christos    This file is free software: you can redistribute it and/or modify
      5  1.1.1.2  christos    it under the terms of the GNU Lesser General Public License as
      6  1.1.1.2  christos    published by the Free Software Foundation; either version 2.1 of the
      7  1.1.1.2  christos    License, or (at your option) any later version.
      8      1.1  christos 
      9  1.1.1.2  christos    This file is distributed in the hope that it will be useful,
     10      1.1  christos    but WITHOUT ANY WARRANTY; without even the implied warranty of
     11      1.1  christos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12  1.1.1.2  christos    GNU Lesser General Public License for more details.
     13      1.1  christos 
     14  1.1.1.2  christos    You should have received a copy of the GNU Lesser General Public License
     15  1.1.1.2  christos    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
     16      1.1  christos 
     17      1.1  christos # if __GNUC__ >= 3
     18      1.1  christos @PRAGMA_SYSTEM_HEADER@
     19      1.1  christos # endif
     20      1.1  christos @PRAGMA_COLUMNS@
     21      1.1  christos 
     22      1.1  christos #ifndef _@GUARD_PREFIX@_SYS_UIO_H
     23      1.1  christos 
     24      1.1  christos #if @HAVE_SYS_UIO_H@
     25      1.1  christos 
     26      1.1  christos /* On OpenBSD 4.4, <sys/uio.h> assumes prior inclusion of <sys/types.h>.  */
     27      1.1  christos # include <sys/types.h>
     28      1.1  christos 
     29      1.1  christos /* The include_next requires a split double-inclusion guard.  */
     30      1.1  christos # @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@
     31      1.1  christos 
     32      1.1  christos #endif
     33      1.1  christos 
     34      1.1  christos #ifndef _@GUARD_PREFIX@_SYS_UIO_H
     35      1.1  christos #define _@GUARD_PREFIX@_SYS_UIO_H
     36      1.1  christos 
     37      1.1  christos #if !@HAVE_SYS_UIO_H@
     38      1.1  christos /* A platform that lacks <sys/uio.h>.  */
     39      1.1  christos /* Get 'size_t' and 'ssize_t'.  */
     40      1.1  christos # include <sys/types.h>
     41      1.1  christos 
     42      1.1  christos # ifdef __cplusplus
     43      1.1  christos extern "C" {
     44      1.1  christos # endif
     45      1.1  christos 
     46      1.1  christos # if !GNULIB_defined_struct_iovec
     47      1.1  christos /* All known platforms that lack <sys/uio.h> also lack any declaration
     48      1.1  christos    of struct iovec in any other header.  */
     49      1.1  christos struct iovec {
     50      1.1  christos   void *iov_base;
     51      1.1  christos   size_t iov_len;
     52      1.1  christos };
     53      1.1  christos #  define GNULIB_defined_struct_iovec 1
     54      1.1  christos # endif
     55      1.1  christos 
     56      1.1  christos # ifdef __cplusplus
     57      1.1  christos }
     58      1.1  christos # endif
     59      1.1  christos 
     60      1.1  christos #endif
     61      1.1  christos 
     62      1.1  christos #endif /* _@GUARD_PREFIX@_SYS_UIO_H */
     63      1.1  christos #endif /* _@GUARD_PREFIX@_SYS_UIO_H */
     64