#include "config.h"
#endif
+#ifndef PHP_WIN32
#include <php_config.h>
+#endif
#include <php.h>
#include <SAPI.h>
#include <zend_interfaces.h>
-#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 */
# 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