From patchwork Tue Mar 12 16:32:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1055532 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-497769-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gdcproject.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44JgVt11mBz9s7h for ; Wed, 13 Mar 2019 03:32:36 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:cc:content-type; q=dns; s=default; b=LWPL1jEAVbrwI8wqgmWc3RYtk9y2UWuwUn29ZZuItO8 zJaLJO+SdorxOZtqDtDWBojKAKCpIJ0pRbLEp3ihJmwyS/Bw7Wj+7rB380caBtUl 9onyvMV79GJmfbeSBVuFj4Az9//UQkwOoqBl3vrWHC1cPRzozSCYhp7acDU1BdNo = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:cc:content-type; s=default; bh=SE9vhEdVdqeI2sEWsk4MqFE9mqs=; b=fX6vbnb+lcpfFb4+m jajFzaaELOnEpZ5C2FvxWOgYKqQ6CH8EDzHiqOv4Tb8yT5wFNig/5BegGz7ELVhy kYyWCGa2mycL4+NY2KvZr6IpvaI7zNuXEswkHEhFt3QaeiUcrTJpayAtvAHUHvFH H28EoJGzKFMuoOFbR1GyCEiuNk= Received: (qmail 88001 invoked by alias); 12 Mar 2019 16:32:27 -0000 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 Received: (qmail 87931 invoked by uid 89); 12 Mar 2019 16:32:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qt1-f179.google.com Received: from mail-qt1-f179.google.com (HELO mail-qt1-f179.google.com) (209.85.160.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Mar 2019 16:32:25 +0000 Received: by mail-qt1-f179.google.com with SMTP id v10so3239883qtp.8 for ; Tue, 12 Mar 2019 09:32:25 -0700 (PDT) MIME-Version: 1.0 From: Iain Buclaw Date: Tue, 12 Mar 2019 17:32:12 +0100 Message-ID: Subject: [PATCH, PR d/87866] Committed redefine realpath as lrealpath in dmd front-end To: gcc-patches Cc: Rainer Orth X-IsSubscribed: yes Hi, This patch is a second fix for PR d/87866, as dmd front-end function FileName::canonicalName could be called during the semantic pass of import("file") expressions, so still requires that realpath() be redefined. Bootstrapped and ran D2 testsuite on x86_64-linux-gnu. Committed to trunk as r269619. diff --git a/gcc/d/d-system.h b/gcc/d/d-system.h index c32825d4ad1..efece15f3bc 100644 --- a/gcc/d/d-system.h +++ b/gcc/d/d-system.h @@ -31,6 +31,10 @@ #undef assert #define assert(EXPR) gcc_assert(EXPR) +/* Use libiberty's lrealpath to avoid portability problems. */ +#undef realpath +#define realpath(a, b) lrealpath((a)) + /* Forward ctype.h macros used by the dmd front-end to safe-ctype.h. */ #undef isalpha #define isalpha(c) ISALPHA(c)