All of lore.kernel.org
 help / color / mirror / Atom feed
From: Consul <void@aleksoft.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Add HTTP protocol using curl v7
Date: Thu, 28 May 2009 11:23:29 -0700	[thread overview]
Message-ID: <gvmkr2$aok$2@ger.gmane.org> (raw)
In-Reply-To: <4A1E4F46.8080604@codemonkey.ws>

[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]

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"

[-- Attachment #2: curl-win.patch --]
[-- Type: text/plain, Size: 1106 bytes --]

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"

      parent reply	other threads:[~2009-05-28 18:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 14:57 [Qemu-devel] [PATCH] Add HTTP protocol using curl v7 Alexander Graf
2009-05-22 15:41 ` Laurent Vivier
2009-05-27 14:49 ` Richard W.M. Jones
2009-05-27 14:55   ` Alexander Graf
2009-05-27 15:01     ` Richard W.M. Jones
2009-05-27 14:58   ` Anthony Liguori
2009-05-27 17:45     ` [Qemu-devel] " Consul
2009-05-28  8:45       ` Anthony Liguori
2009-05-28 18:20         ` Consul
2009-05-28 18:23         ` Consul [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gvmkr2$aok$2@ger.gmane.org' \
    --to=void@aleksoft.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.