diff -r d36a89dcd21c -r 022e034bd4b8 plugins/canfestival/cf_runtime.c --- a/plugins/canfestival/cf_runtime.c Tue Dec 15 10:04:33 2009 +0100 +++ b/plugins/canfestival/cf_runtime.c Tue Dec 15 10:06:01 2009 +0100 @@ -79,7 +79,7 @@ canClose(&nodename##_Data);\ } -void __cleanup_%(locstr)s() +void __cleanup_%(locstr)s(void) { // Stop timer thread if(init_level-- > 0){ @@ -91,6 +91,11 @@ TimerCleanup(); } +#ifndef stderr +#define fprintf(...) +#define fflush(...) +#endif + #define NODE_OPEN(nodename)\ if(!canOpen(&nodename##Board,&nodename##_Data)){\ fprintf(stderr,"Cannot open CAN intefrace %%s at speed %%s\n for CANopen node \"" #nodename "\"",nodename##Board.busname, nodename##Board.baudrate);\ @@ -105,8 +110,8 @@ #ifndef NOT_USE_DYNAMIC_LOADING if( !LoadCanDriver("%(candriver)s") ){ fprintf(stderr, "Cannot load CAN interface library for CanFestival (%(candriver)s)\n");\ - fflush(stderr); - return -1; + fflush(stderr);\ + return -1;\ } #endif @@ -123,7 +128,7 @@ #define NODE_SEND_SYNC(nodename)\ sendSYNCMessage(&nodename##_Data); -void __retrieve_%(locstr)s() +void __retrieve_%(locstr)s(void) { /* Locks the stack, so that no changes occurs while PLC access variables * TODO : implement buffers to avoid such a big lock @@ -136,7 +141,7 @@ #define NODE_PROCEED_SYNC(nodename)\ proceedSYNC(&nodename##_Data); -void __publish_%(locstr)s() +void __publish_%(locstr)s(void) { /* Process sync event */ %(nodes_proceed_sync)s