xref: /netbsd-src/external/gpl3/gdb/dist/gnulib/import/sys_uio.in.h (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
18dffb485Schristos /* Substitute for <sys/uio.h>.
2*4b169a6bSchristos    Copyright (C) 2011-2022 Free Software Foundation, Inc.
38dffb485Schristos 
4*4b169a6bSchristos    This file is free software: you can redistribute it and/or modify
5*4b169a6bSchristos    it under the terms of the GNU Lesser General Public License as
6*4b169a6bSchristos    published by the Free Software Foundation; either version 2.1 of the
7*4b169a6bSchristos    License, or (at your option) any later version.
88dffb485Schristos 
9*4b169a6bSchristos    This file is distributed in the hope that it will be useful,
108dffb485Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
118dffb485Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12*4b169a6bSchristos    GNU Lesser General Public License for more details.
138dffb485Schristos 
14*4b169a6bSchristos    You should have received a copy of the GNU Lesser General Public License
15*4b169a6bSchristos    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
168dffb485Schristos 
178dffb485Schristos # if __GNUC__ >= 3
188dffb485Schristos @PRAGMA_SYSTEM_HEADER@
198dffb485Schristos # endif
208dffb485Schristos @PRAGMA_COLUMNS@
218dffb485Schristos 
228dffb485Schristos #ifndef _@GUARD_PREFIX@_SYS_UIO_H
238dffb485Schristos 
248dffb485Schristos #if @HAVE_SYS_UIO_H@
258dffb485Schristos 
268dffb485Schristos /* On OpenBSD 4.4, <sys/uio.h> assumes prior inclusion of <sys/types.h>.  */
278dffb485Schristos # include <sys/types.h>
288dffb485Schristos 
298dffb485Schristos /* The include_next requires a split double-inclusion guard.  */
308dffb485Schristos # @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@
318dffb485Schristos 
328dffb485Schristos #endif
338dffb485Schristos 
348dffb485Schristos #ifndef _@GUARD_PREFIX@_SYS_UIO_H
358dffb485Schristos #define _@GUARD_PREFIX@_SYS_UIO_H
368dffb485Schristos 
378dffb485Schristos #if !@HAVE_SYS_UIO_H@
388dffb485Schristos /* A platform that lacks <sys/uio.h>.  */
398dffb485Schristos /* Get 'size_t' and 'ssize_t'.  */
408dffb485Schristos # include <sys/types.h>
418dffb485Schristos 
428dffb485Schristos # ifdef __cplusplus
438dffb485Schristos extern "C" {
448dffb485Schristos # endif
458dffb485Schristos 
468dffb485Schristos # if !GNULIB_defined_struct_iovec
478dffb485Schristos /* All known platforms that lack <sys/uio.h> also lack any declaration
488dffb485Schristos    of struct iovec in any other header.  */
498dffb485Schristos struct iovec {
508dffb485Schristos   void *iov_base;
518dffb485Schristos   size_t iov_len;
528dffb485Schristos };
538dffb485Schristos #  define GNULIB_defined_struct_iovec 1
548dffb485Schristos # endif
558dffb485Schristos 
568dffb485Schristos # ifdef __cplusplus
578dffb485Schristos }
588dffb485Schristos # endif
598dffb485Schristos 
608dffb485Schristos #endif
618dffb485Schristos 
628dffb485Schristos #endif /* _@GUARD_PREFIX@_SYS_UIO_H */
638dffb485Schristos #endif /* _@GUARD_PREFIX@_SYS_UIO_H */
64