[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libposix build logs
From: |
Bruno Haible |
Subject: |
Re: libposix build logs |
Date: |
Sat, 25 Dec 2010 14:45:07 +0100 |
User-agent: |
KMail/1.9.9 |
Hi Gary,
On 2010-11-11 I wrote:
> 2010-11-11 Bruno Haible <address@hidden>
>
> fcntl-h: Fix for use of C++ on glibc systems.
> * lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
> also on glibc systems in C++ mode.
> Reported by Gary V. Vaughan <address@hidden>.
This fixed only half of the problem. This should now fix it for real:
2010-12-25 Bruno Haible <address@hidden>
fcntl-h: Fix for use of C++ on glibc systems.
* lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
also on glibc systems in C++ mode.
Reported by Gary V. Vaughan <address@hidden>.
--- lib/fcntl.in.h.orig Sat Dec 25 14:42:50 2010
+++ lib/fcntl.in.h Sat Dec 25 14:41:41 2010
@@ -43,7 +43,13 @@
#ifndef _GL_FCNTL_H
#include <sys/types.h>
-#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
+/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
+ <fcntl.h>. On glibc systems, we would like to avoid namespace pollution.
+ But on glibc systems, <fcntl.h> includes <sys/stat.h> inside an
+ extern "C" { ... } block, which leads to errors in C++ mode with the
+ overridden <sys/stat.h> from gnulib. These errors are known to be gone
+ with g++ version >= 4.3. */
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus &&
defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__
>= 3)))
# include <sys/stat.h>
#endif
/* The include_next requires a split double-inclusion guard. */
- Re: libposix build logs, Bruno Haible, 2010/12/25
- Re: libposix build logs,
Bruno Haible <=
- Re: libposix build logs, Bruno Haible, 2010/12/25
- Re: libposix build logs, Paul Eggert, 2010/12/25
- Re: libposix build logs, Paul Eggert, 2010/12/25
- Re: NFS timestamps, Bruno Haible, 2010/12/26
- Re: NFS timestamps, Paul Eggert, 2010/12/27
- Re: NFS timestamps, Bruno Haible, 2010/12/27
- Re: NFS timestamps, Paul Eggert, 2010/12/27
Re: libposix build logs, Gary V. Vaughan, 2010/12/26