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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B73983858C41 for ; Mon, 12 Feb 2024 17:44:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B73983858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B73983858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707759895; cv=none; b=EPepPUXB57qRkK7BlANTRolj/ahnZRr4Xl9h/8lbMQktR/6wZlMZ18l6QEQXhMqxaROoH17oP52zBeRbfh0ztMQ2gP97LPTJqGNkKSRXAr1jvLi/2DTGPNysP8nAVxN/IHoB6FqTFbktU5IL8uD3N3oPNUUDzvwhlQ90qEg0TRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707759895; c=relaxed/simple; bh=H2Z9eM5tt84/t7dB5dmve4KwAu5uVM3jd/Ba4Mnk/3w=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=vS4N0S/fuAYKXfIz2KTapfAw5INgHptBpsRUyG85J3SI4j3vPf6EJHCMsJTOtJT73rKYHMT7jRXrUKpmsU5nVDVfcO45swucRttg4fN32tkIUJqK192DAmgCS4gUDNgD/0YZ2fvKwXvDxffVMT9+XDa3o2ZkaukfsrD/CYr7XcA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707759894; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=pWF022PC1UzimXnXTlXekAagaTWNNfvKu7HFEQ4doFk=; b=QYpAppU0OVyJqJxcM9Tcb5yuR8mlxLPvdtbOPxe/e6JNUEkU/0oTjC8E3lOUpBqEn0iKGA 9rrxJYCX7gW9aEgXJy3YncO5esl8VMlAZR6mqv498fqCw6NpI8G8xBRyHDHy0KEpOA25z1 xjZ79okEABiQmSdwQ18jvG+264TLbHs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-cenW3m5PPfKYCsSpzExVEw-1; Mon, 12 Feb 2024 12:44:49 -0500 X-MC-Unique: cenW3m5PPfKYCsSpzExVEw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DFA7685A58A; Mon, 12 Feb 2024 17:44:48 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.195.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD7BD492BC6; Mon, 12 Feb 2024 17:44:48 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 86DC7A80CB4; Mon, 12 Feb 2024 18:44:47 +0100 (CET) Date: Mon, 12 Feb 2024 18:44:47 +0100 From: Corinna Vinschen To: Torbjorn SVENSSON Cc: Andrew Pinski , Newlib , Yvan Roux Subject: Re: Mismatch between newlib and glibc regarding fileno Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: Torbjorn SVENSSON , Andrew Pinski , Newlib , Yvan Roux References: <52858367-f116-413e-b107-61c8afce156b@foss.st.com> <42f199ba-8905-4846-9768-54342244610e@foss.st.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 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=-5.2 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Feb 12 18:11, Torbjorn SVENSSON wrote: > On 2024-02-12 17:40, Corinna Vinschen wrote: > > On Feb 12 17:33, Corinna Vinschen wrote: > > > On Feb 12 16:36, Torbjorn SVENSSON wrote: > > > > Okay, so newlib is more restrictive than glibc on this topic. > > > > I will prepare a patch for test cases in GCC with defining _POSIX_SOURCE so > > > > that the test cases succeed for newlib. > > > > > > It looks like it. But I do wonder if that's really intended by glibc. > > > I ran a quick test, first under newlibL > > > [...] > > > How is it possible that with -std=c++98, everything and the kitchen sink > > > is enabled? Is that really correct?!? > > > > ...especially since __STRICT_ANSI__ is defined to 1 in this scenario. > > Do you know any way to identify if this is the intended behavior or if it's > an overlook in the glibc end? Except for asking on the glibc mailing list, no. > Regardless if glibc is doing this deliberately or not, I suppose the correct > thing is to manually define _POSIX_VISIBLE in the test case, right? Yes, I would suggest that. It can't be wrong to be very exact there. Corinna