Chromium Code Reviews| Index: third_party/libevent/nacl/event-config.h |
| diff --git a/third_party/libevent/android/event-config.h b/third_party/libevent/nacl/event-config.h |
| similarity index 91% |
| copy from third_party/libevent/android/event-config.h |
| copy to third_party/libevent/nacl/event-config.h |
| index 7745519882dfd693d97458820088bc579f67a168..856edbab08f936120d5115ca5e28ca5b53820ad7 100644 |
| --- a/third_party/libevent/android/event-config.h |
| +++ b/third_party/libevent/nacl/event-config.h |
| @@ -1,9 +1,8 @@ |
| -/* Copied from Linux version and changed the features according Android, which |
| +/* Copied from Linux version and changed the features according NaCl, which |
| * is close to Linux */ |
| + |
| #ifndef _EVENT_CONFIG_H_ |
| #define _EVENT_CONFIG_H_ |
| -/* config.h. Generated from config.h.in by configure. */ |
| -/* config.h.in. Generated from configure.in by autoheader. */ |
| /* Define if clock_gettime is available in libc */ |
| #define _EVENT_DNS_USE_CPU_CLOCK_FOR_ID 1 |
| @@ -21,10 +20,10 @@ |
| #define _EVENT_HAVE_DLFCN_H 1 |
| /* Define if your system supports the epoll system calls */ |
| -#define _EVENT_HAVE_EPOLL 1 |
| +/* #undef _EVENT_HAVE_EPOLL */ |
| /* Define to 1 if you have the `epoll_ctl' function. */ |
| -#define _EVENT_HAVE_EPOLL_CTL 1 |
| +/* #undef _EVENT_HAVE_EPOLL_CTL */ |
| /* Define if your system supports event ports */ |
| /* #undef _EVENT_HAVE_EVENT_PORTS */ |
| @@ -36,7 +35,7 @@ |
| #define _EVENT_HAVE_FCNTL_H 1 |
| /* Define to 1 if the system has the type `fd_mask'. */ |
| -/* #undef _EVENT_HAVE_FD_MASK 1 */ |
| +#define _EVENT_HAVE_FD_MASK 1 |
| /* Define to 1 if you have the `getaddrinfo' function. */ |
| #define _EVENT_HAVE_GETADDRINFO 1 |
| @@ -96,13 +95,13 @@ |
| /* #undef _EVENT_HAVE_PORT_H */ |
| /* Define to 1 if you have the `select' function. */ |
| -#define _EVENT_HAVE_SELECT 1 |
| +/* #undef _EVENT_HAVE_SELECT */ |
| /* Define if F_SETFD is defined in <fcntl.h> */ |
| #define _EVENT_HAVE_SETFD 1 |
| /* Define to 1 if you have the `sigaction' function. */ |
| -#define _EVENT_HAVE_SIGACTION 1 |
| +/* #undef _EVENT_HAVE_SIGACTION */ |
| /* Define to 1 if you have the `signal' function. */ |
| #define _EVENT_HAVE_SIGNAL 1 |
| @@ -126,7 +125,7 @@ |
| #define _EVENT_HAVE_STRING_H 1 |
| /* Define to 1 if you have the `strlcpy' function. */ |
| -#define _EVENT_HAVE_STRLCPY 1 |
| +/* #undef _EVENT_HAVE_STRLCPY */ |
| /* Define to 1 if you have the `strsep' function. */ |
| #define _EVENT_HAVE_STRSEP 1 |
| @@ -144,13 +143,13 @@ |
| /* #undef _EVENT_HAVE_SYS_DEVPOLL_H */ |
| /* Define to 1 if you have the <sys/epoll.h> header file. */ |
| -#define _EVENT_HAVE_SYS_EPOLL_H 1 |
| +/* #undef _EVENT_HAVE_SYS_EPOLL_H */ |
| /* Define to 1 if you have the <sys/event.h> header file. */ |
| /* #undef _EVENT_HAVE_SYS_EVENT_H */ |
| /* Define to 1 if you have the <sys/ioctl.h> header file. */ |
| -#define _EVENT_HAVE_SYS_IOCTL_H 1 |
| +/* #undef _EVENT_HAVE_SYS_IOCTL_H */ |
| /* Define to 1 if you have the <sys/param.h> header file. */ |
| #define _EVENT_HAVE_SYS_PARAM_H 1 |
| @@ -177,16 +176,16 @@ |
| #define _EVENT_HAVE_TAILQFOREACH 1 |
| /* Define if timeradd is defined in <sys/time.h> */ |
| -#define _EVENT_HAVE_TIMERADD 1 |
| +/* #undef _EVENT_HAVE_TIMERADD */ |
| /* Define if timerclear is defined in <sys/time.h> */ |
| -#define _EVENT_HAVE_TIMERCLEAR 1 |
| +/* #undef _EVENT_HAVE_TIMERCLEAR */ |
| /* Define if timercmp is defined in <sys/time.h> */ |
| -#define _EVENT_HAVE_TIMERCMP 1 |
| +/* #undef _EVENT_HAVE_TIMERCMP */ |
| /* Define if timerisset is defined in <sys/time.h> */ |
| -#define _EVENT_HAVE_TIMERISSET 1 |
| +/* #undef _EVENT_HAVE_TIMERISSET */ |
| /* Define to 1 if the system has the type `uint16_t'. */ |
| #define _EVENT_HAVE_UINT16_T 1 |
| @@ -210,7 +209,7 @@ |
| /* #undef _EVENT_HAVE_WORKING_KQUEUE */ |
| /* Name of package */ |
| -#define _EVENT_PACKAGE "libevent" |
| +#define _EVENT_PACKAGE "libevent_nacl" |
| /* Define to the address where bug reports for this package should be sent. */ |
| #define _EVENT_PACKAGE_BUGREPORT "" |
| @@ -268,4 +267,12 @@ |
| /* Define to unsigned int if you dont have it */ |
| /* #undef _EVENT_socklen_t */ |
| + |
| +/* Work around for __native_client_nonsfi__ build. random() is not provided |
| + * by the toolchain, so here we define the static inline function, to redirect |
|
Mark Seaborn
2014/10/13 16:02:01
Nit: "the toolchain" -> "newlib" or "the newlib-ba
hidehiko
2014/10/14 09:07:13
Done.
|
| + * it to rand(). |
| + */ |
| +#include <stdlib.h> |
| +static inline int random() { return rand(); } |
|
Mark Seaborn
2014/10/13 16:02:01
Nit: Might as well follow the coding style and put
hidehiko
2014/10/14 09:07:13
Done.
|
| + |
| #endif |