From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [207.211.30.44]) by sourceware.org (Postfix) with ESMTP id 05262384B820 for ; Mon, 8 Feb 2021 06:21:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 05262384B820 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-125-Rod2sjzjPNmZweJoDGF-Tg-1; Mon, 08 Feb 2021 01:21:28 -0500 X-MC-Unique: Rod2sjzjPNmZweJoDGF-Tg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 427979126F for ; Mon, 8 Feb 2021 06:21:27 +0000 (UTC) Received: from yselkowitz.remote.redhat.com (ovpn-2-4.rdu2.redhat.com [10.22.2.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E32806F95B for ; Mon, 8 Feb 2021 06:21:26 +0000 (UTC) Message-ID: <29869ada38d29ae1d8eccdac5935a67daf7b035d.camel@cygwin.com> Subject: Re: strdup visibility From: Yaakov Selkowitz To: cygwin-developers@cygwin.com Date: Mon, 08 Feb 2021 01:21:25 -0500 In-Reply-To: <6d8bd601-10ef-5ae1-551d-0d9ea62ee49e@gmail.com> References: <6d8bd601-10ef-5ae1-551d-0d9ea62ee49e@gmail.com> User-Agent: Evolution 3.38.3 (3.38.3-1.fc33) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: cygwin.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2021 06:21:32 -0000 On Mon, 2021-02-08 at 04:04 +0100, Marco Atzeri via Cygwin-developers wrote= : > currently we have in=C2=A0 /usr/include/string.h >=20 > #if __MISC_VISIBLE || __POSIX_VISIBLE >=3D 200809 || __XSI_VISIBLE >=3D 4 > char=C2=A0=C2=A0=C2=A0 *strdup (const char *) __malloc_like __result_use_= check; > #endif >=20 >=20 > but the function was moved to POSIX base some time ago > https://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html >=20 > should the conditional dropped ? Or I misunderstand it? Anything that is an extension in the ANSI C headers is conditionalized. Th= ose conditions match the progressive standardization of this function and it's eventual inclusion in POSIX-1.2008. Have you run into a real-world issue with these conditions? --=20 Yaakov