qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] Add HTTP protocol using curl v7


From: Consul
Subject: [Qemu-devel] Re: [PATCH] Add HTTP protocol using curl v7
Date: Thu, 28 May 2009 11:20:44 -0700
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Anthony Liguori wrote:

Is curl-config in your path?  Does the following help?

Yes.
How about this patch on top of yours? Still does not run well on windows, but 
at least compiles on both linux and windows.
Without re-arranging the args order linker can't resolve the symbols.

diff --git a/Makefile b/Makefile
index d7b9985..4830285 100644
--- a/Makefile
+++ b/Makefile
@@ -202,6 +202,8 @@ endif

 LIBS+=$(CURL_LIBS)

+block/curl.o: CFLAGS += $(CURL_CFLAGS)
+
 cocoa.o: cocoa.m

 keymaps.o: keymaps.c keymaps.h
diff --git a/block/curl.c b/block/curl.c
index e1a553f..5534680 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -255,7 +255,11 @@ static CURLState *curl_init_state(BDRVCURLState *s)
             break;
         }
         if (!state) {
+#ifndef _WIN32
             usleep(100);
+#else
+            Sleep(0);
+#endif
             curl_multi_do(s);
         }
     } while(!state);
diff --git a/configure b/configure
index 2e68fe3..fdbc352 100755
--- a/configure
+++ b/configure
@@ -1080,7 +1080,7 @@ int main(void) { return curl_easy_init(); }
 EOF
   curl_libs=`curl-config --libs 2>/dev/null`
   curl_cflags=`curl-config --cflags 2>/dev/null`
- if $cc $ARCH_CFLAGS $curl_cflags $curl_libs -o $TMPE $TMPC > /dev/null 2> 
/dev/null ; then
+ if $cc $ARCH_CFLAGS $curl_cflags -o $TMPE $TMPC $curl_libs > /dev/null 2> 
/dev/null ; then
     curl=yes
   fi
 fi # test "$curl"
diff --git a/Makefile b/Makefile
index d7b9985..4830285 100644
--- a/Makefile
+++ b/Makefile
@@ -202,6 +202,8 @@ endif
 
 LIBS+=$(CURL_LIBS)
 
+block/curl.o: CFLAGS += $(CURL_CFLAGS)
+
 cocoa.o: cocoa.m
 
 keymaps.o: keymaps.c keymaps.h
diff --git a/block/curl.c b/block/curl.c
index e1a553f..5534680 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -255,7 +255,11 @@ static CURLState *curl_init_state(BDRVCURLState *s)
             break;
         }
         if (!state) {
+#ifndef _WIN32
             usleep(100);
+#else
+            Sleep(0);
+#endif
             curl_multi_do(s);
         }
     } while(!state);
diff --git a/configure b/configure
index 2e68fe3..fdbc352 100755
--- a/configure
+++ b/configure
@@ -1080,7 +1080,7 @@ int main(void) { return curl_easy_init(); }
 EOF
   curl_libs=`curl-config --libs 2>/dev/null`
   curl_cflags=`curl-config --cflags 2>/dev/null`
- if $cc $ARCH_CFLAGS $curl_cflags $curl_libs -o $TMPE $TMPC > /dev/null 2> 
/dev/null ; then
+ if $cc $ARCH_CFLAGS $curl_cflags -o $TMPE $TMPC $curl_libs > /dev/null 2> 
/dev/null ; then
     curl=yes
   fi
 fi # test "$curl"

reply via email to

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