[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new bloc

From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"
Date: Tue, 15 Nov 2016 20:44:17 +0800
User-agent: Mutt/1.7.1 (2016-10-04)

On Tue, 11/15 10:18, Stefan Hajnoczi wrote:
> Fam, Markus: Unfortunately neither the clean-includes script nor its
> patch series cover letter explains *why* osdep.h should be included
> before system headers.

I don't know Peter's exact intention either, but AFAICT it is about the few
quirks in osdep.h:

/* Older versions of C++ don't get definitions of various macros from
 * stdlib.h unless we define these macros before first inclusion of
 * that system header.

/* The following block of code temporarily renames the daemon() function so the
 * compiler does not see the warning associated with it in stdlib.h on OSX
#ifdef __APPLE__
#define daemon qemu_fake_daemon_function
#include <stdlib.h>
#undef daemon
extern int daemon(int, int);


/* Mac OSX has a <stdint.h> bug that incorrectly defines SIZE_MAX with
 * the wrong type. Our replacement isn't usable in preprocessor
 * expressions, but it is sufficient for our needs. */
#undef SIZE_MAX
#define SIZE_MAX ((size_t)-1)

reply via email to

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