bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] sys_uio: new module


From: Bruno Haible
Subject: Re: [PATCH 1/3] sys_uio: new module
Date: Sat, 30 Apr 2011 13:55:41 +0200
User-agent: KMail/1.9.9

On OpenBSD 4.4, <sys/uio.h> is not self-contained:

$ cat foo.c
#include <sys/uio.h>
struct iovec x;

$ gcc -c foo.c
In file included from foo.c:1:
/usr/include/sys/uio.h:40: error: syntax error before "size_t"
In file included from foo.c:1:
/usr/include/sys/uio.h:75: error: syntax error before "preadv"
/usr/include/sys/uio.h:75: error: syntax error before "off_t"
/usr/include/sys/uio.h:76: error: syntax error before "pwritev"
/usr/include/sys/uio.h:76: error: syntax error before "off_t"
/usr/include/sys/uio.h:78: error: syntax error before "readv"
/usr/include/sys/uio.h:79: error: syntax error before "writev"

This patch works around it:


2011-04-30  Bruno Haible  <address@hidden>

        sys_uio: Make <sys/uio.h> self-contained.
        * lib/sys_uio.in.h: Include <sys/types.h> before <sys/uio.h>.
        * doc/posix-headers/sys_uio.texi: Mention the OpenBSD problem.

--- doc/posix-headers/sys_uio.texi.orig Sat Apr 30 13:53:29 2011
+++ doc/posix-headers/sys_uio.texi      Sat Apr 30 13:50:50 2011
@@ -10,6 +10,10 @@
 @item
 This header file is missing on some platforms:
 mingw.
address@hidden
+This header file is not self-contained (it requires @code{<sys/types.h>} to be
+included first) on some platforms:
+OpenBSD 4.4.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- lib/sys_uio.in.h.orig       Sat Apr 30 13:53:29 2011
+++ lib/sys_uio.in.h    Sat Apr 30 13:49:39 2011
@@ -24,6 +24,9 @@
 
 #if @HAVE_SYS_UIO_H@
 
+/* On OpenBSD 4.4, <sys/uio.h> assumes prior inclusion of <sys/types.h>.  */
+# include <sys/types.h>
+
 /* The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@
 

-- 
In memoriam Casey Jones <http://en.wikipedia.org/wiki/Casey_Jones>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]