From patchwork Wed May 4 15:34:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 618506 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r0MXj59C6z9sf9 for ; Thu, 5 May 2016 01:34:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=YHx7OKKh; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=Wgjdeb7nRRO1TY1An gSgxiTex09Kq9Pu3PbxGBfvf3vy5Cs2RGFJbl0SZQ1epEo+7aVsiJEkXYg6QExSH velTwKci9yweVxbqAWtCQQmtneQ1xNa3DxHxBqdHNHoabm7kFfs3qFOl6RU/UiPe WWX5j5DeeiGJXFqa7o1XoQByqg= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=bbE5qnCgiEgNpounOG9Z7S2 4m8A=; b=YHx7OKKhGiPLWzL1R0WYfL0sLgP5DJyfiQcTt5F5x2V7FqzizPORV7x Y5XtUxwIgXDsKo/d2fK4IQv9ME+ss+5v4KbMhMrjBDGrbmUEZTylMX/J4Q/S+QWq H3ivcAV89kldC0Wq7feVb34OyVsbyRWqCasCDEj1eZQmBJMPaXd0= Received: (qmail 12476 invoked by alias); 4 May 2016 15:34:21 -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 12458 invoked by uid 89); 4 May 2016 15:34:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL, BAYES_50, SPF_NEUTRAL autolearn=no version=3.3.2 spammy=Hx-languages-length:1515, Get_Page_Size, UD:shm.h, UD:ada-hurd.diff X-HELO: mail2-relais-roc.national.inria.fr Received: from mail2-relais-roc.national.inria.fr (HELO mail2-relais-roc.national.inria.fr) (192.134.164.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 04 May 2016 15:34:10 +0000 Received: from nat-inria-bordeaux-52-gw-01-bso.bordeaux.inria.fr (HELO var.youpi.perso.aquilenet.fr) ([194.199.1.52]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 May 2016 17:34:07 +0200 Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.87) (envelope-from ) id 1axyoR-0004vC-85; Wed, 04 May 2016 17:34:07 +0200 Date: Wed, 4 May 2016 17:34:07 +0200 From: Samuel Thibault To: Svante Signell Cc: Eric Botcazou , gcc-patches@gcc.gnu.org, Arnaud Charlet , Matthias Klose Subject: Re: Please include ada-hurd.diff upstream (try2) Message-ID: <20160504153407.GG2861@var.bordeaux.inria.fr> References: <1456875776.5852.194.camel@gmail.com> <20160425095016.GB17357@adacore.com> <1461580096.8664.262.camel@gmail.com> <3112260.f0kR4riLZQ@polaris> <1461744364.8664.335.camel@gmail.com> <20160504152948.GF2861@var.bordeaux.inria.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160504152948.GF2861@var.bordeaux.inria.fr> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) Samuel Thibault, on Wed 04 May 2016 17:29:48 +0200, wrote: > The gcc-6 build failed. I see that one of the change is: > > - -- From: /usr/include/unistd.h __getpagesize or getpagesize?? > - function Get_Page_Size return int; > + -- From: /usr/include/i386-gnu/bits/shm.h __getpagesize or getpagesize?? > + function Get_Page_Size return size_t; > + function Get_Page_Size return Address; > > Why using size_t and Address? Other OSes use int, and the prototype for > getpagesize is returning int. > > Also, don't use the __ versions of the glibc functions, they are > internal aliases, the API is without __. I.e. the proposed change below. Samuel 2016-05-04 Samuel Thibault * s-osinte-gnu.ads: Make Get_Page_Size return int, and make it use getpagesize instead of __getpagesize. --- a/src/gcc/ada/s-osinte-gnu.ads +++ b/src/gcc/ada/s-osinte-gnu.ads @@ -344,10 +344,9 @@ package System.OS_Interface is -- returns the stack base of the specified thread. Only call this function -- when Stack_Base_Available is True. - -- From: /usr/include/i386-gnu/bits/shm.h __getpagesize or getpagesize?? - function Get_Page_Size return size_t; - function Get_Page_Size return Address; - pragma Import (C, Get_Page_Size, "__getpagesize"); + -- From: /usr/include/i386-gnu/bits/shm.h + function Get_Page_Size return int; + pragma Import (C, Get_Page_Size, "getpagesize"); -- Returns the size of a page -- From /usr/include/i386-gnu/bits/mman.h