[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: portability of fopen and 'e' (O_CLOEXEC) flag
From: |
Bruno Haible |
Subject: |
Re: portability of fopen and 'e' (O_CLOEXEC) flag |
Date: |
Fri, 29 May 2020 08:25:58 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; ) |
Daiki Ueno wrote:
> Afterwards, I realized a
> compilation error in the test code on FreeBSD, so I've added the
> follow-up patch attached.
Indeed, octal and hexadecimal escape sequences are not limited to 3 or 2
digits. ISO C 11 section 6.4.4.4 says:
"The hexadecimal digits that follow the backslash and the letter x in a
hexadecimal escape sequence are taken to be part of the construction ..."
"Each octal or hexadecimal escape sequence is the longest sequence of
characters that can constitute the escape sequence."
I had forgotten about it too.
> "abc\x1adef"
One way to write it would be "abc\x1a" "def". Or "abc\032def".
Bruno
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, (continued)
- 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, 2020/05/28
- Re: portability of fopen and 'e' (O_CLOEXEC) flag,
Bruno Haible <=