From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 8E5613857808 for ; Thu, 15 Oct 2020 17:11:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8E5613857808 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-514-1-wnL2ZtOiuBlydAs-jTcw-1; Thu, 15 Oct 2020 13:11:41 -0400 X-MC-Unique: 1-wnL2ZtOiuBlydAs-jTcw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C2AA640A1; Thu, 15 Oct 2020 17:11:40 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-114-205.ams2.redhat.com [10.36.114.205]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 15D651992D; Thu, 15 Oct 2020 17:11:37 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 4D380A82BC2; Thu, 15 Oct 2020 19:11:36 +0200 (CEST) Date: Thu, 15 Oct 2020 19:11:36 +0200 From: Corinna Vinschen To: Torbjorn SVENSSON , Jeff Johnston Cc: "newlib@sourceware.org" Subject: Re: [PATCH v2] libc/time: Move internal newlib tz-structs to local.h Message-ID: <20201015171136.GA582570@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: Torbjorn SVENSSON , Jeff Johnston , "newlib@sourceware.org" References: <20201005125011.28344-1-torbjorn.svensson@st.com> <20201015102139.GI26704@calimero.vinschen.de> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, 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: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2020 17:11:44 -0000 On Oct 15 16:47, Torbjorn SVENSSON via Newlib wrote: > Hello Corinna, > > Thanks for the feedback and I hope that you had a nice vacation! > > I haven't run tests with your patch applied, but just reading it should be fine. > I see no reason why "sys/_tz_structs.h" would be included from > "bits/stdc++.h", and it is this particular include chain that is > causing the problems in the libstdc ++ test suite, so if it works for > Cygwin, I'd say go for it! Thanks for reviewing. I'll push the patch in a minute. I still think we should rename the struct members as well, though. There's no good reason that we have a user of these structures outside newlib/Cygwin. But still, *iff* this file is included for whatever dubious purpose, it might result in problems. We have two ways to fix this: - Either guard the definitions additionally with a preprocessor expression like this: #if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB) [...] #endif - or fix the names of the struct members and the newlib/Cygwin code using them. Thoughts? Jeff? Corinna