From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id C6C9A3857011; Tue, 12 Jan 2021 19:58:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C6C9A3857011 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ro@cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 66830AD9F9; Tue, 12 Jan 2021 20:58:50 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K3W-6JD4ifqY; Tue, 12 Jan 2021 20:58:49 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb15f.dip0.t-ipconnect.de [79.221.177.95]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 183B7AE009; Tue, 12 Jan 2021 20:58:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1610481529; bh=nhwTnr1aB2X1kCAXg4z/0egurHaelEYEelPiLaWpYWY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=V5qMRjtDUcRvCHm97beYNzM5T/vnLBz35qrgaenF0KESNF2WztKaOaVnftGQ34a8n +fFhEox/mzNOp9CSf7BeCCL7ZkFt5UnbafkEnGY74SVyZDthfCqFbeG4CXLQRdSfCD wl8L6RjUdLc2iSROehHX2IFajZ69+CIZerxRhFjezTUBrqzGH1Wv6OsZAZcT3aoXtd icgR7eBKMaI2cmKl1NDmwzrHkboqewkUFT0kNR+09S+yv6dB6im2im3B5YQMu0UoXf W3ts19C6RRK1mnoOQIzbrVsDjNWKDJScbNr12j73emwoNt9KftnbALJqULuhHB2u6s qpKnU44W6aBpQ== From: Rainer Orth To: David Edelsohn Cc: Jonathan Wakely , "libstdc++@gcc.gnu.org" , David Edelsohn via Gcc-patches , "CHIGOT, CLEMENT" Subject: Re: [PATCH] libstdc++: implement locale support for AIX References: <20210111154058.GB21410@redhat.com> <20210112152505.GE21410@redhat.com> Date: Tue, 12 Jan 2021 20:58:48 +0100 In-Reply-To: (David Edelsohn's message of "Tue, 12 Jan 2021 12:44:38 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3789.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 19:58:53 -0000 Hi David, >> >> Presumably it could also be tested on GNU/Linux and Solaris, since >> >> they implement the POSIX 2008 APIs needed. >> > >> > I'll give the patch a whirl on Solaris. However, we will need to >> > distinguish between 11.3 (which is XPG6 only) and 11.4 (which support >> > XPG7). >> >> as almost expected, a build on Solaris 11.4 failed miserably due to the >> use of the various BSD extensions (localeconv_l, mbstowcs_l, strtod_l, >> strtof_l, strtold_l, wcsftime_l), whose use or fallback implementations >> are currently guarded by _AIX. Should those be used in a directory >> supposed to conform to POSIX.1-2008 at all? OTOH, almost duplicating >> the code into a separate bsd (or whatever, it's certainly not only >> DragonflyBSD) directory for this sole reason would be a shame. > > Hi, Rainer > > Thanks for testing. > > I agree that #ifdef's are not the correct approach, but, if you enable > the fallbacks for Solaris, does everything then work? Are those > fallbacks portable and we solely need a better mechanism to enable > them on platforms that require them? it mostly compiles, with two caveats: * c_locale.h needs to include for declarations of strtod and friends. * Solaris only declares the int_p_cs_precedes etc. members of struct lconv for C99+, but not for C++11+, as it should. I'll file a bug for that, but for now one can work around the issue by defining _LCONV_C99 before including in monetary_members.cc. With those changes, I can at least build libstdc++ with --enable-clocale=ieee_1003.1-2008. Bootstrap still running, though. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University