qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h
@ 2015-04-27 10:34 Paolo Bonzini
  2015-04-27 12:36 ` Michael Tokarev
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2015-04-27 10:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: mjt

This is a small step towards making libcacard standalone.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 libcacard/cac.c            | 5 ++++-
 libcacard/card_7816.c      | 4 +++-
 libcacard/event.c          | 2 +-
 libcacard/vcard.c          | 4 +++-
 libcacard/vcard_emul_nss.c | 2 +-
 libcacard/vreader.c        | 4 +++-
 libcacard/vscclient.c      | 2 +-
 7 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/libcacard/cac.c b/libcacard/cac.c
index f38fdce..2a7d1a4 100644
--- a/libcacard/cac.c
+++ b/libcacard/cac.c
@@ -5,7 +5,10 @@
  * See the COPYING.LIB file in the top-level directory.
  */
 
-#include "qemu-common.h"
+#include "glib-compat.h"
+
+#include <string.h>
+#include <stdbool.h>
 
 #include "cac.h"
 #include "vcard.h"
diff --git a/libcacard/card_7816.c b/libcacard/card_7816.c
index 814fa16..0c22dc4 100644
--- a/libcacard/card_7816.c
+++ b/libcacard/card_7816.c
@@ -5,7 +5,9 @@
  * See the COPYING.LIB file in the top-level directory.
  */
 
-#include "qemu-common.h"
+#include "glib-compat.h"
+
+#include <string.h>
 
 #include "vcard.h"
 #include "vcard_emul.h"
diff --git a/libcacard/event.c b/libcacard/event.c
index 4c551e4..10ef928 100644
--- a/libcacard/event.c
+++ b/libcacard/event.c
@@ -5,7 +5,7 @@
  * See the COPYING.LIB file in the top-level directory.
  */
 
-#include "qemu-common.h"
+#include "glib-compat.h"
 
 #include "vcard.h"
 #include "vreader.h"
diff --git a/libcacard/vcard.c b/libcacard/vcard.c
index d140a8e..b4aecee 100644
--- a/libcacard/vcard.c
+++ b/libcacard/vcard.c
@@ -5,7 +5,9 @@
  * See the COPYING.LIB file in the top-level directory.
  */
 
-#include "qemu-common.h"
+#include "glib-compat.h"
+
+#include <string.h>
 
 #include "vcard.h"
 #include "vcard_emul.h"
diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c
index 950edee..5fde0eb 100644
--- a/libcacard/vcard_emul_nss.c
+++ b/libcacard/vcard_emul_nss.c
@@ -25,7 +25,7 @@
 #include <prthread.h>
 #include <secerr.h>
 
-#include "qemu-common.h"
+#include "glib-compat.h"
 
 #include "vcard.h"
 #include "card_7816t.h"
diff --git a/libcacard/vreader.c b/libcacard/vreader.c
index 0315dd8..562da44 100644
--- a/libcacard/vreader.c
+++ b/libcacard/vreader.c
@@ -10,7 +10,9 @@
 #endif
 #define G_LOG_DOMAIN "libcacard"
 
-#include "qemu-common.h"
+#include "glib-compat.h"
+
+#include <string.h>
 
 #include "vcard.h"
 #include "vcard_emul.h"
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index fa6041d..8c6fb82 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -17,7 +17,7 @@
 #define closesocket(x) close(x)
 #endif
 
-#include "qemu-common.h"
+#include "glib-compat.h"
 
 #include "vscard_common.h"
 
-- 
2.3.5

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

* Re: [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h
  2015-04-27 10:34 [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h Paolo Bonzini
@ 2015-04-27 12:36 ` Michael Tokarev
  2015-04-27 13:00   ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2015-04-27 12:36 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

27.04.2015 13:34, Paolo Bonzini wrote:
> This is a small step towards making libcacard standalone.

No, this does not build, it complains about printf everywhere
and some other things, like atoi.  I'll try to make it better,
and maybe to omit glib-compat inclusion too from some places.

Thanks,

/mjt

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

* Re: [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h
  2015-04-27 12:36 ` Michael Tokarev
@ 2015-04-27 13:00   ` Paolo Bonzini
  2015-04-27 13:01     ` Michael Tokarev
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2015-04-27 13:00 UTC (permalink / raw)
  To: Michael Tokarev, qemu-devel



On 27/04/2015 14:36, Michael Tokarev wrote:
>> This is a small step towards making libcacard standalone.
> No, this does not build, it complains about printf everywhere
> and some other things, like atoi.  I'll try to make it better,
> and maybe to omit glib-compat inclusion too from some places.

Weird, it builds here.  Must be a different glib.

Paolo

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

* Re: [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h
  2015-04-27 13:00   ` Paolo Bonzini
@ 2015-04-27 13:01     ` Michael Tokarev
  2015-04-27 13:03       ` Michael Tokarev
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2015-04-27 13:01 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

27.04.2015 16:00, Paolo Bonzini wrote:
> On 27/04/2015 14:36, Michael Tokarev wrote:
>>> This is a small step towards making libcacard standalone.
>> No, this does not build, it complains about printf everywhere
>> and some other things, like atoi.  I'll try to make it better,
>> and maybe to omit glib-compat inclusion too from some places.
> 
> Weird, it builds here.  Must be a different glib.

All the missing includes are in vscclient.c.

/mjt

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

* Re: [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h
  2015-04-27 13:01     ` Michael Tokarev
@ 2015-04-27 13:03       ` Michael Tokarev
  2015-04-27 13:04         ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2015-04-27 13:03 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

27.04.2015 16:01, Michael Tokarev пишет:
> 27.04.2015 16:00, Paolo Bonzini wrote:
>> On 27/04/2015 14:36, Michael Tokarev wrote:
>>>> This is a small step towards making libcacard standalone.
>>> No, this does not build, it complains about printf everywhere
>>> and some other things, like atoi.  I'll try to make it better,
>>> and maybe to omit glib-compat inclusion too from some places.
>>
>> Weird, it builds here.  Must be a different glib.
> 
> All the missing includes are in vscclient.c.

stdio.h for printf
string.h for various strcmp etc
stdlib.h for atoi
unistd.h (on *nix) for getopt

It looks like you didn't build vscclient.

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

* Re: [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h
  2015-04-27 13:03       ` Michael Tokarev
@ 2015-04-27 13:04         ` Paolo Bonzini
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2015-04-27 13:04 UTC (permalink / raw)
  To: Michael Tokarev, qemu-devel



On 27/04/2015 15:03, Michael Tokarev wrote:
>> > 
>> > All the missing includes are in vscclient.c.
> stdio.h for printf
> string.h for various strcmp etc
> stdlib.h for atoi
> unistd.h (on *nix) for getopt
> 
> It looks like you didn't build vscclient.

/me holds myself guilty.

Paolo

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

end of thread, other threads:[~2015-04-27 13:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 10:34 [Qemu-devel] [PATCH] libcacard: stop including qemu-common.h Paolo Bonzini
2015-04-27 12:36 ` Michael Tokarev
2015-04-27 13:00   ` Paolo Bonzini
2015-04-27 13:01     ` Michael Tokarev
2015-04-27 13:03       ` Michael Tokarev
2015-04-27 13:04         ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).