sys_uio.in.h 1.7 KB

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