diff mbox

libcacard: stop including qemu-common.h

Message ID 1430130858-8246-1-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini April 27, 2015, 10:34 a.m. UTC
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(-)

Comments

Michael Tokarev April 27, 2015, 12:36 p.m. UTC | #1
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
Paolo Bonzini April 27, 2015, 1 p.m. UTC | #2
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
Michael Tokarev April 27, 2015, 1:01 p.m. UTC | #3
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
Michael Tokarev April 27, 2015, 1:03 p.m. UTC | #4
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.
Paolo Bonzini April 27, 2015, 1:04 p.m. UTC | #5
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
diff mbox

Patch

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"