From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 815F01382BD for ; Thu, 16 Jun 2016 13:42:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 97EA2E0B57; Thu, 16 Jun 2016 13:42:24 +0000 (UTC) Received: from mail-oi0-f65.google.com (mail-oi0-f65.google.com [209.85.218.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 19207E0B57 for ; Thu, 16 Jun 2016 13:42:23 +0000 (UTC) Received: by mail-oi0-f65.google.com with SMTP id u201so8106068oie.2 for ; Thu, 16 Jun 2016 06:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=W0A5T1BuozzzThuqUt+v/v2f3D/7KXTrkf5xLwuD578=; b=Qu5pQTbqOZCNPc92Xgh8tTfC8b0TaY3sqd/LPfdcoSKaix+ZjHcz08NCzNjtwditZ/ 2lvgaKmCkHICAVhc3+9naw3GeoiUu2JpIovXyCppf9cWXFubJrSRspPfnNxBwi7j+Z+p PXS+fh/nvSbVHvzeuN+QnOouMBjdfD9co9M90O2v+DnvqNQ295TxQqqUOl6m1FiiH6B0 BBcg8osRrmqFrnr5UN1tcChV9ahWMj//CZpXyFhmNJPTFHOf9F5ATuIwaTplSoYJUcpq qOroGV8/RZqFPSe4NfGJs6QKLRFnkJdjIhnwrlBTLMylHdP2eA4vxSf+0Kgo+ByrgeWI o/FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=W0A5T1BuozzzThuqUt+v/v2f3D/7KXTrkf5xLwuD578=; b=XHFdbwezpiu8i6wdzf0DEj+vPx5EyqABQKKDEAnmFaqGNBNFbAMGAu7aM5uRtH7DyE ilsmctF2BnoavZ3RTbe01C42+pmg4tH4AJTKjvC4yyUaHlD098G7LieovKNxg6rreZPD JvFAnn2k2Muf0NQavpbDm477KzeUlLFOpXQ/7Gfa2WEjYf8AkkPY5PXdCMC4aBcYShJ3 CJLByjslW5TXuOD0fxkLgNNzu05CYKR+cg02JepQGAGV2E1fv3k+foWg0tkBOf6GresF f4tF18s4FgbOkeq+XYqyqS/WQfV9fyijkYPuq97/BtHA/z4KsjdX/NLd7+IOohZR9efG kATQ== X-Gm-Message-State: ALyK8tLOYfCjykJkjWunwQhjHaBhrC2/SNlUaplzHv+ahQFZEjmTtoaFKf9vA+q+num5OGj9wZa2JOJ8Ztemxg== X-Received: by 10.202.214.86 with SMTP id n83mr2633429oig.66.1466084543183; Thu, 16 Jun 2016 06:42:23 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo musl list X-BeenThere: gentoo-musl@gentoo.org X-BeenThere: gentoo-musl@lists.gentoo.org MIME-Version: 1.0 Received: by 10.202.63.212 with HTTP; Thu, 16 Jun 2016 06:42:22 -0700 (PDT) In-Reply-To: <7d6fa9d6-1134-1d2a-1d06-33029b82429d@gentoo.org> References: <20160614081043.GA364@nyan> <4228046b-02f1-1b65-f56d-6e79347e4390@gentoo.org> <20302d1d-92ff-1c4b-8939-08894c3589ca@gentoo.org> <8e7cafd9-97c7-6ca1-ad3f-95bdb0060ce0@gentoo.org> <19f9f66f-5dd4-786a-3b29-0a57c407548e@gentoo.org> <1c93fa87-e2c3-2737-1222-ae93003e21ad@gentoo.org> <7d6fa9d6-1134-1d2a-1d06-33029b82429d@gentoo.org> From: Lei Zhang Date: Thu, 16 Jun 2016 21:42:22 +0800 Message-ID: Subject: Re: [gentoo-musl] [GSoC] _GNU_SOURCE in C++ To: Luca Barbato Cc: gentoo-musl@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 44b3df56-50db-487c-957f-be7d0259e184 X-Archives-Hash: 97005e0ed9372d9dd89d63a0b6bed0ad 2016-06-16 21:13 GMT+08:00 Luca Barbato : > On 16/06/16 14:47, Lei Zhang wrote: >> 2016-06-16 17:43 GMT+08:00 Luca Barbato : >>> On 16/06/16 05:36, Lei Zhang wrote: >>>> Attached is what I've got so far. >>>> >>>> Some of them are not documented in man pages, so I checked their >>>> declarations in musl's headers. Functions strtold_l, strtoll_l and >>>> strtoull_l are not available in musl, but libc++ is smart enough to >>>> not use them when linked against musl. >> >> I made a mistake. Actually strtold_l *is* available in musl, but >> hidden by _GNU_SOURCE. > > Not hidden by _BSD_SOURCE as well? No, only by _GNU_SOURCE. >>> beside vasprintf, the rest is covered by _XOPEN_SOURCE 700 >>> >>> Might be worth trying to do -U_GNU_SOURCES -D_XOPEN_SOURCE=700 and see >>> how it goes. >> >> So far vasprintf and strtold_l are not covered. vasprintf can be >> covered with -D_BSD_SOURCE. But _BSD_SOURCE is deprecated since glibc >> 2.20; I don't know if this has any impact on musl. > > It should not and -D_BSD_SOURCE should be fine for musl. I just found that vasprintf is only protected by _GNU_SOURCE in glibc, which means in this case _BSD_SOURCE only works for musl. >>> How vasprintf is used? >> >> It's used by . The code is kinda hard to read; I can't tell >> exactly what it's doing... > > same for the _l variants I guess. So what now? So far strtold_l still needs _GNU_SOURCE in musl; strtold_l, strtoll_l, strtoull_l and vasprintf all need _GNU_SOURCE in glibc. Lei