All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static
Date: Sun, 08 Mar 2009 11:16:24 -0500	[thread overview]
Message-ID: <49B3EF58.701@codemonkey.ws> (raw)
In-Reply-To: <f43fc5580903080836l42351a07tb9ad1c5782318e2a@mail.gmail.com>

Blue Swirl wrote:
> Taking vl.c as an example, do you mean that even these headers:
> #include <unistd.h>
> #include <fcntl.h>
> #include <signal.h>
> #include <time.h>
> #include <errno.h>
> #include <sys/time.h>
> #include <zlib.h>
> before config-host.h line are now broken because of missing windows.h
> include? Or is it just some header below that?
>   

Just windows headers.  For example, from net.c:

> #include <unistd.h>
> #include <fcntl.h>
> #include <signal.h>
> #include <time.h>
> #include <errno.h>
> #include <sys/time.h>
> #include <zlib.h>
>
> /* Needed early for HOST_BSD etc. */
> #include "config-host.h"
>
> #ifndef _WIN32
> #include <sys/times.h>
> #include <sys/wait.h>
> #include <termios.h>
> #include <sys/mman.h>
> #include <sys/ioctl.h>
> #include <sys/resource.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <net/if.h>
> #ifdef __NetBSD__
> #include <net/if_tap.h>
> #endif
> #ifdef __linux__
> #include <linux/if_tun.h>
> #endif
> #include <arpa/inet.h>
> #include <dirent.h>
> #include <netdb.h>
> #include <sys/select.h>
> #ifdef HOST_BSD
> #include <sys/stat.h>
> #if defined(__FreeBSD__) || defined(__DragonFly__)
> #include <libutil.h>
> #else
> #include <util.h>
> #endif
> #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
> #include <freebsd/stdlib.h>
> #else
> #ifdef __linux__
> #include <pty.h>
> #include <malloc.h>
> #include <linux/rtc.h>
>
> /* For the benefit of older linux systems which don't supply it,
>    we use a local copy of hpet.h. */
> /* #include <linux/hpet.h> */
> #include "hpet.h"
>
> #include <linux/ppdev.h>
> #include <linux/parport.h>
> #endif
> #ifdef __sun__
> #include <sys/stat.h>
> #include <sys/ethernet.h>
> #include <sys/sockio.h>
> #include <netinet/arp.h>
> #include <netinet/in.h>
> #include <netinet/in_systm.h>
> #include <netinet/ip.h>
> #include <netinet/ip_icmp.h> // must come after ip.h
> #include <netinet/udp.h>
> #include <netinet/tcp.h>
> #include <net/if.h>
> #include <syslog.h>
> #include <stropts.h>
> #endif
> #endif
> #endif
>
> #if defined(__OpenBSD__)
> #include <util.h>
> #endif
>
> #if defined(CONFIG_VDE)
> #include <libvdeplug.h>
> #endif
>
> #ifdef _WIN32
> #include <malloc.h>
> #include <sys/timeb.h>
> #include <mmsystem.h>
> #define getopt_long_only getopt_long
> #define memalign(align, size) malloc(size)
> #endif

mmsystem.h needs windows.h to be included first.  We need to get that 
include from qemu-common.h.  I see three options:

1) include qemu-common.h at the top of every file as we were previously
2) split out a qemu-win32.h or something like that that just contained 
the windows headers included as we need them
3) explicitly include <windows.h> and use -D CFLAGS to set things up as 
we need it.

I guess #3 looks the best to me.

Regards,

Anthony Liguori

  parent reply	other threads:[~2009-03-08 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 15:32 [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static Blue Swirl
2009-03-08 15:21 ` Anthony Liguori
2009-03-08 15:36   ` Blue Swirl
2009-03-08 16:01     ` Filip Navara
2009-03-08 16:16     ` Anthony Liguori [this message]
2009-03-08 16:23       ` Blue Swirl
2009-03-08 16:25         ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B3EF58.701@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.