Message ID | d2478592-595d-d530-f39a-b38c33199f87@linaro.org |
---|---|
State | Dropped |
Headers |
Received: (qmail 95491 invoked by alias); 9 Feb 2017 22:42:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 95435 invoked by uid 89); 9 Feb 2017 22:42:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=manpages, H*r:sk:17.2017 X-HELO: mail-qk0-f170.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=J/kuFkLmkIpAbc17f0F5mxxzFy/G+o2OrKQf7rINgzQ=; b=Pppctd5uXMDeBJ/65Iz6f5kkrZUunPPvfvX6R/AydBnpDSOa+K63GeIRq+kMUCIONk L1LiA1Dl0cQ4lyUU9WK7iLsPe5sGg+iaJDEJV0WgUYOsN7fM6svbuMSzCNvSSHF14sKx ghE9Ms4ihgdoqsq0VC1/4uySifnmBoKJpoCa1tUJbmifCMxBJBuwMltX2gL/vqkVt9lL hWc0fM1DDQbPL7uwvuA/AXB259dTiqevwOJKqBN4y0+XkyigKJfMYKJyrilPDojFvNc5 /Ujz6/PNXBcm5uygaPiZgO2G2aGDn41sFKv0hKYG5hNNcaiuJsS65Z2HkVCN/HaoyTFB J54g== X-Gm-Message-State: AMke39nL8PRAKM0v4MuYR2TC9unOSA7yXOgc/0HdZKFOtdeoJNnmb9fvbJNZgC81RPXhajK3 X-Received: by 10.55.158.87 with SMTP id h84mr5897739qke.176.1486680142838; Thu, 09 Feb 2017 14:42:22 -0800 (PST) Subject: Re: [GLIBC][PATCH v2] Remove strdup inlines To: Joseph Myers <joseph@codesourcery.com> References: <AM5PR0802MB26104922C496F25DABAFC47283980@AM5PR0802MB2610.eurprd08.prod.outlook.com> <CAKCAbMh4uqH+7XLA4iRKohu_JPCKCJjxm0G+sDjVayxSgXxWXg@mail.gmail.com> <AM5PR0802MB2610771B31B5E13D39AFB89483980@AM5PR0802MB2610.eurprd08.prod.outlook.com> <AM5PR0802MB26105C61918F323EC765968F83450@AM5PR0802MB2610.eurprd08.prod.outlook.com> <6144d797-8520-29f1-c457-275fcb2a2b6c@linaro.org> <alpine.DEB.2.20.1702092155180.12346@digraph.polyomino.org.uk> Cc: libc-alpha@sourceware.org From: Adhemerval Zanella <adhemerval.zanella@linaro.org> Message-ID: <d2478592-595d-d530-f39a-b38c33199f87@linaro.org> Date: Thu, 9 Feb 2017 20:42:18 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <alpine.DEB.2.20.1702092155180.12346@digraph.polyomino.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit |
Commit Message
Adhemerval Zanella Netto
Feb. 9, 2017, 10:42 p.m. UTC
On 09/02/2017 19:57, Joseph Myers wrote: > On Thu, 9 Feb 2017, Adhemerval Zanella wrote: > >> Also for strdup I think __USE_XOPEN2K8 is not required, accordingly to manual >> it is defined for >> >> _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED > > strdup was XSI-shaded in the 2001 edition of POSIX but moved to CX-shaded > in the 2008 edition. That is, it should be declared for > _POSIX_C_SOURCE=200809L. That is, the existing __USE_XOPEN2K8 condition > (which means non-XSI 2008 edition of POSIX) is right. Indeed, I was in fact confused my documentation and the manpages confirmed that it is true for glibc 2.12 and forward. In any case, I think both these macros should be removed [2]. [2] https://sourceware.org/ml/libc-alpha/2017-02/msg00201.html > >> And __USE_XOPEN_EXTENDED will be set for _XOPEN_SOURCE >= 500 or if >> _XOPEN_SOURCE_EXTENDED is defined. At least all required defined are >> suffice on conform testcases for just > > This indicates you've found a bug in the conform/ expectations - strdup > should be required there for POSIX2008. > Right, so if I think the condition on conform/data/string.h-data should be:
Comments
On Thu, 9 Feb 2017, Adhemerval Zanella wrote: > Right, so if I think the condition on conform/data/string.h-data should be: > > diff --git a/conform/data/string.h-data b/conform/data/string.h-data > index 39fa76c..b7c2784 100644 > --- a/conform/data/string.h-data > +++ b/conform/data/string.h-data > @@ -27,7 +27,7 @@ function int strcoll_l (const char*, const char*, locale_t) > #endif > function {char*} strcpy (char*, const char*) > function size_t strcspn (const char*, const char*) > -#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG3 && !defined POSIX && !defined POSIX2008 > +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG3 && !defined POSIX && defined POSIX2008 No, just remove the && !defined POSIX2008. Exactly one of the macros for individual standards will always be defined when processing the conform/ data.
On 09/02/2017 20:45, Joseph Myers wrote: > On Thu, 9 Feb 2017, Adhemerval Zanella wrote: > >> Right, so if I think the condition on conform/data/string.h-data should be: >> >> diff --git a/conform/data/string.h-data b/conform/data/string.h-data >> index 39fa76c..b7c2784 100644 >> --- a/conform/data/string.h-data >> +++ b/conform/data/string.h-data >> @@ -27,7 +27,7 @@ function int strcoll_l (const char*, const char*, locale_t) >> #endif >> function {char*} strcpy (char*, const char*) >> function size_t strcspn (const char*, const char*) >> -#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG3 && !defined POSIX && !defined POSIX2008 >> +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG3 && !defined POSIX && defined POSIX2008 > > No, just remove the && !defined POSIX2008. Exactly one of the macros for > individual standards will always be defined when processing the conform/ > data. > Right, I will prepare the patch.
diff --git a/conform/data/string.h-data b/conform/data/string.h-data index 39fa76c..b7c2784 100644 --- a/conform/data/string.h-data +++ b/conform/data/string.h-data @@ -27,7 +27,7 @@ function int strcoll_l (const char*, const char*, locale_t) #endif function {char*} strcpy (char*, const char*) function size_t strcspn (const char*, const char*) -#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG3 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG3 && !defined POSIX && defined POSIX2008 function {char*} strdup (const char*) #endif function {char*} strerror (int)