From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 099291F4B4 for ; Wed, 20 Jan 2021 08:11:41 +0000 (UTC) Received: from localhost ([::1]:35140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l28aa-00053L-1F for normalperson@yhbt.net; Wed, 20 Jan 2021 03:11:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l28aU-00052z-ED for bug-gnulib@gnu.org; Wed, 20 Jan 2021 03:11:34 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.220]:13678) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l28aQ-0002c2-Gp for bug-gnulib@gnu.org; Wed, 20 Jan 2021 03:11:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1611130287; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:From: Subject:Sender; bh=A4deD5TcBCggSZvVqE/sBKfnJpI1kcVjXv5MQa5NeV0=; b=rXKVmhuwx8/oPv+VqVDEKRzd5Vjou+JyctNUhBC2K13n1Dxa2LpFN+acXFi5wNW8a7 7H8e54qG7Bi+8560LvwDHNZhJ6a/uJzUX/y7Yq0JLnAPJOi+nmSDv1TCN1hPOsKdi+pm edhQxUWNCgga2dG8aqfD4xbanhmpfjcsRzd4CeY0NUGwwiDUQ1AZIwbq4hif0Y0tDCnW eMoN2TfI9AGujRykOuC1yvuSkyYwc6LADWcb/QrKKh9hvC6LHT0mv8m7SVO+TRzzAT4k pcmGXFIi9YqfOkslvxLiOXIR/7Wx1zYmhnQZjDvUxsluUlAYO11SDvlD9pAqbPic7lcC TGIQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyvs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.12.1 DYNA|AUTH) with ESMTPSA id u0aa20x0K8BQ5fb (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Wed, 20 Jan 2021 09:11:26 +0100 (CET) From: Bruno Haible To: Ken Brown Subject: Re: ptsname_r on Cygwin Date: Wed, 20 Jan 2021 09:11:25 +0100 Message-ID: <3338673.hDtONKD4FM@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <3482750.exAXJ2mfqj@omega> References: <3482750.exAXJ2mfqj@omega> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.220; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" > While https://www.kernel.org/doc/man-pages/online/pages/man3/ptsname_r.3.html > says that ptsname_r, upon failure, should return an error code, on Cygwin, > it returns 0 and stores the empty string in 'buffer'. Let me document this issue. 2021-01-20 Bruno Haible doc: Document ptsname_r bug on Cygwin. * doc/glibc-functions/ptsname_r.texi: Mention Cygwin bug. diff --git a/doc/glibc-functions/ptsname_r.texi b/doc/glibc-functions/ptsname_r.texi index 0bfd05b..a79e751 100644 --- a/doc/glibc-functions/ptsname_r.texi +++ b/doc/glibc-functions/ptsname_r.texi @@ -25,13 +25,17 @@ Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 1.7.9, mingw, MSVC 14. @item -When this functions fails, it returns -1 instead of the error code +When this function fails, it returns -1 instead of the error code on some platforms: Mac OS X 10.13, Android 4.3. @end itemize Portability problems not fixed by Gnulib: @itemize +@item +When this function fails, it returns 0 and stores an empty string as result +on some platforms: +Cygwin 2.9. @end itemize Note: Portable programs should expect to find the error code as the