X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_api.h;h=fbfea28a02b85593d2832210c61933ee7e2ddaaf;hb=287edcbfb698ff402588f7057dae0bc994d6e8e4;hp=bc3a2f5231f8bfc234fe971873eaa3aa897398e1;hpb=6cc24086f57aa1e8f4d6a2c12361635e7c24f60f;p=m6w6%2Fext-http diff --git a/php_http_api.h b/php_http_api.h index bc3a2f5..fbfea28 100644 --- a/php_http_api.h +++ b/php_http_api.h @@ -17,7 +17,9 @@ #include "config.h" #endif +#ifndef PHP_WIN32 #include +#endif #include #include @@ -27,16 +29,12 @@ #include -#if defined(PHP_WIN32) -# if defined(PHP_HTTP_EXPORTS) -# define PHP_HTTP_API __declspec(dllexport) -# elif defined(COMPILE_DL_HTTP) -# define PHP_HTTP_API __declspec(dllimport) -# else -# define PHP_HTTP_API -# endif +#ifdef PHP_WIN32 +# define PHP_HTTP_API __declspec(dllexport) +#elif defined(__GNUC__) && __GNUC__ >= 4 +# define PHP_HTTP_API __attribute__ ((visibility("default"))) #else -# define PHP_HTTP_API +# define PHP_HTTP_API #endif /* make functions that return SUCCESS|FAILURE more obvious */ @@ -50,6 +48,10 @@ typedef int STATUS; # define PHP_HTTP_HAVE_HASH #endif +#if (defined(HAVE_JSON) || defined(PHP_HTTP_HAVE_EXT_JSON)) && (PHP_HTTP_SHARED_DEPS || !defined(COMPILE_DL_JSON)) +# define PHP_HTTP_HAVE_JSON +#endif + #ifdef PHP_WIN32 # define CURL_STATICLIB # define PHP_HTTP_HAVE_NETDB @@ -99,11 +101,12 @@ typedef int STATUS; #include "php_http_client.h" #include "php_http_client_request.h" #include "php_http_client_response.h" -#include "php_http_client_curl.h" +#include "php_http_curl_client.h" #include "php_http_client_pool.h" -#include "php_http_client_pool_curl.h" +#include "php_http_curl_client_pool.h" #include "php_http_client_datashare.h" -#include "php_http_client_datashare_curl.h" +#include "php_http_curl_client_datashare.h" +#include "php_http_client_factory.h" #include "php_http_url.h" #include "php_http_version.h"