From patchwork Tue Jun 19 14:16:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edelsohn X-Patchwork-Id: 165734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F2AE6B7006 for ; Wed, 20 Jun 2012 00:16:39 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1340720200; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=Qp789RI 2XqJJegW1a3ZyV52VDto=; b=pUERZIfDwFTHuWXiQkmLEnYlW5UeAxdem9WVuIO T2g0Yrxwh0+EyJ71LPD0eZS2Zp0JqBmiaflRap7Hf0gzTN65wgaWFiClu07ebRpe uVetd4C8y2N9cvvzm9cm0m1BVQHRqDtRveZ2I8WdmH5HnJkJe6j30lMoWYe8Lo9U 9xPg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=drBvj8YMhPqz9nPAV9NJPI5fAB170vXEx6n/P+i6oBww2uTZOXnxXGTp4fMRK1 2k/A4Saa9QCghYI4Zr1VJ0K2jxIWFxXCQE0HUbhRH3d0iB1ZeWtWge88RFsHTxiQ TwE6LHYcOUR+QsFkjnOmi0KAUtg4343rImXakfMbIh9tA=; Received: (qmail 22034 invoked by alias); 19 Jun 2012 14:16:34 -0000 Received: (qmail 22016 invoked by uid 22791); 19 Jun 2012 14:16:31 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Jun 2012 14:16:18 +0000 Received: by obcva7 with SMTP id va7so2275399obc.20 for ; Tue, 19 Jun 2012 07:16:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.17.3 with SMTP id k3mr19646746obd.73.1340115377934; Tue, 19 Jun 2012 07:16:17 -0700 (PDT) Received: by 10.182.214.69 with HTTP; Tue, 19 Jun 2012 07:16:17 -0700 (PDT) Date: Tue, 19 Jun 2012 10:16:17 -0400 Message-ID: Subject: [PATCH] AIX pthread.h fixincludes From: David Edelsohn To: Bruce Korb Cc: GCC Patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org AIX 5.2 pthread.h uses the wrong number of braces for more of the PTHREAD initializers. This patch extends the earlier patch to fix the other broken macros. * inclhack.def (aix_mutex_initializer_1, aix_cond_initializer_1, aix_rwlock_initializer): New. * fixincl.x: Regenerate. * tests/base/pthread.h [AIX_MUTEX_INITIALIZER_1_CHECK, AIX_COND_INITIALIZER_1_CHECK, AIX_RWLOCK_INITIALIZER_1_CHECK]: New. Okay? Thanks, David Index: inclhack.def =================================================================== --- inclhack.def (revision 188738) +++ inclhack.def (working copy) @@ -397,7 +397,9 @@ }; /* - * pthread.h on AIX defines PTHREAD_ONCE_INIT without enough braces. + * pthread.h on AIX defines PTHREAD_ONCE_INIT, PTHREAD_MUTEX_INITIALIZER, + * PTHREAD_COND_INITIALIZER and PTHREAD_RWLOCK_INITIALIZER without enough + * braces. */ fix = { hackname = aix_once_init_1; @@ -425,6 +427,45 @@ "}\n"; }; +fix = { + hackname = aix_mutex_initializer_1; + mach = "*-*-aix*"; + files = "pthread.h"; + select = "#define[ \t]PTHREAD_MUTEX_INITIALIZER \\\\\n" + "\\{ \\\\\n"; + c_fix = format; + c_fix_arg = "#define PTHREAD_MUTEX_INITIALIZER \\\n" + "{{ \\\n"; + test_text = "#define PTHREAD_MUTEX_INITIALIZER \\\\\n" + "{ \\\\\n"; +}; + +fix = { + hackname = aix_cond_initializer_1; + mach = "*-*-aix*"; + files = "pthread.h"; + select = "#define[ \t]PTHREAD_COND_INITIALIZER \\\\\n" + "\\{ \\\\\n"; + c_fix = format; + c_fix_arg = "#define PTHREAD_COND_INITIALIZER \\\n" + "{{ \\\n"; + test_text = "#define PTHREAD_COND_INITIALIZER \\\\\n" + "{ \\\\\n"; +}; + +fix = { + hackname = aix_rwlock_initializer_1; + mach = "*-*-aix*"; + files = "pthread.h"; + select = "#define[ \t]PTHREAD_RWLOCK_INITIALIZER \\\\\n" + "\\{ \\\\\n"; + c_fix = format; + c_fix_arg = "#define PTHREAD_RWLOCK_INITIALIZER \\\n" + "{{ \\\n"; + test_text = "#define PTHREAD_RWLOCK_INITIALIZER \\\\\n" + "{ \\\\\n"; +}; + /* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace * which violates a requirement of ISO C.