src/stats.c has the following: gchar *tag_names[SC_TYPE_MAX] = { [SC_TYPE_DROPPED] = "dropped", [SC_TYPE_PROCESSED] = "processed", }; "[SC_TYPE_DROPPED]" is a GCC thing. I guess GCC allows you to index items in an array. But, the vendor compilers from Sun, HP, IBM, etc. don't. -- albert chin (china@thewrittenword.com) -- snip snip Index: src/stats.c =================================================================== --- src/stats.c.orig 2006-02-11 04:57:29.000000000 -0600 +++ src/stats.c 2006-05-25 17:14:38.681857000 -0500 @@ -143,8 +143,8 @@ StatsCounterType type; gchar *tag_names[SC_TYPE_MAX] = { - [SC_TYPE_DROPPED] = "dropped", - [SC_TYPE_PROCESSED] = "processed", + "dropped", + "processed" }; e = msg_event_create(EVT_PRI_NOTICE, "Log statistics", NULL);
On Thu, 2006-05-25 at 18:26 -0500, Albert Chin wrote:
src/stats.c has the following: gchar *tag_names[SC_TYPE_MAX] = { [SC_TYPE_DROPPED] = "dropped", [SC_TYPE_PROCESSED] = "processed", };
"[SC_TYPE_DROPPED]" is a GCC thing. I guess GCC allows you to index items in an array. But, the vendor compilers from Sun, HP, IBM, etc. don't.
No, it is not a gcc extension, but AFAIK it is C99. Anyway, thanks for the hint, I have just commited a similar fix, which should be available in tomorrow's snapshot. -- Bazsi
participants (2)
-
Albert Chin
-
Balazs Scheidler