sys_uio.in.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* Substitute for <sys/uio.h>.
  2. Copyright (C) 2011-2012 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program 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, write to the Free Software Foundation,
  13. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
  14. # if __GNUC__ >= 3
  15. @PRAGMA_SYSTEM_HEADER@
  16. # endif
  17. @PRAGMA_COLUMNS@
  18. #ifndef _@GUARD_PREFIX@_SYS_UIO_H
  19. #if @HAVE_SYS_UIO_H@
  20. /* On OpenBSD 4.4, <sys/uio.h> assumes prior inclusion of <sys/types.h>. */
  21. # include <sys/types.h>
  22. /* The include_next requires a split double-inclusion guard. */
  23. # @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@
  24. #endif
  25. #ifndef _@GUARD_PREFIX@_SYS_UIO_H
  26. #define _@GUARD_PREFIX@_SYS_UIO_H
  27. #if !@HAVE_SYS_UIO_H@
  28. /* A platform that lacks <sys/uio.h>. */
  29. /* Get 'size_t' and 'ssize_t'. */
  30. # include <sys/types.h>
  31. # ifdef __cplusplus
  32. extern "C" {
  33. # endif
  34. # if !GNULIB_defined_struct_iovec
  35. /* All known platforms that lack <sys/uio.h> also lack any declaration
  36. of struct iovec in any other header. */
  37. struct iovec {
  38. void *iov_base;
  39. size_t iov_len;
  40. };
  41. # define GNULIB_defined_struct_iovec 1
  42. # endif
  43. # ifdef __cplusplus
  44. }
  45. # endif
  46. #endif
  47. #endif /* _@GUARD_PREFIX@_SYS_UIO_H */
  48. #endif /* _@GUARD_PREFIX@_SYS_UIO_H */