[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/9] util/qemu-openpty.c: Don't assume pty.h is glibc-only
From: |
Thomas Huth |
Subject: |
Re: [PATCH v3 2/9] util/qemu-openpty.c: Don't assume pty.h is glibc-only |
Date: |
Mon, 6 Jul 2020 18:50:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 06/07/2020 16.00, Eric Blake wrote:
> On 7/3/20 10:12 AM, Thomas Huth wrote:
>
>>> +++ b/util/qemu-openpty.c
>>> @@ -35,7 +35,7 @@
>>> #include "qemu/osdep.h"
>>> #include "qemu-common.h"
>>> -#if defined(__GLIBC__)
>>> +#if defined CONFIG_PTY
>
>>
>> Shouldn't there be some parentheses around CONFIG_PTY here?
>
> No, they are optional, and omitting them is more consistent with the
> CONFIG_BSD just below.
Thanks, TIL - I'm doing so many years of C programming already, and
until now I never noticed any code that does not use parentheses after
"defined" ...
Thomas
- [PATCH v3 0/9] Build fixes for Haiku, Peter Maydell, 2020/07/03
- [PATCH v3 3/9] build: Check that mlockall() exists, Peter Maydell, 2020/07/03
- [PATCH v3 4/9] osdep.h: Always include <sys/signal.h> if it exists, Peter Maydell, 2020/07/03
- [PATCH v3 6/9] bswap.h: Include <endian.h> on Haiku for bswap operations, Peter Maydell, 2020/07/03
- [PATCH v3 5/9] osdep.h: For Haiku, define SIGIO as equivalent to SIGPOLL, Peter Maydell, 2020/07/03