From patchwork Thu Oct 5 16:32:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 821931 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-463552-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="oeFQCCBf"; dkim-atps=neutral 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 3y7JGp4XJpz9rvt for ; Fri, 6 Oct 2017 03:33:05 +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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=qDoejHO6Lxp/+Glr ieW3bdnkMdeLbzKJzBgfFBHe6QlVjmk86ZKrRtudaIekXYNi+n3qkxkwbTlCcwiW kLdYPJxtdZlRYYdGGNDqennegREjncl8+N2AkRA8F6WC0/VPUBZhoa9xc4MBhHwP Vo79ezi8DGijr8SPVpK4PCy+U3M= 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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=jEh38XzouaBVe2Ioba4Wbr ZMY1I=; b=oeFQCCBfbHGTYZJ593lstatvCU6urc9q9JfeTW6BQbVbyjBQ+i2ZD2 4BhNjnnh+o8+2wiYKWJHDBmHQD+MIxDB2lZcaga0xeC9C/Y5fr1cUbOjwhbCOx8S Js5X0ABflI9JuLnscQ7g86y2Ju3y5YxPCGlRsOPy4IaV+0NbZEc48= Received: (qmail 74900 invoked by alias); 5 Oct 2017 16:32:58 -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 74881 invoked by uid 89); 5 Oct 2017 16:32:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Cygwin64 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Oct 2017 16:32:56 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 1B05282310 for ; Thu, 5 Oct 2017 18:32:53 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VE4mSlNGEbAq for ; Thu, 5 Oct 2017 18:32:53 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id EA99A822E1 for ; Thu, 5 Oct 2017 18:32:52 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix PR ada/82393 Date: Thu, 05 Oct 2017 18:32:52 +0200 Message-ID: <1951967.6gvYFoEp07@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 It's a build failure on Cygwin64 and is very similar to PR ada/64640, which was a build failure on Cygwin32. Instead of defining non-existent constants, let's just reuse the DJGPP version of __gnat_set_mode here. Applied on the mainline and 7 branch. 2017-10-05 Eric Botcazou PR ada/82393 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete. * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin. Index: mingw32.h =================================================================== --- mingw32.h (revision 253398) +++ mingw32.h (working copy) @@ -59,16 +59,6 @@ #endif #include -#ifndef _O_U8TEXT -#define _O_U8TEXT _O_TEXT -#endif -#ifndef _O_U16TEXT -#define _O_U16TEXT _O_TEXT -#endif -#ifndef _O_WTEXT -#define _O_WTEXT _O_TEXT -#endif - /* After including this file it is possible to use the character t as prefix to routines. If GNAT_UNICODE_SUPPORT is defined then the unicode enabled versions will be used. */ Index: sysdep.c =================================================================== --- sysdep.c (revision 253398) +++ sysdep.c (working copy) @@ -126,7 +126,7 @@ extern struct tm *localtime_r(const time */ -#if defined (WINNT) || defined (__CYGWIN__) || defined(__DJGPP__) +#if defined (WINNT) || defined (__CYGWIN__) || defined (__DJGPP__) const char __gnat_text_translation_required = 1; @@ -137,7 +137,7 @@ const char __gnat_text_translation_requi #define WIN_SETMODE _setmode #endif -#if defined(__DJGPP__) +#if defined (__DJGPP__) #include #define _setmode setmode #endif /* __DJGPP__ */ @@ -154,7 +154,7 @@ __gnat_set_text_mode (int handle) WIN_SETMODE (handle, O_TEXT); } -#ifdef __DJGPP__ +#if defined (__CYGWIN__) || defined (__DJGPP__) void __gnat_set_mode (int handle, int mode) { @@ -826,7 +826,7 @@ __gnat_localtime_tzoff (const time_t *ti #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (__linux__) \ || defined (__GLIBC__) || defined (__DragonFly__) || defined (__OpenBSD__) \ - || defined(__DJGPP__) + || defined (__DJGPP__) { localtime_r (timer, &tp); *off = tp.tm_gmtoff;