From patchwork Thu Jun 12 12:47:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 359105 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 3FFA714007F for ; Thu, 12 Jun 2014 22:47:36 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=VKiTbpxZ6/IJK1j0JZXWb/nadbP3F dVSW6Awm65Q1Qj7exsNgUoJF3zNUolJKVQLGCRiFRJiwfuVRx3dwambzh+onKWbq esnJIERKPcbR6jjx/Q1ACIapHHJ65MkJvA2UPmm599++s+ohl8H7gG02ImaDAR7f Pvn5Gl75caPS/8= 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:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=pATn7wIQqarURR0cUhtKH/m/NBU=; b=Phe kS1lPJpHGDoEET30Ld+0Uz5PcIVXvbqqtCeg7Y+EWf51Ki4WKPcYv0Ca5IaqN0su CGFYEJ0eoQ/PXYlpT1bu9xPVHepS1cBqH7tQDn7Lw9Nv6UEoDqSxh8c1QmkedU7j b4iZr1jkTEx0Dzgv0HNFCu7v6fnK4X/xxRcvoU1E= Received: (qmail 21481 invoked by alias); 12 Jun 2014 12:47:31 -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 21437 invoked by uid 89); 12 Jun 2014 12:47:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Update feature guard for strdup/strndup in X-Yow: Where does it go when you flush? Date: Thu, 12 Jun 2014 14:47:26 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 When strdup/strndup were promoted to POSIX 2008 the feature guards in weren't updated. Andreas. * string/bits/string2.h (strdup, strndup): Update feature guard. diff --git a/string/bits/string2.h b/string/bits/string2.h index 1b6a1ef..0523a27 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -1287,7 +1287,7 @@ extern char *__strdup (const char *__string) __THROW __attribute_malloc__; __retval; })) \ : __strdup (s))) -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED +# if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 # define strdup(s) __strdup (s) # endif # endif @@ -1315,7 +1315,7 @@ extern char *__strndup (const char *__string, size_t __n) __retval; })) \ : __strndup (s, n))) -# ifdef __USE_GNU +# ifdef __USE_XOPEN2K8 # define strndup(s, n) __strndup (s, n) # endif # endif