qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Win32 MinGW build with current CVS
@ 2006-08-02 18:07 Andreas Bollhalder
  2006-08-02 19:07 ` NyOS
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Bollhalder @ 2006-08-02 18:07 UTC (permalink / raw)
  To: qemu-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

It seems that the aio support broke my MinGW build batch under Win32. Is
it suposed to work on WIN32 ?

Any ideas ?

Andreas

gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I..
- -I/D/DEV/QEMU/qemu/target-i386 -I/D/DEV/QEMU/qemu -D_GNU_SOURCE
- -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/D/DEV/QEMU/qemu/fpu
- -DHAS_AUDIO -I/D/DEV/QEMU/qemu/slirp -c -o block-raw.o
/D/DEV/QEMU/qemu/block-raw.c
d:/DEV/QEMU/qemu/block-raw.c: In function `raw_open':
d:/DEV/QEMU/qemu/block-raw.c:573: `BDRV_O_CREATE' undeclared (first use
in this function)
d:/DEV/QEMU/qemu/block-raw.c:573: (Each undeclared identifier is
reported only once
d:/DEV/QEMU/qemu/block-raw.c:573: for each function it appears in.)
d:/DEV/QEMU/qemu/block-raw.c: In function `raw_aio_new':
d:/DEV/QEMU/qemu/block-raw.c:635: structure has no member named `hevent'
d:/DEV/QEMU/qemu/block-raw.c:636: structure has no member named `hevent'
d:/DEV/QEMU/qemu/block-raw.c: In function `raw_aio_cb':
d:/DEV/QEMU/qemu/block-raw.c:643: `acb1' undeclared (first use in this
function)
d:/DEV/QEMU/qemu/block-raw.c:648: `s' undeclared (first use in this
function)
d:/DEV/QEMU/qemu/block-raw.c: In function `raw_aio_read':
d:/DEV/QEMU/qemu/block-raw.c:662: warning: unused variable `ret_count'
d:/DEV/QEMU/qemu/block-raw.c: In function `raw_aio_write':
d:/DEV/QEMU/qemu/block-raw.c:685: warning: unused variable `ret_count'
d:/DEV/QEMU/qemu/block-raw.c: In function `raw_truncate':
d:/DEV/QEMU/qemu/block-raw.c:737: `length' undeclared (first use in this
function)
d:/DEV/QEMU/qemu/vl.h: At top level:
d:/DEV/QEMU/qemu/block-raw.c:627: warning: `raw_aio_new' defined but not
used
d:/DEV/QEMU/qemu/block-raw.c:658: warning: `raw_aio_read' defined but
not used
d:/DEV/QEMU/qemu/block-raw.c:681: warning: `raw_aio_write' defined but
not used
d:/DEV/QEMU/qemu/block-raw.c:714: warning: `raw_aio_delete' defined but
not used
make: *** [block-raw.o] Error 1

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE0OnykyKr2gmercERAq3gAJ9hX0tp0/uqCCUrUy1ctCyVih71twCgjRi+
ys2Km+sxRKMZSTPRux+yCi8=
=DDwp
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [Qemu-devel] Win32 MinGW build with current CVS
@ 2006-08-03  8:41 ZIGLIO, Frediano, VF-IT
  0 siblings, 0 replies; 6+ messages in thread
From: ZIGLIO, Frediano, VF-IT @ 2006-08-03  8:41 UTC (permalink / raw)
  To: qemu-devel

> From: 
> qemu-devel-bounces+frediano.ziglio=vodafone.com@nongnu.org 
> [mailto:qemu-devel-bounces+frediano.ziglio=vodafone.com@nongnu
> .org] On Behalf Of Kazu
> Sent: giovedì 3 agosto 2006 10.25
> To: qemu-devel@nongnu.org
> Subject: Re: [Qemu-devel] Win32 MinGW build with current CVS
> 
> Sent: Thursday, August 03, 2006 12:14 PM Kazu wrote:
> 
> >
> > Asynchronous I/O is implemented by overlapped I/O for Win32 
> but it is not
> > enabled.
> >
> > I tried to make the program. A patch attached fixs compile errors.
> >
> > I found some problems about it.
> > GetFileSizeEx needs to define WINVER 0x0500. It means that 
> Windows 98/Me
> > host is not supported.
> > If we try to support Win 98/Me host, it is necessary to 
> change configure
> to
> > use --enable-win9x and make another binary, etc.
> >
> > The first attempt to open a hard disk image with a drive 
> letter always
> > failed. After the second time is OK.
> >
> 
> An attached patch fixes the bug which is first time read error.
> 
> Regards,
> Kazu
> 

Please use GetFileSize using second parameter instead of defining WINVER to 0x0500. GetFileSize support 64-bit...

bye
  Frediano

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [Qemu-devel] Win32 MinGW build with current CVS
@ 2006-08-03  8:58 ZIGLIO, Frediano, VF-IT
  0 siblings, 0 replies; 6+ messages in thread
From: ZIGLIO, Frediano, VF-IT @ 2006-08-03  8:58 UTC (permalink / raw)
  To: qemu-devel

> 
> Sent: Thursday, August 03, 2006 12:14 PM Kazu wrote:
> 
> >
> > Asynchronous I/O is implemented by overlapped I/O for Win32 
> but it is not
> > enabled.
> >
> > I tried to make the program. A patch attached fixs compile errors.
> >
> > I found some problems about it.
> > GetFileSizeEx needs to define WINVER 0x0500. It means that 
> Windows 98/Me
> > host is not supported.
> > If we try to support Win 98/Me host, it is necessary to 
> change configure
> to
> > use --enable-win9x and make another binary, etc.
> >
> > The first attempt to open a hard disk image with a drive 
> letter always
> > failed. After the second time is OK.
> >
> 
> An attached patch fixes the bug which is first time read error.
> 
> Regards,
> Kazu
> 

Well, consider this code, it define a pGetFileSizeEx you can use instead
of GetFileSizeEx

---------- header ----------
extern BOOL (WINAPI *pGetFileSizeEx)(HANDLE hFile, PLARGE_INTEGER
lpFileSize);
---------- header ----------

---------- code ----------
#define STRICT
#include <windows.h>

static BOOL WINAPI
autoGetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize);

typedef BOOL (WINAPI *tGetFileSizeEx)(HANDLE hFile, PLARGE_INTEGER
lpFileSize);

tGetFileSizeEx pGetFileSizeEx = autoGetFileSizeEx;

// replacement that automatically load proper api
static BOOL WINAPI
oldGetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize)
{
	DWORD dwHigh;
	DWORD res = GetFileSize(hFile, &dwHigh);
	if (res != 0xFFFFFFFF || GetLastError() == NO_ERROR) {
		lpFileSize->LowPart = res;
		lpFileSize->HighPart = dwHigh;
		return TRUE;
	}
	return FALSE;
}

// replacement that automatically load proper api
static BOOL WINAPI
autoGetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize)
{
	tGetFileSizeEx proc = (tGetFileSizeEx)
GetProcAddress(GetModuleHandle("kernel32"), "GetFileSizeEx");
	pGetFileSizeEx = proc ? proc : oldGetFileSizeEx;
	return pGetFileSizeEx(hFile, lpFileSize);
}
---------- code ----------

Frediano

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-03  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-02 18:07 [Qemu-devel] Win32 MinGW build with current CVS Andreas Bollhalder
2006-08-02 19:07 ` NyOS
2006-08-03  3:14   ` Kazu
2006-08-03  8:24     ` Kazu
  -- strict thread matches above, loose matches on Subject: below --
2006-08-03  8:41 ZIGLIO, Frediano, VF-IT
2006-08-03  8:58 ZIGLIO, Frediano, VF-IT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).