From patchwork Wed May 11 18:41:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 621230 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 3r4lMf3SHcz9s9W for ; Thu, 12 May 2016 04:41:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=IKqGRLcy; 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; q=dns; s=default; b=KUjq RTJRope4JS0G4c4FtpL3RU0lXX/9jzzN0pNR7BhnfhXCDj18sed5hzZwsq1FAiST uih7gAsgDIJZqzlwSovQZrm2BOyPjM0RyH9H2adjQo8yh779EiBsIhYaQiiTWS7E KOQwhy3q2uukej12k6fu1gS/tgRZEt0amiQBVGo= 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; s=default; bh=PZa8LfYH2s 53YIDqjrMvYTcn7Ws=; b=IKqGRLcySdmREo7GgdQa+MyN3BtY892GU7l3TuX5D6 UQmuUVW9OrYltFM7qngKIsspDCg3m9Ec+46puGAcHlLWLIBdI2Z8MpIqaYHgDtod zZZHBFehhey166Uqu2snORKJoa0V/Eu6UjZqSlG4ss82XAyNFwaSH1s2EHIKc8cx E= Received: (qmail 128260 invoked by alias); 11 May 2016 18:41:41 -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 128246 invoked by uid 89); 11 May 2016 18:41:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1478, editions, UD:c.texi, @include X-HELO: mx1.redhat.com Subject: Re: [PATCH] stpcpy comes from Turbo C [BZ #3629] To: Ulrich Drepper References: <20160510075014.A743C41C38CF4@oldenburg.str.redhat.com> Cc: libc-alpha From: Florian Weimer Message-ID: <57337CD7.6090900@redhat.com> Date: Wed, 11 May 2016 20:41:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: On 05/10/2016 06:37 PM, Ulrich Drepper wrote: > On Tue, May 10, 2016 at 3:50 AM, Florian Weimer wrote: >> +This function is a Turbo C extension. It is not part of the ISO or >> +POSIX standards. > > Even the current man pages tell you that this isn't right. Of course > it was an extension but not introduced in Turbo C. It was introduced > earlier. Amiga Lattice C had it: > > http://www.bombjack.org/commodore/amiga/applications/Lattice_C_Compiler_V3_Programmers_Reference_Guide_%28Sep_12_1986%29.pdf I find it difficult to believe that Turbo C copied from there, I find it far more likely that there was a common ancestor. What about this patch, then? Thanks, Florian 2016-05-10 Florian Weimer [BZ #3629] * manual/string.texi (Copying Strings and Arrays): Document provenience of the stpcpy function. diff --git a/manual/string.texi b/manual/string.texi index 016fd0b..d78381e 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -612,9 +612,7 @@ and @samp{bar} to produce @samp{foobar}, which it then prints. @include stpcpy.c.texi @end smallexample -This function is not part of the ISO or POSIX standards, and is not -customary on Unix systems, but we did not invent it either. Perhaps it -comes from MS-DOG. +This function is part of POSIX.1-2008 and later editions. Its behavior is undefined if the strings overlap. The function is declared in @file{string.h}.