Hello,
I am having to use the -macro-file command line option to get my script to operate properly. This is because when parsing the file, the Coccinelle script is unable to find the header file in the source tree that already contains the macro needed by the C code it is parsing. I am therefore having to redefine the macro in another file to be used with -macro-file. Is there a way to point the script to the header files that the C code requires? I have tried -I, but it still can't find the macro. The macro is MCAPI_THREAD_ENTRY, and is being used to define a thread as follows: #define MCAPI_THREAD_ENTRY(f) void *f(void *argv) So instead of declaring void *MCAPI_FTS_Tx_2_35_1(void *argv) in the source code (which is not portable across operating systems that don't use the same definition for a thread), we use MCAPI_THREAD_ENTRY(MCAPI_FTS_Tx_2_35_1). To port to other operating systems, just set MCAPI_THREAD_ENTRY to the properly definition. If I don't use the -macro-file option to declare the macro, Coccinelle rejects MCAPI_THREAD_ENTRY. Any advice is greatly appreciated. Regards, Tammy Leino Tammy Leino | Sr. Software Development Engineer Mentor Embedded <http://www.mentor.com/embedded> (tm) |739 N University Blvd, Mobile, AL 36608 USA P 251.208.3511 Nucleus <http://www.mentor.com/embedded-software/nucleus/> (r) | Linux <http://www.mentor.com/embedded-software/linux/> (r) | Android <http://www.mentor.com/embedded-software/android/> (tm) | Services <http://www.mentor.com/embedded-software/services/> | UI <http://www.mentor.com/embedded-software/inflexion/> | Multi-OS <http://www.mentor.com/embedded-software/multicore-multi-os>
_______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
