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.8 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,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 7FE4B1F55B for ; Fri, 29 May 2020 03:05:18 +0000 (UTC) Received: from localhost ([::1]:51424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeVKf-0005fP-9Y for normalperson@yhbt.net; Thu, 28 May 2020 23:05:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeVK4-000551-Gs for bug-gnulib@gnu.org; Thu, 28 May 2020 23:04:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47146) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeVK2-0007Tu-UK; Thu, 28 May 2020 23:04:38 -0400 Received: from deisui.org ([219.94.251.20]:57074 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jeVK1-0000o5-63; Thu, 28 May 2020 23:04:38 -0400 Message-ID: <87sgfjfnlv.fsf-ueno@gnu.org> From: Daiki Ueno To: Bruno Haible Subject: Re: portability of fopen and 'e' (O_CLOEXEC) flag References: <7d7cfa6e-af75-82d0-e076-bf411b87a3ab@gmx.de> <877dwwpefb.fsf-ueno@gnu.org> <87wo4wnzoj.fsf-ueno@gnu.org> <3990195.UIfvkoD8i4@omega> Date: Fri, 29 May 2020 05:04:28 +0200 In-Reply-To: <3990195.UIfvkoD8i4@omega> (Bruno Haible's message of "Thu, 28 May 2020 13:54:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: Tim =?utf-8?Q?R=C3=BChsen?= , bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" --=-=-= Content-Type: text/plain Bruno Haible writes: >> + ASSERT (fwrite (DATA, 1, sizeof(DATA)-1, f) == sizeof(DATA)-1); > ... >> + ASSERT (fread (buf, 1, sizeof(buf), f) == sizeof(DATA)-1); > > GNU coding style wants a space between 'sizeof' and the opening parenthesis. > Other than that, your patch is perfect. Thank you for the review; fixed and pushed. Afterwards, I realized a compilation error in the test code on FreeBSD, so I've added the follow-up patch attached. Regards, -- Daiki Ueno --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-fopen-gnu-tests-fix-x-escape-usage.patch >From 9326739489050009e3b8834838abc02203c592e5 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 29 May 2020 04:54:31 +0200 Subject: [PATCH] fopen-gnu-tests: fix "\x" escape usage * tests/test-fopen-gnu.c (DATA): Use safer escape sequence. --- ChangeLog | 5 +++++ tests/test-fopen-gnu.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c39bfd372..77c637414 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-05-29 Daiki Ueno + + fopen-gnu-tests: fix "\x" escape usage + * tests/test-fopen-gnu.c (DATA): Use safer escape sequence. + 2020-05-28 Bruno Haible Avoid dynamic loading of Windows API functions when possible. diff --git a/tests/test-fopen-gnu.c b/tests/test-fopen-gnu.c index 4d98dcd85..7de45ab8d 100644 --- a/tests/test-fopen-gnu.c +++ b/tests/test-fopen-gnu.c @@ -30,7 +30,7 @@ #define BASE "test-fopen-gnu.t" /* 0x1a is an EOF on Windows. */ -#define DATA "abc\x1adef" +#define DATA "abc\x1axyz" int main (void) -- 2.26.2 --=-=-=--