From patchwork Fri Dec 16 15:24:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 131832 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 CDD531007D7 for ; Sat, 17 Dec 2011 02:24:37 +1100 (EST) Received: (qmail 18322 invoked by alias); 16 Dec 2011 15:24:34 -0000 Received: (qmail 18310 invoked by uid 22791); 16 Dec 2011 15:24:33 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_CP X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Dec 2011 15:24:18 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 54F34CB1AEF for ; Fri, 16 Dec 2011 16:24:18 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XZcT9PM9w9VK for ; Fri, 16 Dec 2011 16:24:18 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 4276BCB1AEA for ; Fri, 16 Dec 2011 16:24:18 +0100 (CET) From: Tristan Gingold Subject: [Patch]: vms: map 'environ' Date: Fri, 16 Dec 2011 16:24:16 +0100 Message-Id: <1E8635DB-7FED-4FC4-8822-E234B7C85022@adacore.com> To: GCC Patches Mime-Version: 1.0 (Apple Message framework v1251.1) X-IsSubscribed: yes 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 Hi, libiberty/pex-unix.c uses the global variable 'environ', which is available on VMS but with a DEC-C name. This patch adds a translation for it in the VMS table. Committed on trunk. Tristan. 2011-12-16 Tristan Gingold * config/vms/vms.c (VMS_CRTL_GLOBAL): Define. (vms_patch_builtins): Handle. * config/vms/vms-crtlmap.map: Add an entry for environ. Index: vms-crtlmap.map =================================================================== --- vms-crtlmap.map (revision 182402) +++ vms-crtlmap.map (working copy) @@ -63,6 +63,7 @@ ctime dup dup2 +environ GLOBAL exit exp FLOAT fabs FLOAT Index: vms.c =================================================================== --- vms.c (revision 182402) +++ vms.c (working copy) @@ -45,6 +45,9 @@ /* Prepend x before the name for printf like functions. */ #define VMS_CRTL_PRNTF (1 << 4) +/* Prepend ga_ for global data. */ +#define VMS_CRTL_GLOBAL (1 << 5) + struct vms_crtl_name { /* The standard C name. */ @@ -123,6 +126,12 @@ rlen += 9; } + if (n->flags & VMS_CRTL_GLOBAL) + { + memcpy (res + rlen, "ga_", 3); + rlen += 3; + } + if (n->flags & VMS_CRTL_FLOAT) res[rlen++] = 't';