I had similar problems compiling under AIX and had to change the macro definitions to be #define msg_fatal(desc, ... ) msg_event_send(msg_event_create(EVT_PRI_CRIT, desc, __VA_ARGS__ )) This is a little dangerous because it assumes that the tag1 and the tags... are together in both the msg_fatal AND in the msg_event_create which is currently the case, but could change in future versions. I would have liked to make #define msg_fatal(desc, tag1, ...) msg_event_send(msg_event_create(EVT_PRI_CRIT, desc, tag1, __VA_ARGS__ )) but there are a few (<20) calls in the code that do not supply any paramaters, not even NULL, for the ... argument and the xlc AIX compiler does not like this. I could change these calls by adding another NULL paramater but that makes and even more dangerous assumption that the msg_event_send function will not use the variable agrument list if tag1 is NULL, which is currently the case, but may change in future versions. I think Bazsi should change the variadic macro definitions a little less gcc specific. One more item for AIX (xlc actually) is that the calls to the preprocessor which expands these macros needs to have -qlanglvl=extended option suppied or the whole variadic macro thing just fails. Evan. Padmanabhan, Rajeesh (GE Healthcare) wrote:
Hi Bazsi,
Need your help in compiling syslog-ng for Solaris. Im getting the following error when i 'make'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"./messages.h", line 33: syntax error in macro parameters "./messages.h", line 34: syntax error in macro parameters "./messages.h", line 35: syntax error in macro parameters "./messages.h", line 37: syntax error in macro parameters "./messages.h", line 43: syntax error in macro parameters cc: acomp failed for messages.c *** Error code 2 make: Fatal error: Command failed for target `messages.o' Current working directory /syslog-ng-2.0.1/src *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /syslog-ng-2.0.1 *** Error code 1 make: Fatal error: Command failed for target `all'
cc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -g -g -c `test -f 'messages.c' || echo './'`messages.c
*** Error code 2 make: Fatal error: Command failed for target `messages.o' Current working directory /syslog-ng-2.0.1/src *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /syslog-ng-2.0.1 *** Error code 1 make: Fatal error: Command failed for target `all'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
I suspect problem with macro defenition in message.h.
#define msg_fatal(desc, tag1, tags, ...)msg_event_send(msg_event_create(EVT_PRI_CRIT, desc, tag1, ##tags )) #define msg_error(desc, tag1, tags, ...)msg_event_send(msg_event_create(EVT_PRI_ERR, desc, tag1, ##tags )) #define msg_notice(desc, tag1,tags, ... ) msg_event_send(msg_event_create(EVT_PRI_NOTICE, desc, tag1, ##tags ))
Please help.
Thanks,
Rajeesh
------------------------------------------------------------------------
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- Evan Rempel erempel@uvic.ca Senior Programmer Analyst 250.721.7691 Computing Services University of Victoria