From patchwork Thu Feb 9 22:42:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 726351 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vKCl82ljmz9s7H for ; Fri, 10 Feb 2017 09:42:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="TFkp6dha"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=kPBHoAhEWingmVen SqxJtnUC71e+/44wbTCVc40ji9zMu5pLqzmz37w18y358ps+LWL2pwc3HHbojMlV upv9ygjliJ4ZQzT5rU6NhikfTM35agPmnIowVsYdUN0dBoSiOt40VFVfjuvN08e+ XJOu3MPZWCEeDkhL/yZHvemGp38= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=jqAl9CVIwRO7Ozib9lInwP dskQ0=; b=TFkp6dhaAcZnnA37jMqsnTNVhNglxi7NLymVhVAXSjSkJKgfpoexsK fkyLj2siqdeOeXbh1/g4dnraa/+ud/kpucihaUHVMTIGSaoDiQBULZhl+wDQvHF/ 0YzZOyTo9RxOKQpohvmjv3DpjVvmx5Y6ZjVLU4eQBMiHbo4veP54Y= 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: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 References: <6144d797-8520-29f1-c457-275fcb2a2b6c@linaro.org> Cc: libc-alpha@sourceware.org From: Adhemerval Zanella Message-ID: 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: 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: 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)