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 65CF4386F417; Tue, 12 Jan 2021 16:00:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 65CF4386F417 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 1686CAD4C4; Tue, 12 Jan 2021 17:00:31 +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 WKPAE4dTWAUp; Tue, 12 Jan 2021 17:00:30 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddbcfa.dip0.t-ipconnect.de [79.221.188.250]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 5AA18AD4C3; Tue, 12 Jan 2021 17:00:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1610467230; bh=jbrWcVajAhUl+h50e6+5OBpyGDYr9g1ssMZJ3zsZdsE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=HNmu8ZScyWcKlKKuBnYqYEFfzOfGhNRJHNbacNj+Pf4CclNO6RQ4MVEUG41O1OfkU tnICfMC2VAe3WG+yaeSTPRNy+E1QgIX/G3zULQ/+GK0N90Mvn4uxxrXD1hdU10Ggot vE8joIrR2l9Sm/kSRjNjUcqFmsG7w4SJx13YqcZ9odZg6ec7DBGb2bDSD+8gi1GBqs csfIeCwjOkKTfR+ifLa7hmw37nbGcW8JPWyWTzRYpfeGB7t2z8f40td0RYro1dlm9a D4aXjHiQTynjDen2mD9kLt5MxytDwXU8pb/38X4F1H54Cz3h/+ZNpGs3FVeyA9PibC p2TAqGYg2TCJg== From: Rainer Orth To: "CHIGOT, CLEMENT" Cc: David Edelsohn , Jonathan Wakely , David Edelsohn via Gcc-patches , "libstdc++@gcc.gnu.org" Subject: Re: [PATCH] libstdc++: implement locale support for AIX References: <20210111154058.GB21410@redhat.com> Date: Tue, 12 Jan 2021 17:00:29 +0100 In-Reply-To: (CLEMENT CHIGOT's message of "Tue, 12 Jan 2021 15:14:45 +0000") 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 16:00:34 -0000 Hi Clement, > I've reworked the patch to merged dragonfly and AIX > models into the new one named "ieee_1003.1-2008".=C2=A0 > It seems okay on the AIX part but if someone can test > on Dragonfly and Freebsd I would be glad.=C2=A0Configure=20 > needs to be regenerated, first. > > For now, I've used #ifdef inside the code for the few > differences. There are less than I thought. So, it seems=20 > okay to me.=20 TBH, I find this liberal sprinkling of target-specific #ifdefs over the code horrible: it's completely out of style with GCC conventions. This is exactly what autoconf is for: test for the existance of headers and functions like strtof_l and act accordingly. If in the future other OSes will make use of the code, most differences will already be handled and it's way easier to understand defined(HAVE_STRTOF_L) than defined(_AIX) || defined(HP_UX). From your code one simply cannot tell why some code is used on AIX while something else on (say) DragonflyBSD. It gets even worse when (as does happen) standard support differs between versions: expressing this with platform ifdefs is nothing short of a nightmare. Rainer --=20 ---------------------------------------------------------------------------= -- Rainer Orth, Center for Biotechnology, Bielefeld University