X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_api.h;h=ca1e2f7b43340d6308c7a1bd7460e72f625e79a1;hp=2334404f31f7b1aea20caf43b67ffc1ba3b2491e;hb=dada371ebca4e4015b00067254fad1d7c2f06d2f;hpb=2769c041b77a0aaba7acbee4ae469571eaeb2b0a diff --git a/php_http_api.h b/php_http_api.h index 2334404..ca1e2f7 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 @@ -72,10 +74,10 @@ typedef int STATUS; #include "php_http_strlist.h" #include "php_http_misc.h" #include "php_http_resource_factory.h" +#include "php_http_options.h" #include "php_http.h" #include "php_http_cookie.h" -#include "php_http_curl.h" #include "php_http_encoding.h" #include "php_http_env.h" #include "php_http_env_request.h" @@ -97,6 +99,7 @@ typedef int STATUS; #include "php_http_querystring.h" #include "php_http_client_interface.h" #include "php_http_client.h" +#include "php_http_curl.h" #include "php_http_client_request.h" #include "php_http_client_response.h" #include "php_http_curl_client.h"