From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id B070A384A032; Mon, 8 Feb 2021 12:36:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B070A384A032 Received: by mail-ej1-x62d.google.com with SMTP id y9so24312753ejp.10; Mon, 08 Feb 2021 04:36:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OZPMUlTrX4g1VfkUkLLf21+tWnz1CZrHdJfkPXJwdBM=; b=cT1hcC+XYSc5DPV6Hlxkv1erkB4b0LcGg136rpozWa2pWy1ddynJKYSVBNUyKSJiwN fCCGeq6lNWjIrSSDQBD1ZgcF8BT+bvtDaYOnUmfaISJ7MP93TwyDFiKQbAbJtru212+8 YfT1Cesm4Gcc5sHks37eh9A5AyQPk8/roPCvH2LuN2QcF6M48tTPz/WiH2WDazUwi3p7 ojZoj/XMWnD/uSAcJzqM044DoGL2rymiVRpr2mfqsxHsJQPeVHDlZ+g/I3hzIF/iWNbb qFEekGuMe5uv5Ko2ci1tOhVuRQTKhcMR5D3DZqJUg5FvDsp7W8KfFa4Cpj/wyYmvIkwp vH1g== X-Gm-Message-State: AOAM533KggVlgk50zEMO5BUPTvfecB0eLe+5yKDWjFQnlmGlOvmznu3J BAU53ecm5SSOIrcyKRsbDxba7n+3Pa2zsvGkG4Sx5UXMuL0= X-Google-Smtp-Source: ABdhPJx5jaBBEVwfIT+wbdPTQPxPI1MIgbsM6Zyi62sQSlZWKp7iFHs04kwWGNjrb+OLa3do/nX7SYlnaNkpluecFcs= X-Received: by 2002:a17:906:4712:: with SMTP id y18mr16861166ejq.529.1612787775826; Mon, 08 Feb 2021 04:36:15 -0800 (PST) MIME-Version: 1.0 References: <6d8bd601-10ef-5ae1-551d-0d9ea62ee49e@gmail.com> <29869ada38d29ae1d8eccdac5935a67daf7b035d.camel@cygwin.com> In-Reply-To: <29869ada38d29ae1d8eccdac5935a67daf7b035d.camel@cygwin.com> From: marco atzeri Date: Mon, 8 Feb 2021 13:36:04 +0100 Message-ID: Subject: Re: strdup visibility To: Yaakov Selkowitz Cc: cygwin-developers@cygwin.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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: 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 12:36:18 -0000 On Mon, Feb 8, 2021 at 7:57 AM Yaakov Selkowitz via Cygwin-developers wrote: > > On Mon, 2021-02-08 at 04:04 +0100, Marco Atzeri via Cygwin-developers wrote: > > currently we have in /usr/include/string.h > > > > #if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 > > char *strdup (const char *) __malloc_like __result_use_check; > > #endif > > > > > > but the function was moved to POSIX base some time ago > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html > > > > should the conditional dropped ? Or I misunderstand it? > > Anything that is an extension in the ANSI C headers is conditionalized. Those > 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? > > -- > Yaakov I saw several source code expecting to access "strdup" thelast one was Graphviz. The fast solution, for me, is just to drop a #define _GNU_SOURCE 1 on config.h between cygconf and cygmake Regards Marco