From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uft16-0006XO-2Y for qemu-devel@nongnu.org; Fri, 24 May 2013 10:30:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uft0z-0003MF-6k for qemu-devel@nongnu.org; Fri, 24 May 2013 10:30:47 -0400 Received: from usindpps05.hds.com ([207.126.252.18]:48826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uft0y-0003M2-Q8 for qemu-devel@nongnu.org; Fri, 24 May 2013 10:30:41 -0400 From: Tomoki Sekiyama Date: Fri, 24 May 2013 14:30:34 +0000 Message-ID: In-Reply-To: <20130524085456.GC21639@stefanha-thinkpad.redhat.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <5604F56191F63A4196E584F67F6E7D00@hds.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH v3 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "mdroth@linux.vnet.ibm.com" , "qemu-devel@nongnu.org" , "lcapitulino@redhat.com" , "vrozenfe@redhat.com" , "pbonzini@redhat.com" , Seiji Aguchi , "areis@redhat.com" On 5/24/13 4:54 , "Stefan Hajnoczi" wrote: >On Thu, May 23, 2013 at 06:36:35PM +0000, Tomoki Sekiyama wrote: >> On 5/23/13 8:22 , "Stefan Hajnoczi" wrote: >>=20 >> >On Tue, May 21, 2013 at 11:33:52AM -0400, Tomoki Sekiyama wrote: >> >> diff --git a/qga/vss-win32.h b/qga/vss-win32.h >> >> new file mode 100644 >> >> index 0000000..7600087 >> >> --- /dev/null >> >> +++ b/qga/vss-win32.h >> >> @@ -0,0 +1,85 @@ >> >> +/* >> >> + * QEMU Guest Agent win32 VSS common declarations >> >> + * >> >> + * Copyright Hitachi Data Systems Corp. 2013 >> >> + * >> >> + * Authors: >> >> + * Tomoki Sekiyama >> >> + * >> >> + * This work is licensed under the terms of the GNU GPL, version 2 >>or >> >>later. >> >> + * See the COPYING file in the top-level directory. >> >> + */ >> >> + >> >> +#ifndef VSS_WIN32_H >> >> +#define VSS_WIN32_H >> >> + >> >> +#define __MIDL_user_allocate_free_DEFINED__ >> >> +#include "config-host.h" >> >> +#include >> >> +#include >> >> + >> >> +/* Reduce warnings to include vss.h */ >> >> +#define __in IN >> >> +#define __out OUT >> >> +#define __RPC_unique_pointer >> >> +#define __RPC_string >> >> +#define __RPC__deref_inout_opt >> >> +#define __RPC__out >> >> +#ifndef __RPC__out_ecount_part >> >> +#define __RPC__out_ecount_part(x, y) >> >> +#endif >> >> +#define _declspec(x) >> >> +#undef uuid >> >> +#define uuid(x) >> > >> >This looks hacky. Why are you stubbing out macros that vss.h uses? >>=20 >> Because these macros are internally defined/used by windows SDK's >> headers and not fully covered by mingw (some of them is only >> meaningful with Microsoft IDE), so it don't compile without >> these define's. >>=20 >> This could be better if mingw supports these VSS headers, but >> I have no idea how to achieve that... > >Please add a comment explaining this. OK. >BTW, did you look at the macro definitions to see if they define >anything important? In other words, is there a difference when compiled >using Visual C++ where the macros actually have meaning? > >Stefan They are just annotating for compiler to warn things like "this shouldn't be NULL', or to give a hint to code generators. I believe they don't affect compiled executable binaries. Thanks, Tomoki Sekiyama