From patchwork Mon Mar 28 09:02:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 88580 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 6A1A9B6F8E for ; Mon, 28 Mar 2011 20:02:31 +1100 (EST) Received: (qmail 26663 invoked by alias); 28 Mar 2011 09:02:26 -0000 Received: (qmail 26652 invoked by uid 22791); 28 Mar 2011 09:02:25 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Mar 2011 09:02:20 +0000 Received: by qwh5 with SMTP id 5so2090057qwh.20 for ; Mon, 28 Mar 2011 02:02:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.79.196 with SMTP id q4mr3055161qck.132.1301302939028; Mon, 28 Mar 2011 02:02:19 -0700 (PDT) Received: by 10.229.97.206 with HTTP; Mon, 28 Mar 2011 02:02:18 -0700 (PDT) In-Reply-To: References: <20110328081250.GA17538@adacore.com> Date: Mon, 28 Mar 2011 11:02:18 +0200 Message-ID: Subject: Re: [patch ada]: Fix issues about multilib build of native windows and handle MSG_WAITALL for windows native targets From: Kai Tietz To: Arnaud Charlet Cc: GCC Patches 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 2011/3/28 Kai Tietz : > > ChangeLog gcc/ada (ada_wt.txt) > > 2011-03-28  Kai Tietz > >        * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype to >        prevent warning. >        * g-socthi-mingw.adb (C_Recvmsg): Handle MSG_WAITALL for >        windows native targets. >        * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows >        targets to flag value. Just noticed I had a wrong shift-value for MSG_WAITALL. It should be 8. Updated patch attached. Kai Index: gcc/gcc/ada/g-socthi-mingw.adb =================================================================== --- gcc.orig/gcc/ada/g-socthi-mingw.adb 2010-09-09 16:07:42.000000000 +0200 +++ gcc/gcc/ada/g-socthi-mingw.adb 2011-03-28 09:42:45.039326300 +0200 @@ -277,7 +277,8 @@ package body GNAT.Sockets.Thin is use type C.size_t; Fill : constant Boolean := - (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0; + SOSC.MSG_WAITALL /= -1 + and then (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0; -- Is the MSG_WAITALL flag set? If so we need to fully fill all vectors Res : C.int; Index: gcc/gcc/ada/raise-gcc.c =================================================================== --- gcc.orig/gcc/ada/raise-gcc.c 2010-10-28 22:36:06.000000000 +0200 +++ gcc/gcc/ada/raise-gcc.c 2011-03-28 09:11:43.053384100 +0200 @@ -1065,6 +1065,11 @@ typedef _Unwind_Action phases_arg_t; #endif _Unwind_Reason_Code +PERSONALITY_FUNCTION (version_arg_t, phases_arg_t, + _Unwind_Exception_Class, _Unwind_Exception *, + _Unwind_Context *); + +_Unwind_Reason_Code PERSONALITY_FUNCTION (version_arg_t version_arg, phases_arg_t phases_arg, _Unwind_Exception_Class uw_exception_class, Index: gcc/gcc/ada/s-oscons-tmplt.c =================================================================== --- gcc.orig/gcc/ada/s-oscons-tmplt.c 2010-12-24 11:41:57.000000000 +0100 +++ gcc/gcc/ada/s-oscons-tmplt.c 2011-03-28 09:15:39.683932300 +0200 @@ -1084,6 +1084,10 @@ CND(MSG_PEEK, "Peek at incoming data") CND(MSG_EOR, "Send end of record") #ifndef MSG_WAITALL +#ifdef __MINWGW32__ +/* We use it on windows native targets, so set to flag value. */ +# define MSG_WAITALL (1 << 3) +#else # define MSG_WAITALL -1 #endif CND(MSG_WAITALL, "Wait for full reception")