From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M9kI2-0006fC-ID for qemu-devel@nongnu.org; Thu, 28 May 2009 14:25:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M9kHx-0006cJ-Qc for qemu-devel@nongnu.org; Thu, 28 May 2009 14:25:18 -0400 Received: from [199.232.76.173] (port=54828 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9kHx-0006cA-Jh for qemu-devel@nongnu.org; Thu, 28 May 2009 14:25:13 -0400 Received: from main.gmane.org ([80.91.229.2]:34114 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M9kHw-0005S4-H3 for qemu-devel@nongnu.org; Thu, 28 May 2009 14:25:13 -0400 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1M9kHn-0002jT-5A for qemu-devel@nongnu.org; Thu, 28 May 2009 18:25:03 +0000 Received: from 204.147.152.1 ([204.147.152.1]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 May 2009 18:25:03 +0000 Received: from void by 204.147.152.1 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 May 2009 18:25:03 +0000 From: Consul Date: Thu, 28 May 2009 11:23:29 -0700 Message-ID: References: <1243004222-27822-1-git-send-email-agraf@suse.de> <20090527144951.GA4438@amd.home.annexia.org> <4A1D550C.6030807@codemonkey.ws> <4A1E4F46.8080604@codemonkey.ws> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030307040308010608090604" In-Reply-To: <4A1E4F46.8080604@codemonkey.ws> Sender: news Subject: [Qemu-devel] Re: [PATCH] Add HTTP protocol using curl v7 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------030307040308010608090604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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" --------------030307040308010608090604 Content-Type: text/plain; name="curl-win.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="curl-win.patch" 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" --------------030307040308010608090604--