fix build with xcode clang
[m6w6/ext-http] / php_http_api.h
index 631b620d5392d608db9f066f8e7461b6cff41820..ec4a989d25fdb4b59825ac552e4048983f885d1b 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2013, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
 #ifdef PHP_WIN32
 # define PHP_HTTP_API __declspec(dllexport)
 #elif defined(__GNUC__) && __GNUC__ >= 4
-# define PHP_HTTP_API __attribute__ ((visibility("default")))
+# define PHP_HTTP_API extern __attribute__ ((visibility("default")))
 #else
-# define PHP_HTTP_API
+# define PHP_HTTP_API extern
 #endif
 
 /* make functions that return SUCCESS|FAILURE more obvious */
 typedef int STATUS;
 
+/* inline doc */
+#define _RETURNS(type)
+
 #if (defined(HAVE_ICONV) || defined(PHP_HTTP_HAVE_EXT_ICONV)) && (PHP_HTTP_SHARED_DEPS || !defined(COMPILE_DL_ICONV))
 #      define PHP_HTTP_HAVE_ICONV
 #endif
@@ -64,6 +67,9 @@ typedef int STATUS;
 #      ifdef HAVE_UNISTD_H
 #              include <unistd.h>
 #      endif
+#      ifdef HAVE_ERRNO_H
+#              include <errno.h>
+#      endif
 #endif
 
 #include <ctype.h>