summaryrefslogtreecommitdiff
path: root/ext/gmp/php_gmp_int.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-10-23 13:21:46 +0200
committerAnatol Belski <ab@php.net>2017-10-23 13:27:34 +0200
commit60d45e6a5b96bb986399d725e64aae043465c8ff (patch)
tree7ba1efd81937448cd284f9f48ed7d1c84ad600b7 /ext/gmp/php_gmp_int.h
parent12bd998d5830882d12db2b1b6ba70890b4ede531 (diff)
downloadphp-git-60d45e6a5b96bb986399d725e64aae043465c8ff.tar.gz
Fix visibility
Diffstat (limited to 'ext/gmp/php_gmp_int.h')
-rw-r--r--ext/gmp/php_gmp_int.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/gmp/php_gmp_int.h b/ext/gmp/php_gmp_int.h
index 9dd4c4d7f0..d8111a6e47 100644
--- a/ext/gmp/php_gmp_int.h
+++ b/ext/gmp/php_gmp_int.h
@@ -8,6 +8,14 @@
#include "php.h"
#include <gmp.h>
+#ifdef PHP_WIN32
+# define PHP_GMP_API __declspec(dllexport)
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_GMP_API __attribute__ ((visibility("default")))
+#else
+# define PHP_GMP_API
+#endif
+
typedef struct _gmp_object {
mpz_t num;
zend_object std;
@@ -17,7 +25,7 @@ static inline gmp_object *php_gmp_object_from_zend_object(zend_object *zobj) {
return (gmp_object *)( ((char *)zobj) - XtOffsetOf(gmp_object, std) );
}
-PHPAPI zend_class_entry *php_gmp_class_entry();
+PHP_GMP_API zend_class_entry *php_gmp_class_entry();
/* GMP and MPIR use different datatypes on different platforms */
#ifdef PHP_WIN32