Lines 17-35
Link Here
|
17 |
#include "base/scoped_nsautorelease_pool.h" |
17 |
#include "base/scoped_nsautorelease_pool.h" |
18 |
#include "base/time.h" |
18 |
#include "base/time.h" |
19 |
#include "nsDependentSubstring.h" |
19 |
#include "nsDependentSubstring.h" |
20 |
#include "event.h" |
20 |
#include "event.h" |
21 |
#include "mozilla/UniquePtr.h" |
21 |
#include "mozilla/UniquePtr.h" |
22 |
|
22 |
|
23 |
// This macro checks that the _EVENT_SIZEOF_* constants defined in |
23 |
// This macro checks that the _EVENT_SIZEOF_* constants defined in |
24 |
// ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct. |
24 |
// ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct. |
|
|
25 |
#if defined(_EVENT_SIZEOF_SHORT) |
25 |
#define CHECK_EVENT_SIZEOF(TYPE, type) \ |
26 |
#define CHECK_EVENT_SIZEOF(TYPE, type) \ |
26 |
static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \ |
27 |
static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \ |
27 |
"bad _EVENT_SIZEOF_"#TYPE); |
28 |
"bad _EVENT_SIZEOF_"#TYPE); |
|
|
29 |
#elif defined(EVENT__SIZEOF_SHORT) |
30 |
#define CHECK_EVENT_SIZEOF(TYPE, type) \ |
31 |
static_assert(EVENT__SIZEOF_##TYPE == sizeof(type), \ |
32 |
"bad EVENT__SIZEOF_"#TYPE); |
33 |
#else |
34 |
#error Cannot find libevent type sizes |
35 |
#endif |
28 |
|
36 |
|
29 |
CHECK_EVENT_SIZEOF(LONG, long); |
37 |
CHECK_EVENT_SIZEOF(LONG, long); |
30 |
CHECK_EVENT_SIZEOF(LONG_LONG, long long); |
38 |
CHECK_EVENT_SIZEOF(LONG_LONG, long long); |
31 |
CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t); |
39 |
CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t); |
32 |
CHECK_EVENT_SIZEOF(SHORT, short); |
40 |
CHECK_EVENT_SIZEOF(SHORT, short); |
33 |
CHECK_EVENT_SIZEOF(SIZE_T, size_t); |
41 |
CHECK_EVENT_SIZEOF(SIZE_T, size_t); |
34 |
CHECK_EVENT_SIZEOF(VOID_P, void*); |
42 |
CHECK_EVENT_SIZEOF(VOID_P, void*); |
35 |
|
43 |
|