All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition
@ 2012-03-28 18:56 Jan Kiszka
  2012-03-29  6:53 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  2012-03-29 18:02 ` [Qemu-devel] " Stefan Weil
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2012-03-28 18:56 UTC (permalink / raw)
  To: qemu-trivial; +Cc: Stefan Weil, qemu-devel

Avoids lots of warnings.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 qemu_socket.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qemu_socket.h b/qemu_socket.h
index fe4cf6c..51ad210 100644
--- a/qemu_socket.h
+++ b/qemu_socket.h
@@ -8,7 +8,9 @@
 #include <ws2tcpip.h>
 
 #define socket_error() WSAGetLastError()
+#undef EWOULDBLOCK
 #undef EINTR
+#undef EINPROGRESS
 #define EWOULDBLOCK WSAEWOULDBLOCK
 #define EINTR       WSAEINTR
 #define EINPROGRESS WSAEINPROGRESS
-- 
1.7.3.4

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] w32: Undefine error constants before their redefinition
  2012-03-28 18:56 [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition Jan Kiszka
@ 2012-03-29  6:53 ` Stefan Hajnoczi
  2012-03-29 18:02 ` [Qemu-devel] " Stefan Weil
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-03-29  6:53 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-trivial, Stefan Weil, qemu-devel

On Wed, Mar 28, 2012 at 08:56:38PM +0200, Jan Kiszka wrote:
> Avoids lots of warnings.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  qemu_socket.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan

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

* Re: [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition
  2012-03-28 18:56 [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition Jan Kiszka
  2012-03-29  6:53 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
@ 2012-03-29 18:02 ` Stefan Weil
  2012-03-29 18:36   ` Jan Kiszka
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2012-03-29 18:02 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-trivial, qemu-devel

Am 28.03.2012 20:56, schrieb Jan Kiszka:
> Avoids lots of warnings.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> qemu_socket.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/qemu_socket.h b/qemu_socket.h
> index fe4cf6c..51ad210 100644
> --- a/qemu_socket.h
> +++ b/qemu_socket.h
> @@ -8,7 +8,9 @@
> #include <ws2tcpip.h>
>
> #define socket_error() WSAGetLastError()
> +#undef EWOULDBLOCK
> #undef EINTR
> +#undef EINPROGRESS
> #define EWOULDBLOCK WSAEWOULDBLOCK
> #define EINTR WSAEINTR
> #define EINPROGRESS WSAEINPROGRESS

Hi,

I am curious: with which version of MinGW or Cygwin do you get warnings?
I don't see them in my native and cross MinGW / MinGW-w64 builds.

Where do the original definitions come from, and are they compatible with
the redefined values? If yes, it might be possible to put the new 
definitions
in a conditionally compiled code block (#if !defined(EWOULDBLOCK) ... 
#endif).

Could slirp/slirp.h also use qemu_socket.h? That would simplify the code.
Is it possible to move those definitions to qemu-os-win32.h? I'd prefer
to have them in some w32 specific header file instead of qemu_socket.h and
slirp/slirp.h.

If the current two patches help you for the moment, I don't mind when they
are committed, but we should have a better solution later.

Regards,

Stefan W.

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

* Re: [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition
  2012-03-29 18:02 ` [Qemu-devel] " Stefan Weil
@ 2012-03-29 18:36   ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2012-03-29 18:36 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

On 2012-03-29 20:02, Stefan Weil wrote:
> Am 28.03.2012 20:56, schrieb Jan Kiszka:
>> Avoids lots of warnings.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> qemu_socket.h | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/qemu_socket.h b/qemu_socket.h
>> index fe4cf6c..51ad210 100644
>> --- a/qemu_socket.h
>> +++ b/qemu_socket.h
>> @@ -8,7 +8,9 @@
>> #include <ws2tcpip.h>
>>
>> #define socket_error() WSAGetLastError()
>> +#undef EWOULDBLOCK
>> #undef EINTR
>> +#undef EINPROGRESS
>> #define EWOULDBLOCK WSAEWOULDBLOCK
>> #define EINTR WSAEINTR
>> #define EINPROGRESS WSAEINPROGRESS
> 
> Hi,
> 
> I am curious: with which version of MinGW or Cygwin do you get warnings?
> I don't see them in my native and cross MinGW / MinGW-w64 builds.

Not sure if that is what you are looking for, but my runtime rpm claims
to be mingw32-runtime-20120126-1.4.

> 
> Where do the original definitions come from, and are they compatible with
> the redefined values? If yes, it might be possible to put the new 
> definitions
> in a conditionally compiled code block (#if !defined(EWOULDBLOCK) ... 
> #endif).

/usr/i686-w64-mingw32/sys-root/mingw/include/errno.h:158:0: note: this
is the location of the previous definition

And there we have e.g.

#ifndef EINPROGRESS
#define EINPROGRESS 112
#endif

vs.

#define WSAEINPROGRESS 10036L

> 
> Could slirp/slirp.h also use qemu_socket.h? That would simplify the code.
> Is it possible to move those definitions to qemu-os-win32.h? I'd prefer
> to have them in some w32 specific header file instead of qemu_socket.h and
> slirp/slirp.h.

/me too. But as I cannot test w32, I would welcome to receive a tested
patch for the slirp queue. :)

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

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

end of thread, other threads:[~2012-03-29 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28 18:56 [Qemu-devel] [PATCH] w32: Undefine error constants before their redefinition Jan Kiszka
2012-03-29  6:53 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-03-29 18:02 ` [Qemu-devel] " Stefan Weil
2012-03-29 18:36   ` Jan Kiszka

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.