From patchwork Fri Aug 6 12:27:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anthony Green X-Patchwork-Id: 61107 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 4AAF8B6EEC for ; Fri, 6 Aug 2010 22:27:20 +1000 (EST) Received: (qmail 4950 invoked by alias); 6 Aug 2010 12:27:17 -0000 Received: (qmail 4940 invoked by uid 22791); 6 Aug 2010 12:27:15 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_BF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Aug 2010 12:27:09 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o76CR8Bc018986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 6 Aug 2010 08:27:08 -0400 Received: from gmachine.redhat.com (vpn-11-39.rdu.redhat.com [10.11.11.39]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o76CR61P015079; Fri, 6 Aug 2010 08:27:07 -0400 From: Anthony Green To: gcc-patches@gcc.gnu.org Subject: [patch, libffi] Define macros carefully User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-URL: http://www.redhat.com Date: Fri, 06 Aug 2010 08:27:06 -0400 Message-ID: MIME-Version: 1.0 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 I'm checking in the following libffi patches. This patch from Dan Horák protects the #definition of many generic looking macros with #ifndef. Thanks, AG 2010-07-07 Dan Horák * include/ffi.h.in: Protect #define with #ifndef. * src/powerpc/ffitarget.h: Ditto. * src/s390/ffitarget.h: Ditto. * src/sparc/ffitarget.h: Ditto. Index: libffi/include/ffi.h.in =================================================================== --- libffi.orig/include/ffi.h.in +++ libffi/include/ffi.h.in @@ -57,7 +57,9 @@ extern "C" { #endif /* Specify which architecture libffi is configured for. */ +#ifndef @TARGET@ #define @TARGET@ +#endif /* ---- System configuration information --------------------------------- */ Index: libffi/src/powerpc/ffitarget.h =================================================================== --- libffi.orig/src/powerpc/ffitarget.h +++ libffi/src/powerpc/ffitarget.h @@ -31,12 +31,18 @@ /* ---- System specific configurations ----------------------------------- */ #if defined (POWERPC) && defined (__powerpc64__) /* linux64 */ +#ifndef POWERPC64 #define POWERPC64 +#endif #elif defined (POWERPC_DARWIN) && defined (__ppc64__) /* Darwin */ +#ifndef POWERPC64 #define POWERPC64 +#endif #elif defined (POWERPC_AIX) && defined (__64BIT__) /* AIX64 */ +#ifndef POWERPC64 #define POWERPC64 #endif +#endif #ifndef LIBFFI_ASM typedef unsigned long ffi_arg; Index: libffi/src/s390/ffitarget.h =================================================================== --- libffi.orig/src/s390/ffitarget.h +++ libffi/src/s390/ffitarget.h @@ -28,8 +28,10 @@ #define LIBFFI_TARGET_H #if defined (__s390x__) +#ifndef S390X #define S390X #endif +#endif /* ---- System specific configurations ----------------------------------- */ Index: libffi/src/sparc/ffitarget.h =================================================================== --- libffi.orig/src/sparc/ffitarget.h +++ libffi/src/sparc/ffitarget.h @@ -30,8 +30,10 @@ /* ---- System specific configurations ----------------------------------- */ #if defined(__arch64__) || defined(__sparcv9) +#ifndef SPARC64 #define SPARC64 #endif +#endif #ifndef LIBFFI_ASM typedef unsigned long ffi_arg;