nfc-tools icon indicating copy to clipboard operation
nfc-tools copied to clipboard

conflict with vfprintf in both fake-stdio and real stdio

Open Pascal66 opened this issue 9 years ago • 3 comments

UP ! Hi ! Still there ? I've a problem with the function vasprintf in vfprintf of fake-stdio len = vasprintf(&formatted, fmt, ap);

this function vasprintf need the "real" stdio.h wich make conflict but when i include it, i've a conflict with vfprintf wich is already defined in fake-stdio

How i can avoid that ?

Pascal66 avatar Jun 25 '16 08:06 Pascal66

Hi,

To be honest, after re-reading that code 4 years later, I can't explain why it didn't break before.

You can try to avoid the conflict by defining a vfprintf macro:

#include <stdio.h> #define vfprintf fake_vfprintf

Good luck!

(But seriously, this experiment didn't result in anything useful, don't waste your time trying to run it unless you have lots of time to waste and are just trying to learn something about how jni works on Android). Em sáb, 25 de jun de 2016 às 05:56, Pascal [email protected] escreveu:

UP ! Hi ! Still there ? I've a problem with the function vasprintf in vfprintf of fake-stdio len = vasprintf(&formatted, fmt, ap);

this function vasprintf need the "real" stdio.h wich make conflict but when i include it, i've a conflict with vfprintf wich is already defined in fake-stdio

How i can avoid that ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ehabkost/nfc-tools/issues/2, or mute the thread https://github.com/notifications/unsubscribe/AABqyKaEtFBmzfE9PsuZAtmux_LwMD8jks5qPO1XgaJpZM4I-TXy .

ehabkost avatar Jun 25 '16 10:06 ehabkost

Thank you for your answer. It's was to test the new androidstudio platform and cmake usage. btw, i've renamed the vprintf and now something work in old jni mode (but not like your apk does...??)

I understand that can never work on android, i've tried to install the opennfc library with no success in rom too

I've to use my time to make my pn532 with arduino to work with libnfc, it seems a more usefull way, but to much headhash for the moment.

Pascal66 avatar Jun 26 '16 13:06 Pascal66

The other goal, was to know if with c code i can make the authentication more quickly. I mean search for a keyA or keyB more quickly than my own java code with make only 15 keys/s

Pascal66 avatar Jun 26 '16 15:06 Pascal66