From patchwork Sat Dec 1 19:51:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [committed] Fix ada build on hpux10 Date: Sat, 01 Dec 2012 09:51:11 -0000 From: John David Anglin X-Patchwork-Id: 203150 Message-Id: <20121201195111.GA17409@hiauly1.hia.nrc.ca> To: gcc-patches@gcc.gnu.org Tested on hppa1.1.-hp-hpux10.20. Commetted to trunk and 4.7. Dave Index: s-osinte-hpux-dce.ads =================================================================== --- s-osinte-hpux-dce.ads (revision 193634) +++ s-osinte-hpux-dce.ads (working copy) @@ -244,6 +244,14 @@ type pthread_condattr_t is limited private; type pthread_key_t is private; + -- Read/Write lock not supported on HPUX. To add support both types + -- pthread_rwlock_t and pthread_rwlockattr_t must properly be defined + -- with the associated routines pthread_rwlock_[init/destroy] and + -- pthread_rwlock_[rdlock/wrlock/unlock]. + + subtype pthread_rwlock_t is pthread_mutex_t; + subtype pthread_rwlockattr_t is pthread_mutexattr_t; + ----------- -- Stack -- ----------- @@ -444,7 +452,6 @@ end record; pragma Convention (C, timespec); - type clockid_t is new int; CLOCK_REALTIME : constant clockid_t := 1; type cma_t_address is new System.Address; Index: s-taspri-hpux-dce.ads =================================================================== --- s-taspri-hpux-dce.ads (revision 193634) +++ s-taspri-hpux-dce.ads (working copy) @@ -102,7 +102,9 @@ type Private_Data is record Thread : aliased System.OS_Interface.pthread_t; - pragma Atomic (Thread); + -- pragma Atomic (Thread); + -- Unfortunately, the above fails because Thread is 64 bits. + -- Thread field may be updated by two different threads of control. -- (See, Enter_Task and Create_Task in s-taprop.adb). They put the -- same value (thr_self value). We do not want to use lock on those