X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_client_curl_event.c;h=38e1a56b3d6d62a5146512a22bc80a7cb9470d1b;hp=e1ba505b783d828ec92ca25d576f2432e394afdd;hb=bebb37d8185572d3766b7517ae8357bcc89227f8;hpb=0869caece2853a07711676bad8f032fa89ed82e9 diff --git a/src/php_http_client_curl_event.c b/src/php_http_client_curl_event.c index e1ba505..38e1a56 100644 --- a/src/php_http_client_curl_event.c +++ b/src/php_http_client_curl_event.c @@ -12,26 +12,13 @@ #include "php_http_api.h" -#if PHP_HTTP_HAVE_CURL -#if PHP_HTTP_HAVE_EVENT -# if !PHP_HTTP_HAVE_EVENT2 && /* just be really sure */ !(LIBEVENT_VERSION_NUMBER >= 0x02000000) -# include -# define event_base_new event_init -# define event_assign(e, b, s, a, cb, d) do {\ - event_set(e, s, a, cb, d); \ - event_base_set(b, e); \ - } while(0) -# else -# if PHP_HTTP_HAVE_EVENT2 -# include -# include -# else -# error "libevent presence is unknown" -# endif -# endif -# ifndef DBG_EVENTS -# define DBG_EVENTS 0 -# endif +#if PHP_HTTP_HAVE_LIBCURL +#if PHP_HTTP_HAVE_LIBEVENT + +#include +#ifndef DBG_EVENTS +# define DBG_EVENTS 0 +#endif typedef struct php_http_client_curl_event_context { php_http_client_t *client; @@ -314,8 +301,8 @@ php_http_client_curl_ops_t *php_http_client_curl_event_ops_get() return &php_http_client_curl_event_ops; } -#endif /* PHP_HTTP_HAVE_EVENT */ -#endif /* PHP_HTTP_HAVE_CURL */ +#endif /* PHP_HTTP_HAVE_LIBEVENT */ +#endif /* PHP_HTTP_HAVE_LIBCURL */ /* * Local variables: