dmitry Wed Jan 30 09:56:22 2008 UTC
Modified files:
/php-src configure.in
/TSRM TSRM.h tsrm_virtual_cwd.h
/ZendEngine2 acconfig.h
/php-src/ext/bz2 php_bz2.h
/php-src/ext/dom xml_common.h
/php-src/ext/gd php_gd.h
/php-src/ext/hash php_hash.h
/php-src/ext/iconv php_iconv.h
/php-src/ext/libxml php_libxml.h
/php-src/ext/mbstring mbstring.h
/php-src/ext/mysqli php_mysqli_structs.h
/php-src/ext/pdo php_pdo.h
/php-src/ext/pgsql php_pgsql.h
/php-src/ext/skeleton php_skeleton.h
/php-src/ext/spl php_spl.h
/php-src/ext/unicode php_unicode.h
/php-src/ext/zip/lib zip.h
/php-src/main SAPI.h php.h
/php-src/sapi/apache2filter php_apache.h
/php-src/sapi/apache2handler php_apache.h
/php-src/sapi/apache_hooks mod_php5.h
/php-src/sapi/pi3web pi3web_sapi.h
Log:
Imporoved PHP binary size and startup speed with GCC4 visibility control
(Nuno)
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.643&r2=1.644&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.643 php-src/configure.in:1.644
--- php-src/configure.in:1.643 Tue Jan 22 09:29:29 2008
+++ php-src/configure.in Wed Jan 30 09:56:21 2008
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.643 2008/01/22 09:29:29 dmitry Exp $ -*- autoconf -*-
+## $Id: configure.in,v 1.644 2008/01/30 09:56:21 dmitry Exp $ -*- autoconf -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -165,6 +165,14 @@
;;
esac
+dnl activate some gcc specific optimizations for gcc >= 4
+if test "$GCC" = "yes"; then
+ GCC_MAJOR_VERSION=`$CC --version | $SED -n
'1s/[[^0-9]]*\([[0-9]]\+\)\.[[0-9]]\+\..*/\1/;1p'`
+ if test $GCC_MAJOR_VERSION -ge 4; then
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ fi
+fi
+
case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
http://cvs.php.net/viewvc.cgi/TSRM/TSRM.h?r1=1.57&r2=1.58&diff_format=u
Index: TSRM/TSRM.h
diff -u TSRM/TSRM.h:1.57 TSRM/TSRM.h:1.58
--- TSRM/TSRM.h:1.57 Mon Dec 31 07:12:06 2007
+++ TSRM/TSRM.h Wed Jan 30 09:56:21 2008
@@ -22,10 +22,12 @@
#ifdef TSRM_WIN32
# ifdef TSRM_EXPORTS
-# define TSRM_API __declspec(dllexport)
+# define TSRM_API __declspec(dllexport)
# else
-# define TSRM_API __declspec(dllimport)
+# define TSRM_API __declspec(dllimport)
# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define TSRM_API __attribute__ ((visibility("default")))
#else
# define TSRM_API
#endif
http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.h?r1=1.64&r2=1.65&diff_format=u
Index: TSRM/tsrm_virtual_cwd.h
diff -u TSRM/tsrm_virtual_cwd.h:1.64 TSRM/tsrm_virtual_cwd.h:1.65
--- TSRM/tsrm_virtual_cwd.h:1.64 Mon Dec 31 07:12:06 2007
+++ TSRM/tsrm_virtual_cwd.h Wed Jan 30 09:56:21 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.h,v 1.64 2007/12/31 07:12:06 sebastian Exp $ */
+/* $Id: tsrm_virtual_cwd.h,v 1.65 2008/01/30 09:56:21 dmitry Exp $ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
@@ -134,13 +134,15 @@
#endif
#ifdef TSRM_WIN32
-# ifdef CWD_EXPORTS
-# define CWD_API __declspec(dllexport)
-# else
-# define CWD_API __declspec(dllimport)
-# endif
+# ifdef CWD_EXPORTS
+# define CWD_API __declspec(dllexport)
+# else
+# define CWD_API __declspec(dllimport)
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define CWD_API __attribute__ ((visibility("default")))
#else
-#define CWD_API
+# define CWD_API
#endif
#ifdef TSRM_WIN32
http://cvs.php.net/viewvc.cgi/ZendEngine2/acconfig.h?r1=1.43&r2=1.44&diff_format=u
Index: ZendEngine2/acconfig.h
diff -u ZendEngine2/acconfig.h:1.43 ZendEngine2/acconfig.h:1.44
--- ZendEngine2/acconfig.h:1.43 Mon Dec 31 07:12:06 2007
+++ ZendEngine2/acconfig.h Wed Jan 30 09:56:21 2008
@@ -17,10 +17,16 @@
+----------------------------------------------------------------------+
*/
-/* $Id: acconfig.h,v 1.43 2007/12/31 07:12:06 sebastian Exp $ */
+/* $Id: acconfig.h,v 1.44 2008/01/30 09:56:21 dmitry Exp $ */
+
+#if defined(__GNUC__) && __GNUC__ >= 4
+# define ZEND_API __attribute__ ((visibility("default")))
+# define ZEND_DLEXPORT __attribute__ ((visibility("default")))
+#else
+# define ZEND_API
+# define ZEND_DLEXPORT
+#endif
-#define ZEND_API
-#define ZEND_DLEXPORT
#define ZEND_DLIMPORT
@TOP@
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/php_bz2.h?r1=1.13&r2=1.14&diff_format=u
Index: php-src/ext/bz2/php_bz2.h
diff -u php-src/ext/bz2/php_bz2.h:1.13 php-src/ext/bz2/php_bz2.h:1.14
--- php-src/ext/bz2/php_bz2.h:1.13 Mon Dec 31 07:12:07 2007
+++ php-src/ext/bz2/php_bz2.h Wed Jan 30 09:56:21 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_bz2.h,v 1.13 2007/12/31 07:12:07 sebastian Exp $ */
+/* $Id: php_bz2.h,v 1.14 2008/01/30 09:56:21 dmitry Exp $ */
#ifndef PHP_BZ2_H
#define PHP_BZ2_H
@@ -34,15 +34,17 @@
#endif
#ifdef PHP_WIN32
-# ifdef PHP_BZ2_EXPORTS
-# define PHP_BZ2_API __declspec(dllexport)
-# elif defined(COMPILE_DL_BZ2)
-# define PHP_BZ2_API __declspec(dllimport)
-# else
-# define PHP_BZ2_API /* nothing special */
-# endif
+# ifdef PHP_BZ2_EXPORTS
+# define PHP_BZ2_API __declspec(dllexport)
+# elif defined(COMPILE_DL_BZ2)
+# define PHP_BZ2_API __declspec(dllimport)
+# else
+# define PHP_BZ2_API /* nothing special */
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_BZ2_API __attribute__ ((visibility("default")))
#else
-# define PHP_BZ2_API
+# define PHP_BZ2_API
#endif
PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper, char
*path, char *mode, int options, char **opened_path, php_stream_context *context
STREAMS_DC TSRMLS_DC);
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/xml_common.h?r1=1.28&r2=1.29&diff_format=u
Index: php-src/ext/dom/xml_common.h
diff -u php-src/ext/dom/xml_common.h:1.28 php-src/ext/dom/xml_common.h:1.29
--- php-src/ext/dom/xml_common.h:1.28 Mon Dec 31 07:12:09 2007
+++ php-src/ext/dom/xml_common.h Wed Jan 30 09:56:21 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml_common.h,v 1.28 2007/12/31 07:12:09 sebastian Exp $ */
+/* $Id: xml_common.h,v 1.29 2008/01/30 09:56:21 dmitry Exp $ */
#ifndef PHP_XML_COMMON_H
#define PHP_XML_COMMON_H
@@ -35,14 +35,19 @@
} dom_object;
#ifdef PHP_WIN32
-#ifdef PHPAPI
-#undef PHPAPI
-#endif
-#ifdef DOM_EXPORTS
-#define PHPAPI __declspec(dllexport)
-#else
-#define PHPAPI __declspec(dllimport)
-#endif /* DOM_EXPORTS */
+# ifdef PHPAPI
+# undef PHPAPI
+# endif
+# ifdef DOM_EXPORTS
+# define PHPAPI __declspec(dllexport)
+# else
+# define PHPAPI __declspec(dllimport)
+# endif /* DOM_EXPORTS */
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# ifdef PHPAPI
+# undef PHPAPI
+# endif
+# define PHPAPI __attribute__ ((visibility("default")))
#endif /* PHP_WIN32 */
#define PHP_DOM_EXPORT PHPAPI
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.75&r2=1.76&diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.75 php-src/ext/gd/php_gd.h:1.76
--- php-src/ext/gd/php_gd.h:1.75 Mon Dec 31 07:12:09 2007
+++ php-src/ext/gd/php_gd.h Wed Jan 30 09:56:21 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_gd.h,v 1.75 2007/12/31 07:12:09 sebastian Exp $ */
+/* $Id: php_gd.h,v 1.76 2008/01/30 09:56:21 dmitry Exp $ */
#ifndef PHP_GD_H
#define PHP_GD_H
@@ -49,9 +49,11 @@
#define PHP_GDIMG_TYPE_GD2PART 10
#ifdef PHP_WIN32
-#define PHP_GD_API __declspec(dllexport)
+# define PHP_GD_API __declspec(dllexport)
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_GD_API __attribute__ ((visibility("default")))
#else
-#define PHP_GD_API
+# define PHP_GD_API
#endif
PHPAPI extern const char php_sig_gif[3];
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/php_hash.h?r1=1.24&r2=1.25&diff_format=u
Index: php-src/ext/hash/php_hash.h
diff -u php-src/ext/hash/php_hash.h:1.24 php-src/ext/hash/php_hash.h:1.25
--- php-src/ext/hash/php_hash.h:1.24 Mon Dec 31 07:12:10 2007
+++ php-src/ext/hash/php_hash.h Wed Jan 30 09:56:21 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_hash.h,v 1.24 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: php_hash.h,v 1.25 2008/01/30 09:56:21 dmitry Exp $ */
#ifndef PHP_HASH_H
#define PHP_HASH_H
@@ -104,9 +104,11 @@
#define phpext_hash_ptr &hash_module_entry
#ifdef PHP_WIN32
-#define PHP_HASH_API __declspec(dllexport)
+# define PHP_HASH_API __declspec(dllexport)
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_HASH_API __attribute__ ((visibility("default")))
#else
-#define PHP_HASH_API
+# define PHP_HASH_API
#endif
#ifdef ZTS
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/php_iconv.h?r1=1.35&r2=1.36&diff_format=u
Index: php-src/ext/iconv/php_iconv.h
diff -u php-src/ext/iconv/php_iconv.h:1.35 php-src/ext/iconv/php_iconv.h:1.36
--- php-src/ext/iconv/php_iconv.h:1.35 Mon Dec 31 07:12:10 2007
+++ php-src/ext/iconv/php_iconv.h Wed Jan 30 09:56:21 2008
@@ -17,19 +17,21 @@
+----------------------------------------------------------------------+
*/
-/* $Revision: 1.35 $ */
+/* $Revision: 1.36 $ */
#ifndef PHP_ICONV_H
#define PHP_ICONV_H
#ifdef PHP_WIN32
-#ifdef PHP_ICONV_EXPORTS
-#define PHP_ICONV_API __declspec(dllexport)
+# ifdef PHP_ICONV_EXPORTS
+# define PHP_ICONV_API __declspec(dllexport)
+# else
+# define PHP_ICONV_API __declspec(dllimport)
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_ICONV_API __attribute__ ((visibility("default")))
#else
-#define PHP_ICONV_API __declspec(dllimport)
-#endif
-#else
-#define PHP_ICONV_API
+# define PHP_ICONV_API
#endif
#ifdef PHP_ATOM_INC
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/php_libxml.h?r1=1.28&r2=1.29&diff_format=u
Index: php-src/ext/libxml/php_libxml.h
diff -u php-src/ext/libxml/php_libxml.h:1.28
php-src/ext/libxml/php_libxml.h:1.29
--- php-src/ext/libxml/php_libxml.h:1.28 Mon Dec 31 07:12:11 2007
+++ php-src/ext/libxml/php_libxml.h Wed Jan 30 09:56:21 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_libxml.h,v 1.28 2007/12/31 07:12:11 sebastian Exp $ */
+/* $Id: php_libxml.h,v 1.29 2008/01/30 09:56:21 dmitry Exp $ */
#ifndef PHP_LIBXML_H
#define PHP_LIBXML_H
@@ -27,9 +27,11 @@
#define libxml_module_ptr &libxml_module_entry
#ifdef PHP_WIN32
-#define PHP_LIBXML_API __declspec(dllexport)
+# define PHP_LIBXML_API __declspec(dllexport)
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_LIBXML_API __attribute__ ((visibility("default")))
#else
-#define PHP_LIBXML_API
+# define PHP_LIBXML_API
#endif
#include "ext/standard/php_smart_str.h"
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.h?r1=1.78&r2=1.79&diff_format=u
Index: php-src/ext/mbstring/mbstring.h
diff -u php-src/ext/mbstring/mbstring.h:1.78
php-src/ext/mbstring/mbstring.h:1.79
--- php-src/ext/mbstring/mbstring.h:1.78 Mon Dec 31 07:12:11 2007
+++ php-src/ext/mbstring/mbstring.h Wed Jan 30 09:56:21 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.h,v 1.78 2007/12/31 07:12:11 sebastian Exp $ */
+/* $Id: mbstring.h,v 1.79 2008/01/30 09:56:21 dmitry Exp $ */
/*
* PHP 4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -52,17 +52,20 @@
#endif
#ifdef PHP_WIN32
-# undef MBSTRING_API
-# ifdef MBSTRING_EXPORTS
-# define MBSTRING_API __declspec(dllexport)
-# elif defined(COMPILE_DL_MBSTRING)
-# define MBSTRING_API __declspec(dllimport)
-# else
-# define MBSTRING_API /* nothing special */
-# endif
+# undef MBSTRING_API
+# ifdef MBSTRING_EXPORTS
+# define MBSTRING_API __declspec(dllexport)
+# elif defined(COMPILE_DL_MBSTRING)
+# define MBSTRING_API __declspec(dllimport)
+# else
+# define MBSTRING_API /* nothing special */
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# undef MBSTRING_API
+# define MBSTRING_API __attribute__ ((visibility("default")))
#else
-# undef MBSTRING_API
-# define MBSTRING_API /* nothing special */
+# undef MBSTRING_API
+# define MBSTRING_API /* nothing special */
#endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/php_mysqli_structs.h?r1=1.9&r2=1.10&diff_format=u
Index: php-src/ext/mysqli/php_mysqli_structs.h
diff -u php-src/ext/mysqli/php_mysqli_structs.h:1.9
php-src/ext/mysqli/php_mysqli_structs.h:1.10
--- php-src/ext/mysqli/php_mysqli_structs.h:1.9 Mon Jan 28 18:27:49 2008
+++ php-src/ext/mysqli/php_mysqli_structs.h Wed Jan 30 09:56:22 2008
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: php_mysqli_structs.h,v 1.9 2008/01/28 18:27:49 andrey Exp $
+ $Id: php_mysqli_structs.h,v 1.10 2008/01/30 09:56:22 dmitry Exp $
*/
#ifndef PHP_MYSQLI_STRUCTS_H
@@ -157,7 +157,11 @@
#define L64(x) x##i64
typedef __int64 my_longlong;
#else
-#define PHP_MYSQLI_API
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_MYSQLI_API __attribute__ ((visibility("default")))
+# else
+# define PHP_MYSQLI_API
+# endif
#define MYSQLI_LLU_SPEC "%llu"
#define MYSQLI_LL_SPEC "%lld"
#define L64(x) x##LL
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/php_pdo.h?r1=1.16&r2=1.17&diff_format=u
Index: php-src/ext/pdo/php_pdo.h
diff -u php-src/ext/pdo/php_pdo.h:1.16 php-src/ext/pdo/php_pdo.h:1.17
--- php-src/ext/pdo/php_pdo.h:1.16 Mon Dec 31 07:12:13 2007
+++ php-src/ext/pdo/php_pdo.h Wed Jan 30 09:56:22 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pdo.h,v 1.16 2007/12/31 07:12:13 sebastian Exp $ */
+/* $Id: php_pdo.h,v 1.17 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef PHP_PDO_H
#define PHP_PDO_H
@@ -31,15 +31,17 @@
#define phpext_pdo_ptr &pdo_module_entry
#ifdef PHP_WIN32
-# if defined(PDO_EXPORTS) || (!defined(COMPILE_DL_PDO))
-# define PDO_API __declspec(dllexport)
-# elif defined(COMPILE_DL_PDO)
-# define PDO_API __declspec(dllimport)
-# else
-# define PDO_API /* nothing special */
-# endif
+# if defined(PDO_EXPORTS) || (!defined(COMPILE_DL_PDO))
+# define PDO_API __declspec(dllexport)
+# elif defined(COMPILE_DL_PDO)
+# define PDO_API __declspec(dllimport)
+# else
+# define PDO_API /* nothing special */
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PDO_API __attribute__ ((visibility("default")))
#else
-# define PDO_API /* nothing special */
+# define PDO_API /* nothing special */
#endif
#ifdef ZTS
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/php_pgsql.h?r1=1.77&r2=1.78&diff_format=u
Index: php-src/ext/pgsql/php_pgsql.h
diff -u php-src/ext/pgsql/php_pgsql.h:1.77 php-src/ext/pgsql/php_pgsql.h:1.78
--- php-src/ext/pgsql/php_pgsql.h:1.77 Mon Dec 31 07:12:13 2007
+++ php-src/ext/pgsql/php_pgsql.h Wed Jan 30 09:56:22 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pgsql.h,v 1.77 2007/12/31 07:12:13 sebastian Exp $ */
+/* $Id: php_pgsql.h,v 1.78 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef PHP_PGSQL_H
#define PHP_PGSQL_H
@@ -42,7 +42,11 @@
#endif
#else
#include <libpq/libpq-fs.h>
-#define PHP_PGSQL_API /* nothing special */
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_PGSQL_API __attribute__ ((visibility("default")))
+# else
+# define PHP_PGSQL_API
+# endif
#endif
#ifdef HAVE_PG_CONFIG_H
http://cvs.php.net/viewvc.cgi/php-src/ext/skeleton/php_skeleton.h?r1=1.22&r2=1.23&diff_format=u
Index: php-src/ext/skeleton/php_skeleton.h
diff -u php-src/ext/skeleton/php_skeleton.h:1.22
php-src/ext/skeleton/php_skeleton.h:1.23
--- php-src/ext/skeleton/php_skeleton.h:1.22 Mon Feb 2 22:41:56 2004
+++ php-src/ext/skeleton/php_skeleton.h Wed Jan 30 09:56:22 2008
@@ -7,9 +7,11 @@
#define phpext_extname_ptr &extname_module_entry
#ifdef PHP_WIN32
-#define PHP_EXTNAME_API __declspec(dllexport)
+# define PHP_EXTNAME_API __declspec(dllexport)
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_EXTNAME_API __attribute__ ((visibility("default")))
#else
-#define PHP_EXTNAME_API
+# define PHP_EXTNAME_API
#endif
#ifdef ZTS
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.26&r2=1.27&diff_format=u
Index: php-src/ext/spl/php_spl.h
diff -u php-src/ext/spl/php_spl.h:1.26 php-src/ext/spl/php_spl.h:1.27
--- php-src/ext/spl/php_spl.h:1.26 Sun Jan 27 15:03:55 2008
+++ php-src/ext/spl/php_spl.h Wed Jan 30 09:56:22 2008
@@ -32,15 +32,17 @@
#define phpext_spl_ptr &spl_module_entry
#ifdef PHP_WIN32
-# ifdef SPL_EXPORTS
-# define SPL_API __declspec(dllexport)
-# elif defined(COMPILE_DL_SPL)
-# define SPL_API __declspec(dllimport)
-# else
-# define SPL_API /* nothing */
-# endif
+# ifdef SPL_EXPORTS
+# define SPL_API __declspec(dllexport)
+# elif defined(COMPILE_DL_SPL)
+# define SPL_API __declspec(dllimport)
+# else
+# define SPL_API /* nothing */
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define SPL_API __attribute__ ((visibility("default")))
#else
-# define SPL_API
+# define SPL_API
#endif
#if defined(PHP_WIN32) && !defined(COMPILE_DL_SPL)
http://cvs.php.net/viewvc.cgi/php-src/ext/unicode/php_unicode.h?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/unicode/php_unicode.h
diff -u php-src/ext/unicode/php_unicode.h:1.15
php-src/ext/unicode/php_unicode.h:1.16
--- php-src/ext/unicode/php_unicode.h:1.15 Mon Jan 1 09:29:33 2007
+++ php-src/ext/unicode/php_unicode.h Wed Jan 30 09:56:22 2008
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_unicode.h,v 1.15 2007/01/01 09:29:33 sebastian Exp $ */
+/* $Id: php_unicode.h,v 1.16 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef PHP_UNICODE_H
#define PHP_UNICODE_H
@@ -37,9 +37,11 @@
#define phpext_unicode_ptr &unicode_module_entry
#ifdef PHP_WIN32
-#define PHP_UNICODE_API __declspec(dllexport)
+# define PHP_UNICODE_API __declspec(dllexport)
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_UNICODE_API __attribute__ ((visibility("default")))
#else
-#define PHP_UNICODE_API
+# define PHP_UNICODE_API
#endif
PHP_MINIT_FUNCTION(unicode);
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip.h?r1=1.9&r2=1.10&diff_format=u
Index: php-src/ext/zip/lib/zip.h
diff -u php-src/ext/zip/lib/zip.h:1.9 php-src/ext/zip/lib/zip.h:1.10
--- php-src/ext/zip/lib/zip.h:1.9 Mon Jan 14 03:15:50 2008
+++ php-src/ext/zip/lib/zip.h Wed Jan 30 09:56:22 2008
@@ -41,14 +41,16 @@
/* #defines that rename all zip_ functions and structs */
#include "zip_alias.h"
#ifdef PHP_WIN32
-#include "zip_win32.h"
-# ifdef PHP_ZIP_EXPORTS
-# define PHPZIPAPI __declspec(dllexport)
-# else
-# define PHPZIPAPI
-# endif
+# include "zip_win32.h"
+# ifdef PHP_ZIP_EXPORTS
+# define PHPZIPAPI __declspec(dllexport)
+# else
+# define PHPZIPAPI
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHPZIPAPI __attribute__ ((visibility("default")))
#else
-#define PHPZIPAPI
+# define PHPZIPAPI
#endif
BEGIN_EXTERN_C()
#include <sys/types.h>
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.122&r2=1.123&diff_format=u
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.122 php-src/main/SAPI.h:1.123
--- php-src/main/SAPI.h:1.122 Mon Dec 31 07:12:18 2007
+++ php-src/main/SAPI.h Wed Jan 30 09:56:22 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.h,v 1.122 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: SAPI.h,v 1.123 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef SAPI_H
#define SAPI_H
@@ -35,12 +35,14 @@
#ifdef PHP_WIN32
# ifdef SAPI_EXPORTS
-# define SAPI_API __declspec(dllexport)
+# define SAPI_API __declspec(dllexport)
# else
-# define SAPI_API __declspec(dllimport)
+# define SAPI_API __declspec(dllimport)
# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define SAPI_API __attribute__ ((visibility("default")))
#else
-#define SAPI_API
+# define SAPI_API
#endif
#undef shutdown
http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.241&r2=1.242&diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.241 php-src/main/php.h:1.242
--- php-src/main/php.h:1.241 Mon Dec 31 07:12:18 2007
+++ php-src/main/php.h Wed Jan 30 09:56:22 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.241 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php.h,v 1.242 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef PHP_H
#define PHP_H
@@ -45,17 +45,22 @@
#define PHP_DEBUG ZEND_DEBUG
#ifdef PHP_WIN32
-#include "tsrm_win32.h"
-#include "win95nt.h"
+# include "tsrm_win32.h"
+# include "win95nt.h"
# ifdef PHP_EXPORTS
-# define PHPAPI __declspec(dllexport)
+# define PHPAPI __declspec(dllexport)
# else
-# define PHPAPI __declspec(dllimport)
+# define PHPAPI __declspec(dllimport)
# endif
-#define PHP_DIR_SEPARATOR '\\'
-#define PHP_EOL "\r\n"
+# define PHP_DIR_SEPARATOR '\\'
+# define PHP_EOL "\r\n"
#else
-#define PHPAPI
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define PHPAPI __attribute__ ((visibility("default")))
+# else
+# define PHPAPI
+# endif
+
#define THREAD_LS
#define PHP_DIR_SEPARATOR '/'
#if defined(__MacOSX__)
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/php_apache.h?r1=1.29&r2=1.30&diff_format=u
Index: php-src/sapi/apache2filter/php_apache.h
diff -u php-src/sapi/apache2filter/php_apache.h:1.29
php-src/sapi/apache2filter/php_apache.h:1.30
--- php-src/sapi/apache2filter/php_apache.h:1.29 Mon Dec 31 07:12:19 2007
+++ php-src/sapi/apache2filter/php_apache.h Wed Jan 30 09:56:22 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.h,v 1.29 2007/12/31 07:12:19 sebastian Exp $ */
+/* $Id: php_apache.h,v 1.30 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef PHP_APACHE_H
#define PHP_APACHE_H
@@ -65,4 +65,10 @@
#define APR_ARRAY_FOREACH_CLOSE() }}
+/* fix for gcc4 visibility patch */
+#ifndef PHP_WIN32
+# undef AP_MODULE_DECLARE_DATA
+# define AP_MODULE_DECLARE_DATA PHPAPI
+#endif
+
#endif /* PHP_APACHE_H */
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/php_apache.h?r1=1.13&r2=1.14&diff_format=u
Index: php-src/sapi/apache2handler/php_apache.h
diff -u php-src/sapi/apache2handler/php_apache.h:1.13
php-src/sapi/apache2handler/php_apache.h:1.14
--- php-src/sapi/apache2handler/php_apache.h:1.13 Mon Dec 31 07:12:19 2007
+++ php-src/sapi/apache2handler/php_apache.h Wed Jan 30 09:56:22 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.h,v 1.13 2007/12/31 07:12:19 sebastian Exp $ */
+/* $Id: php_apache.h,v 1.14 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef PHP_APACHE_H
#define PHP_APACHE_H
@@ -82,5 +82,10 @@
#define AP2(v) (php_apache2_info.v)
#endif
+/* fix for gcc4 visibility patch */
+#ifndef PHP_WIN32
+# undef AP_MODULE_DECLARE_DATA
+# define AP_MODULE_DECLARE_DATA PHPAPI
+#endif
#endif /* PHP_APACHE_H */
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache_hooks/mod_php5.h?r1=1.5&r2=1.6&diff_format=u
Index: php-src/sapi/apache_hooks/mod_php5.h
diff -u php-src/sapi/apache_hooks/mod_php5.h:1.5
php-src/sapi/apache_hooks/mod_php5.h:1.6
--- php-src/sapi/apache_hooks/mod_php5.h:1.5 Mon Dec 31 07:12:19 2007
+++ php-src/sapi/apache_hooks/mod_php5.h Wed Jan 30 09:56:22 2008
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.h,v 1.5 2007/12/31 07:12:19 sebastian Exp $ */
+/* $Id: mod_php5.h,v 1.6 2008/01/30 09:56:22 dmitry Exp $ */
#ifndef MOD_PHP5_H
#define MOD_PHP5_H
@@ -71,6 +71,13 @@
#define AP_LOGGING 10
#define AP_CLEANUP 11
+
+/* fix for gcc4 visibility patch */
+#ifndef PHP_WIN32
+# undef MODULE_VAR_EXPORT
+# define MODULE_VAR_EXPORT PHPAPI
+#endif
+
#endif /* MOD_PHP5_H */
/*
http://cvs.php.net/viewvc.cgi/php-src/sapi/pi3web/pi3web_sapi.h?r1=1.7&r2=1.8&diff_format=u
Index: php-src/sapi/pi3web/pi3web_sapi.h
diff -u php-src/sapi/pi3web/pi3web_sapi.h:1.7
php-src/sapi/pi3web/pi3web_sapi.h:1.8
--- php-src/sapi/pi3web/pi3web_sapi.h:1.7 Sun Dec 5 09:52:25 2004
+++ php-src/sapi/pi3web/pi3web_sapi.h Wed Jan 30 09:56:22 2008
@@ -9,8 +9,12 @@
# define MODULE_API __declspec(dllimport)
# endif
#else
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define MODULE_API __attribute__ ((visibility("default")))
+# else
+# define MODULE_API
+# endif
# define far
-# define MODULE_API
typedef int BOOL;
typedef void far *LPVOID;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php