qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 4/4] include/qemu/osdep.h: Move the __USE_MIN


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 4/4] include/qemu/osdep.h: Move the __USE_MINGW_ANSI_STDIO define up to avoid confliction.
Date: Tue, 30 Apr 2019 13:30:49 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/30/19 1:13 PM, Cao Jiaxi wrote:
> Signed-off-by: Cao Jiaxi <address@hidden>

Your entire series is missing 'In-Reply-To:' and 'References:' headers,
making each message show up as individual new threads rather than
properly threaded to a 0/4 cover letter. You'll want to fix your sending
habits to avoid that problem in future submissions.

It's unusual to use a trailing '.' in the subject line. Also, your
subject is very long; commit message summaries should typically be
around 60-70 characters because 'git log' shows them with further
indentation, where an 80-column terminal window makes it hard to see the
tail at a glance.  Better might be a short subject line explaining the
"what", and then a non-empty commit message explaining the "why",
perhaps looking like:

osdep: Fix mingw compilation regarding stdio formats

I encountered the following compilation error on mingw:
... PASTE SOMETHING HERE

It turns out that __USE_MINGW_ANSI_STDIO must be set before any system
headers are included, not just before <stdio.h>.

Signed-off-by:...

>  
> +/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */
> +#ifdef __MINGW32__
> +#define __USE_MINGW_ANSI_STDIO 1
> +#endif
> +
>  #include <stdarg.h>
>  #include <stddef.h>
>  #include <stdbool.h>
>  #include <stdint.h>
>  #include <sys/types.h>
>  #include <stdlib.h>
> -
> -/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */
> -#ifdef __MINGW32__
> -#define __USE_MINGW_ANSI_STDIO 1
> -#endif

Question - does it hurt to make the define of __USE_MINGW_ANSI_STDIO
unconditional?  In other words, we're unlikely to break any non-mingw
platform if we drop the #ifdef __MINGW32__ line.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]