timmerk / mfcuk

Automatically exported from code.google.com/p/mfcuk
GNU General Public License v2.0
0 stars 0 forks source link

Error compiling crapto1.h #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
At revision 57:

Steps followed:

1. svn checkout http://mfcuk.googlecode.com/svn/trunk/ mfcuk-read-only
2. cd mfcuk-read-only
3. autoreconf -vis
4. automake
5. autoconf
6. PKG_CONFIG_PATH=../libnfc-read-only/ ./configure
7. make

When compiling on a eee pc 1000 h running Mac OS X Snow Leopard 10.6.3 with all 
the required libs (including libnfc 1.5.1) installed I get this error:

make  all-recursive
Making all in src
  CC     crapto1.o
In file included from crapto1.c:20:
crapto1.h: In function ‘parity’:
crapto1.h:64: warning: implicit declaration of function ‘asm’
crapto1.h:70: error: expected ‘)’ before ‘:’ token
make[2]: *** [crapto1.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

The specified lines in crapto1.h look like this:

asm(    "movl %1, %%eax\n"
        "mov %%ax, %%cx\n"
        "shrl $0x10, %%eax\n"
        "xor %%ax, %%cx\n"
        "xor %%ch, %%cl\n"
        "setpo %%al\n"
        "movzx %%al, %0\n": "=r"(x): "r"(x): "eax","ecx");

I'm not a C guru but I don't see the problem.

Original issue reported on code.google.com by m...@dimme.net on 16 Oct 2011 at 7:56

GoogleCodeExporter commented 9 years ago
Changing asm() to __asm() sovled the problem but now I bumped into new problems.

Will create new ticket.

Original comment by m...@dimme.net on 16 Oct 2011 at 8:02

GoogleCodeExporter commented 9 years ago

Original comment by romu...@libnfc.org on 17 Oct 2011 at 3:19