This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix fail of gcc.dg/pthread-init-2.c on hppa*-*-hpux11*
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 7 Oct 2006 13:08:00 -0400 (EDT)
- Subject: [committed] Fix fail of gcc.dg/pthread-init-2.c on hppa*-*-hpux11*
With the braces fix just applied, gcc.dg/pthread-init-2.c still
fails under hpux11 since there is no typedef for sigset_t unless
_INCLUDE_POSIX_SOURCE is defined.
A header/standards person at HP indicated that including pthread.h
without providing a define to provide the POSIX.1c namespace was
using it in a erronious manner. Thus, I chose to define _POSIX_C_SOURCE
to 199506L to provide the correct namespace.
Tested on hppa2.0w-hp-hpux11.11.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2006-10-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/29300
* gcc.dg/pthread-init-2.c (dg-options): Define _POSIX_C_SOURCE=199506L
on hppa*-*-hpux*.
Index: gcc.dg/pthread-init-2.c
===================================================================
--- gcc.dg/pthread-init-2.c (revision 117527)
+++ gcc.dg/pthread-init-2.c (working copy)
@@ -6,6 +6,7 @@
/* { dg-do compile } */
/* { dg-options "-Wextra -Wall -ansi" } */
+/* { dg-options "-Wextra -Wall -ansi -D_POSIX_C_SOURCE=199506L" { target { hppa*-*-hpux* } } } */
#include "pthread-init-common.h"