Skip to contentSkip to conversation

WIN32: Add missing include for 'struct timeval', used in vnc.h

PATCH Applied Herve Poussineau 4 participants 6 messages Mar 6, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 WIN32: Add missing include for 'struct timeval', used in vnc.h

From: Herv� Poussineau <[email protected]>

---
 qemu-common.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
qemu-common.h +1 -0
index 40dad52..18e648f 100644
@@ -33,6 +33,7 @@ typedef struct DeviceState DeviceState;
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/stat.h>
+#include <sys/time.h>
 #include <assert.h>
 
 #ifndef O_LARGEFILE
Signature · 1 line
1.6.0.2.GIT
Applied
#1 lore raw

Thanks, applied.

Quoted 25 lines · Herve Poussineau

From: Hervé Poussineau <[email protected]>

---
 qemu-common.h |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
qemu-common.h +1 -1
index 40dad52..18e648f 100644
@@ -33,6 +33,7 @@ typedef struct DeviceState DeviceState;
  #include <unistd.h>
  #include <fcntl.h>
  #include <sys/stat.h>
+#include <sys/time.h>
  #include <assert.h>
 
  #ifndef O_LARGEFILE
--

1.6.0.2.GIT

#2 lore raw
In reply to Herve Poussineau

Hi,

2011/3/6 Herve Poussineau <[email protected]>:

FYI:
[PATCH 1/3] w32: Add new directory hierarchy for MinGW extensions
http://www.mail-archive.com/[email protected]/msg56858.html
[PATCH 2/3] w32: Add macro timersub to sys/time.h
http://www.mail-archive.com/[email protected]/msg56859.html
[PATCH 3/3] osdep: Remove conditional compilation (fixes w32 compilation)
http://www.mail-archive.com/[email protected]/msg56860.html

Quoted 25 lines

From: Hervé Poussineau <[email protected]>

---
 qemu-common.h |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
qemu-common.h +1 -1
index 40dad52..18e648f 100644
@@ -33,6 +33,7 @@ typedef struct DeviceState DeviceState;
  #include <unistd.h>
  #include <fcntl.h>
  #include <sys/stat.h>
+#include <sys/time.h>
  #include <assert.h>
 
  #ifndef O_LARGEFILE
--

1.6.0.2.GIT

#3 lore raw

Am 06.03.2011 15:24, schrieb Roy Tam:

Quoted 11 lines

Hi,

2011/3/6 Herve Poussineau<[email protected]>:

FYI:
[PATCH 1/3] w32: Add new directory hierarchy for MinGW extensions
http://www.mail-archive.com/[email protected]/msg56858.html
[PATCH 2/3] w32: Add macro timersub to sys/time.h
http://www.mail-archive.com/[email protected]/msg56859.html
[PATCH 3/3] osdep: Remove conditional compilation (fixes w32 compilation)
http://www.mail-archive.com/[email protected]/msg56860.html

Yes, this patch series also addresses the same problem (and one more) in a better way: it did not add code, but removed a conditional compilation. (my first try was identical to Herve's patch).

Stefan

Quoted 25 lines
Quoted 25 lines

From: Hervé Poussineau<[email protected]>

---
  qemu-common.h |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
qemu-common.h +1 -1
index 40dad52..18e648f 100644
@@ -33,6 +33,7 @@ typedef struct DeviceState DeviceState;
  #include<unistd.h>
  #include<fcntl.h>
  #include<sys/stat.h>
+#include<sys/time.h>
  #include<assert.h>
 
  #ifndef O_LARGEFILE
--

1.6.0.2.GIT

#4 lore raw
Quoted 14 lines · Stefan Weil

Am 06.03.2011 15:24, schrieb Roy Tam:

Quoted 5 lines

Hi,

2011/3/6 Herve Poussineau<[email protected]>:

Quoted 7 lines

FYI:
[PATCH 1/3] w32: Add new directory hierarchy for MinGW extensions
http://www.mail-archive.com/[email protected]/msg56858.html
[PATCH 2/3] w32: Add macro timersub to sys/time.h
http://www.mail-archive.com/[email protected]/msg56859.html
[PATCH 3/3] osdep: Remove conditional compilation (fixes w32 compilation)
http://www.mail-archive.com/[email protected]/msg56860.html

Quoted 3 lines

Yes, this patch series also addresses the same problem (and one more) in a better way: it did not add code, but removed a conditional compilation. (my first try was identical to Herve's patch).

As I replied to those, there are several problems with your approach. Wrapping timersub() would solve the other problem nicely.

If we'd want to fake a POSIX-like programming environment, there are other approaches like gnulib. But so far, the approach has been using wrappers.

#5 lore raw

Am 06.03.2011 21:25, schrieb Blue Swirl:

Quoted 16 lines · Stefan Weil
Quoted 12 lines

Am 06.03.2011 15:24, schrieb Roy Tam:

Quoted 11 lines

Hi,

2011/3/6 Herve Poussineau<[email protected]>:

FYI:
[PATCH 1/3] w32: Add new directory hierarchy for MinGW extensions
http://www.mail-archive.com/[email protected]/msg56858.html
[PATCH 2/3] w32: Add macro timersub to sys/time.h
http://www.mail-archive.com/[email protected]/msg56859.html
[PATCH 3/3] osdep: Remove conditional compilation (fixes w32 compilation)
http://www.mail-archive.com/[email protected]/msg56860.html

Quoted 3 lines

Yes, this patch series also addresses the same problem (and one more) in a better way: it did not add code, but removed a conditional compilation. (my first try was identical to Herve's patch).

Quoted 6 lines

As I replied to those, there are several problems with your approach. Wrapping timersub() would solve the other problem nicely.

If we'd want to fake a POSIX-like programming environment, there are other approaches like gnulib. But so far, the approach has been using wrappers.

Obviously I missed your reply, but I just read it.

Patch 3/3 does not conflict with your intension.

It is still a better solution to include sys/time.h and can be applied independent of the other two patches.