Make the headers compile happily with pedantic C compilers.

Original message from SF patch 2797966:

    While commas at the end of enumerator lists are valid in c99, they
    are not valid +in c89 nor in c++. When using gcc/g++ with the
    -pedantic flag, users will +receive a warning (gcc) or an
    error(g++) when including the event2/event.h and
    +event2/bufferevent.h. The errors look something like

    event2/event.h:159: error: comma at end of enumerator list

Patch from Akita Noek on Sourceforge.

svn:r1321
This commit is contained in:
Nick Mathewson 2009-05-28 15:58:28 +00:00
parent 0b4ab12251
commit eb97bb76e1
2 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ enum bufferevent_options {
BEV_OPT_THREADSAFE = (1<<1), BEV_OPT_THREADSAFE = (1<<1),
/** If set, callbacks are run deferred in the event loop. */ /** If set, callbacks are run deferred in the event loop. */
BEV_OPT_DEFER_CALLBACKS = (1<<2), BEV_OPT_DEFER_CALLBACKS = (1<<2)
}; };
/** /**
@ -366,7 +366,7 @@ enum bufferevent_flush_mode {
BEV_FLUSH = 1, BEV_FLUSH = 1,
/** encountered EOF on read or done sending data */ /** encountered EOF on read or done sending data */
BEV_FINISHED = 2, BEV_FINISHED = 2
}; };
/** /**

View File

@ -156,7 +156,7 @@ enum event_method_feature {
EV_FEATURE_O1 = 0x02, EV_FEATURE_O1 = 0x02,
/* Require an event method that allows file descriptors as well as /* Require an event method that allows file descriptors as well as
* sockets. */ * sockets. */
EV_FEATURE_FDS = 0x04, EV_FEATURE_FDS = 0x04
}; };
enum event_base_config_flag { enum event_base_config_flag {
@ -165,7 +165,7 @@ enum event_base_config_flag {
EVENT_BASE_FLAG_NOLOCK = 0x01, EVENT_BASE_FLAG_NOLOCK = 0x01,
/** Do not check the EVENT_NO* environment variables when picking /** Do not check the EVENT_NO* environment variables when picking
an event_base. */ an event_base. */
EVENT_BASE_FLAG_IGNORE_ENV = 0x02, EVENT_BASE_FLAG_IGNORE_ENV = 0x02
}; };
/** /**