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 0A3B31382BE for ; Tue, 21 Jun 2016 04:54:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7517EE08E6; Tue, 21 Jun 2016 04:54:25 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) (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 97732E08E6 for ; Tue, 21 Jun 2016 04:54:24 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id mu6so6666536obc.3 for ; Mon, 20 Jun 2016 21:54:24 -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=THpVttTcKDB77lY4KsXVYp+HvVBFvEskbossvZKcpws=; b=Mn2ewji6D56Q9mWdpHidk4ahwe0mLMp0HMFyE8D8hHaKeZFiSwHw0R68AW3tHODmkK 54KUoEag1HLbqA9zvpARPLYDCe+96ze5SW0CP4buTCIlTcvTuXzVwJFM6YRzjEX+shu+ +MprQK788++JNp+6LtKtIFEWhJiDZngagG5lIC/amegEnWWX7vMiG+aUbFMFUxYTZU95 QwBhYHIR9E9SMM75hogFvEatAq1jh4PMPSqxNDse39+PcfFaC+AsP8b8m+fzOVEjMQoo kFWGDZJACoVejKIjqgh56K9lw+B9Ji9l8hawejOgOQAwx+cRBVr8N2kcW99+7O5r8O9q BvuQ== 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=THpVttTcKDB77lY4KsXVYp+HvVBFvEskbossvZKcpws=; b=NKntq1D5AOtVH1L6gVepr3JqsPa4x86bLSECv34LxRK7no1iwk0n6zP2EuoMwqwhM6 CpjmAeZkQX3GtHIShwM5agCFqDHgDgrTQNjPIUWP9YKZUQkXxPp0ruO1FHmUTHfzvnai /qOzuTIxINMn9YcXprgbn+IWQEj5eC9QjuHTdRfdOSxxLQfl4OmvStxm5xo8TIlbVr29 GY5RxZ0wiXlIZI6jg30a+lR/LyC7hVllzTKdeiENGQdWqkgaGFKg2LC111XppkXQTXzl rQGHZSUr0P42gJRszRhmL+n9+7skIHXhF0JBvts1yvXTaN3uQcL/fqMEPE9maDW7BaMp /Wig== X-Gm-Message-State: ALyK8tJeWoTy9g9YaHsIzSzBqZ5dvYY42VFMgMffslPtBLeURGomWYS8aRooZe7TQkQfUZI2PgZczXJHqUfoVg== X-Received: by 10.157.10.70 with SMTP id 64mr13820780otg.131.1466484863686; Mon, 20 Jun 2016 21:54: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; Mon, 20 Jun 2016 21:54:23 -0700 (PDT) In-Reply-To: References: <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> <37117cc0-2af1-306d-6ec5-d8d37d8c588c@gentoo.org> From: Lei Zhang Date: Tue, 21 Jun 2016 12:54:23 +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: d2a91ab7-7ae3-40b5-85b2-3d3abc5de105 X-Archives-Hash: 46cfa6e9fea5e3f05954b39e91e32630 2016-06-17 20:44 GMT+08:00 Lei Zhang : > After putting about eight "#define _GNU_SOURCE"s in various *.cpp > files, it seems to work now :) I was wrong; it doesn't work... I still can't figure out a good solution :( Take glibc's strtoll_l for example: it's hidden by _GNU_SOURCE in stdlib.h and used exclusively by libc++'s header ; but defining _GNU_SOURCE in could be too late, since stdlib.h might be included prior to . Though glibc's stdlib.h is only explicitly included in , defining _GNU_SOURCE in doesn't work either. It turns out strtoll_l (and others) is not directly protected by _GNU_SOURCE, but by __USE_GNU, which is in turn defined in features.h according to _GNU_SOURCE. That means "#define _GNU_SOURCE" must appear before the inclusion of features.h, and it's not very clear where "#undef _GNU_SOURCE" should be put. Any suggestions? Lei