[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: portability of fopen and 'e' (O_CLOEXEC) flag
From: |
Daiki Ueno |
Subject: |
Re: portability of fopen and 'e' (O_CLOEXEC) flag |
Date: |
Fri, 29 May 2020 05:04:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Bruno Haible <bruno@clisp.org> 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
>From 9326739489050009e3b8834838abc02203c592e5 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
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 <ueno@gnu.org>
+
+ fopen-gnu-tests: fix "\x" escape usage
+ * tests/test-fopen-gnu.c (DATA): Use safer escape sequence.
+
2020-05-28 Bruno Haible <bruno@clisp.org>
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
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, (continued)
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Eric Blake, 2020/05/11
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Tim Rühsen, 2020/05/12
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/24
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Daiki Ueno, 2020/05/26
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/26
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/26
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/27
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Daiki Ueno, 2020/05/28
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Daiki Ueno, 2020/05/28
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/28
- Re: portability of fopen and 'e' (O_CLOEXEC) flag,
Daiki Ueno <=
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/29