This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] include/posix.h
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: tromey at redhat dot com
- Cc: toa at pop dot agri dot ch, java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 May 2006 19:21:24 -0400 (EDT)
- Subject: Re: [patch] include/posix.h
> Andreas> In our case sys/rw_lock.h, the file where this (re)-definition
> Andreas> happens, is included after Boolean.h, implicitely. So I tend to agree
> Andreas> with Dave that the workaround he proposes is probably the best one in
> Andreas> regard of effort and gain.
>
> That patch also looked fine to me. Feel free to check it in.
Done.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2006-05-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* configure.ac: Add sys/rw_lock.h to AC_CHECK_HEADERS.
* configure: Rebuilt.
* include/config.h.in: Likewise.
* include/posix.h: If HAVE_SYS_RW_LOCK_H is defined, include
<sys/rw_lock.h>.
Index: configure.ac
===================================================================
--- configure.ac (revision 113941)
+++ configure.ac (working copy)
@@ -1276,7 +1276,7 @@
sys/ioctl.h sys/filio.h sys/stat.h sys/select.h \
sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h \
pwd.h sys/config.h stdint.h langinfo.h locale.h \
- dirent.h])
+ dirent.h sys/rw_lock.h])
AC_CHECK_HEADERS(inttypes.h, [
AC_DEFINE(HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
AC_DEFINE(JV_HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
Index: include/posix.h
===================================================================
--- include/posix.h (revision 113941)
+++ include/posix.h (working copy)
@@ -37,6 +37,12 @@
#include <fcntl.h>
+/* The header file <sys/rw_lock.h> needs to be included before javaprims.h
+ on HP-UX 11 to avoid a compilation error. */
+#ifdef HAVE_SYS_RW_LOCK_H
+#include <sys/rw_lock.h>
+#endif
+
#include <gcj/cni.h>
#include <java/util/Properties.h>