Hi,
I'm starting to build 2.3.2 as an RPM for my Fedora Core {2,3} systems.
I've run across some code that's been inserted in eu_main.c, which
fails with my gcc-3.4 and kernel 2.4.22.
The errors are:
eu_main.c:367:1: directives may not be used inside a macro argument
eu_main.c:366:46: unterminated argument list invoking macro "eu_dbg"
The reason: eu_dbg() is a macro which references printk(). Inside this
macro here, there are #ifdef's (for the kernel version). But since
printk() or perhaps printf() is a macro itself (or perhaps just because
eu_dbg() is), you cannot use #ifdef's inside an invocation.
I'm attaching a patch which easily fixes this for me. (At least it
compiles, I'm not actually using the driver yet. ;->)
Thanks for listening,
Moritz
diff -ur eagle-usb-2.3.2/driver/eu_main.c
eagle-usb-2.3.2-eu_dbg/driver/eu_main.c
--- eagle-usb-2.3.2/driver/eu_main.c 2005-05-20 15:27:45.000000000 +0200
+++ eagle-usb-2.3.2-eu_dbg/driver/eu_main.c 2005-06-03 19:35:41.000000000
+0200
@@ -363,10 +363,11 @@
eu_enters (DBG_INIT);
- eu_dbg (DBG_INIT,"vid (%#X) pid (%#X) \n",
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+ eu_dbg (DBG_INIT,"vid (%#X) pid (%#X) \n",
le16_to_cpu(usb->descriptor.idVendor),
le16_to_cpu(usb->descriptor.idProduct));
#else
+ eu_dbg (DBG_INIT,"vid (%#X) pid (%#X) \n",
usb->descriptor.idVendor, usb->descriptor.idProduct);
#endif