dmitry          Wed Jan 30 09:41:13 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src    NEWS 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/zip/lib        zip.h 
    /php-src/main       SAPI.h php.h 
    /php-src/sapi/apache        mod_php5.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:
  Improved PHP binary size and startup speed with GCC4 visibility control (Nuno)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.99&r2=1.2027.2.547.2.965.2.100&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.99 
php-src/NEWS:1.2027.2.547.2.965.2.100
--- php-src/NEWS:1.2027.2.547.2.965.2.99        Tue Jan 29 20:10:24 2008
+++ php-src/NEWS        Wed Jan 30 09:41:11 2008
@@ -57,6 +57,8 @@
 
 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)
 
+- Improved PHP binary size and startup speed with GCC4 visibility control.
+  (Nuno)
 - Improved engine stack implementation for better performance and stability.
   (Dmitry)
 - Improved php.ini handling: (Jani)
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.7&r2=1.579.2.52.2.77.2.8&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.77.2.7 
php-src/configure.in:1.579.2.52.2.77.2.8
--- php-src/configure.in:1.579.2.52.2.77.2.7    Tue Jan 22 09:27:46 2008
+++ php-src/configure.in        Wed Jan 30 09:41:11 2008
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.579.2.52.2.77.2.7 2008/01/22 09:27:46 dmitry Exp $ 
-*- autoconf -*-
+## $Id: configure.in,v 1.579.2.52.2.77.2.8 2008/01/30 09:41:11 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.50.2.2.2.4.2.1&r2=1.50.2.2.2.4.2.2&diff_format=u
Index: TSRM/TSRM.h
diff -u TSRM/TSRM.h:1.50.2.2.2.4.2.1 TSRM/TSRM.h:1.50.2.2.2.4.2.2
--- TSRM/TSRM.h:1.50.2.2.2.4.2.1        Mon Dec 31 07:17:03 2007
+++ TSRM/TSRM.h Wed Jan 30 09:41:11 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.48.2.5.2.8.2.1&r2=1.48.2.5.2.8.2.2&diff_format=u
Index: TSRM/tsrm_virtual_cwd.h
diff -u TSRM/tsrm_virtual_cwd.h:1.48.2.5.2.8.2.1 
TSRM/tsrm_virtual_cwd.h:1.48.2.5.2.8.2.2
--- TSRM/tsrm_virtual_cwd.h:1.48.2.5.2.8.2.1    Mon Dec 31 07:17:03 2007
+++ TSRM/tsrm_virtual_cwd.h     Wed Jan 30 09:41:11 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8.2.1 2007/12/31 07:17:03 sebastian 
Exp $ */
+/* $Id: tsrm_virtual_cwd.h,v 1.48.2.5.2.8.2.2 2008/01/30 09:41:11 dmitry Exp $ 
*/
 
 #ifndef VIRTUAL_CWD_H
 #define VIRTUAL_CWD_H
@@ -117,13 +117,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.40.2.1.2.1.2.1&r2=1.40.2.1.2.1.2.2&diff_format=u
Index: ZendEngine2/acconfig.h
diff -u ZendEngine2/acconfig.h:1.40.2.1.2.1.2.1 
ZendEngine2/acconfig.h:1.40.2.1.2.1.2.2
--- ZendEngine2/acconfig.h:1.40.2.1.2.1.2.1     Mon Dec 31 07:17:03 2007
+++ ZendEngine2/acconfig.h      Wed Jan 30 09:41:11 2008
@@ -17,10 +17,16 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: acconfig.h,v 1.40.2.1.2.1.2.1 2007/12/31 07:17:03 sebastian Exp $ */
+/* $Id: acconfig.h,v 1.40.2.1.2.1.2.2 2008/01/30 09:41:11 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.7.2.1.2.4.2.1&r2=1.7.2.1.2.4.2.2&diff_format=u
Index: php-src/ext/bz2/php_bz2.h
diff -u php-src/ext/bz2/php_bz2.h:1.7.2.1.2.4.2.1 
php-src/ext/bz2/php_bz2.h:1.7.2.1.2.4.2.2
--- php-src/ext/bz2/php_bz2.h:1.7.2.1.2.4.2.1   Mon Dec 31 07:17:06 2007
+++ php-src/ext/bz2/php_bz2.h   Wed Jan 30 09:41:11 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_bz2.h,v 1.7.2.1.2.4.2.1 2007/12/31 07:17:06 sebastian Exp $ */
+/* $Id: php_bz2.h,v 1.7.2.1.2.4.2.2 2008/01/30 09:41:11 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.23.2.1.2.2.2.1&r2=1.23.2.1.2.2.2.2&diff_format=u
Index: php-src/ext/dom/xml_common.h
diff -u php-src/ext/dom/xml_common.h:1.23.2.1.2.2.2.1 
php-src/ext/dom/xml_common.h:1.23.2.1.2.2.2.2
--- php-src/ext/dom/xml_common.h:1.23.2.1.2.2.2.1       Mon Dec 31 07:17:07 2007
+++ php-src/ext/dom/xml_common.h        Wed Jan 30 09:41:12 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: xml_common.h,v 1.23.2.1.2.2.2.1 2007/12/31 07:17:07 sebastian Exp $ */
+/* $Id: xml_common.h,v 1.23.2.1.2.2.2.2 2008/01/30 09:41:12 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.59.2.3.2.5.2.1&r2=1.59.2.3.2.5.2.2&diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.1 
php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.2
--- php-src/ext/gd/php_gd.h:1.59.2.3.2.5.2.1    Mon Dec 31 07:17:08 2007
+++ php-src/ext/gd/php_gd.h     Wed Jan 30 09:41:12 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_gd.h,v 1.59.2.3.2.5.2.1 2007/12/31 07:17:08 sebastian Exp $ */
+/* $Id: php_gd.h,v 1.59.2.3.2.5.2.2 2008/01/30 09:41:12 dmitry Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -51,9 +51,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.13.2.7.2.3.2.1&r2=1.13.2.7.2.3.2.2&diff_format=u
Index: php-src/ext/hash/php_hash.h
diff -u php-src/ext/hash/php_hash.h:1.13.2.7.2.3.2.1 
php-src/ext/hash/php_hash.h:1.13.2.7.2.3.2.2
--- php-src/ext/hash/php_hash.h:1.13.2.7.2.3.2.1        Mon Dec 31 07:17:08 2007
+++ php-src/ext/hash/php_hash.h Wed Jan 30 09:41:12 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_hash.h,v 1.13.2.7.2.3.2.1 2007/12/31 07:17:08 sebastian Exp $ */
+/* $Id: php_hash.h,v 1.13.2.7.2.3.2.2 2008/01/30 09:41:12 dmitry Exp $ */
 
 #ifndef PHP_HASH_H
 #define PHP_HASH_H
@@ -100,9 +100,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.28.2.2.2.2.2.2&r2=1.28.2.2.2.2.2.3&diff_format=u
Index: php-src/ext/iconv/php_iconv.h
diff -u php-src/ext/iconv/php_iconv.h:1.28.2.2.2.2.2.2 
php-src/ext/iconv/php_iconv.h:1.28.2.2.2.2.2.3
--- php-src/ext/iconv/php_iconv.h:1.28.2.2.2.2.2.2      Mon Dec 31 07:17:09 2007
+++ php-src/ext/iconv/php_iconv.h       Wed Jan 30 09:41:12 2008
@@ -17,19 +17,21 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Revision: 1.28.2.2.2.2.2.2 $ */
+/* $Revision: 1.28.2.2.2.2.2.3 $ */
 
 #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.15.2.2.2.6.2.1&r2=1.15.2.2.2.6.2.2&diff_format=u
Index: php-src/ext/libxml/php_libxml.h
diff -u php-src/ext/libxml/php_libxml.h:1.15.2.2.2.6.2.1 
php-src/ext/libxml/php_libxml.h:1.15.2.2.2.6.2.2
--- php-src/ext/libxml/php_libxml.h:1.15.2.2.2.6.2.1    Mon Dec 31 07:17:09 2007
+++ php-src/ext/libxml/php_libxml.h     Wed Jan 30 09:41:12 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_libxml.h,v 1.15.2.2.2.6.2.1 2007/12/31 07:17:09 sebastian Exp $ */
+/* $Id: php_libxml.h,v 1.15.2.2.2.6.2.2 2008/01/30 09:41:12 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.66.2.4.2.5.2.1&r2=1.66.2.4.2.5.2.2&diff_format=u
Index: php-src/ext/mbstring/mbstring.h
diff -u php-src/ext/mbstring/mbstring.h:1.66.2.4.2.5.2.1 
php-src/ext/mbstring/mbstring.h:1.66.2.4.2.5.2.2
--- php-src/ext/mbstring/mbstring.h:1.66.2.4.2.5.2.1    Mon Dec 31 07:17:09 2007
+++ php-src/ext/mbstring/mbstring.h     Wed Jan 30 09:41:12 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mbstring.h,v 1.66.2.4.2.5.2.1 2007/12/31 07:17:09 sebastian Exp $ */
+/* $Id: mbstring.h,v 1.66.2.4.2.5.2.2 2008/01/30 09:41:12 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.4.2.7&r2=1.4.2.8&diff_format=u
Index: php-src/ext/mysqli/php_mysqli_structs.h
diff -u php-src/ext/mysqli/php_mysqli_structs.h:1.4.2.7 
php-src/ext/mysqli/php_mysqli_structs.h:1.4.2.8
--- php-src/ext/mysqli/php_mysqli_structs.h:1.4.2.7     Mon Jan 28 18:25:50 2008
+++ php-src/ext/mysqli/php_mysqli_structs.h     Wed Jan 30 09:41:12 2008
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: php_mysqli_structs.h,v 1.4.2.7 2008/01/28 18:25:50 andrey Exp $ 
+  $Id: php_mysqli_structs.h,v 1.4.2.8 2008/01/30 09:41:12 dmitry Exp $ 
 */
 
 #ifndef PHP_MYSQLI_STRUCTS_H
@@ -145,7 +145,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.7.2.5.2.3.2.1&r2=1.7.2.5.2.3.2.2&diff_format=u
Index: php-src/ext/pdo/php_pdo.h
diff -u php-src/ext/pdo/php_pdo.h:1.7.2.5.2.3.2.1 
php-src/ext/pdo/php_pdo.h:1.7.2.5.2.3.2.2
--- php-src/ext/pdo/php_pdo.h:1.7.2.5.2.3.2.1   Mon Dec 31 07:17:12 2007
+++ php-src/ext/pdo/php_pdo.h   Wed Jan 30 09:41:12 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_pdo.h,v 1.7.2.5.2.3.2.1 2007/12/31 07:17:12 sebastian Exp $ */
+/* $Id: php_pdo.h,v 1.7.2.5.2.3.2.2 2008/01/30 09:41:12 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.73.2.1.2.2.2.1&r2=1.73.2.1.2.2.2.2&diff_format=u
Index: php-src/ext/pgsql/php_pgsql.h
diff -u php-src/ext/pgsql/php_pgsql.h:1.73.2.1.2.2.2.1 
php-src/ext/pgsql/php_pgsql.h:1.73.2.1.2.2.2.2
--- php-src/ext/pgsql/php_pgsql.h:1.73.2.1.2.2.2.1      Mon Dec 31 07:17:12 2007
+++ php-src/ext/pgsql/php_pgsql.h       Wed Jan 30 09:41:12 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: php_pgsql.h,v 1.73.2.1.2.2.2.1 2007/12/31 07:17:12 sebastian Exp $ */
+/* $Id: php_pgsql.h,v 1.73.2.1.2.2.2.2 2008/01/30 09:41:12 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.22.8.1&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.22.8.1
--- 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:41:12 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.17.2.1.2.3.2.4&r2=1.17.2.1.2.3.2.5&diff_format=u
Index: php-src/ext/spl/php_spl.h
diff -u php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.4 
php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.5
--- php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.4  Sun Jan 27 15:04:41 2008
+++ php-src/ext/spl/php_spl.h   Wed Jan 30 09:41:12 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/zip/lib/zip.h?r1=1.1.2.3.2.5&r2=1.1.2.3.2.6&diff_format=u
Index: php-src/ext/zip/lib/zip.h
diff -u php-src/ext/zip/lib/zip.h:1.1.2.3.2.5 
php-src/ext/zip/lib/zip.h:1.1.2.3.2.6
--- php-src/ext/zip/lib/zip.h:1.1.2.3.2.5       Mon Jan 14 03:16:08 2008
+++ php-src/ext/zip/lib/zip.h   Wed Jan 30 09:41:12 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.114.2.1.2.3.2.1&r2=1.114.2.1.2.3.2.2&diff_format=u
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.1 
php-src/main/SAPI.h:1.114.2.1.2.3.2.2
--- php-src/main/SAPI.h:1.114.2.1.2.3.2.1       Mon Dec 31 07:17:17 2007
+++ php-src/main/SAPI.h Wed Jan 30 09:41:12 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: SAPI.h,v 1.114.2.1.2.3.2.1 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: SAPI.h,v 1.114.2.1.2.3.2.2 2008/01/30 09:41:12 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.221.2.4.2.8.2.2&r2=1.221.2.4.2.8.2.3&diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.221.2.4.2.8.2.2 
php-src/main/php.h:1.221.2.4.2.8.2.3
--- php-src/main/php.h:1.221.2.4.2.8.2.2        Mon Dec 31 07:17:17 2007
+++ php-src/main/php.h  Wed Jan 30 09:41:12 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php.h,v 1.221.2.4.2.8.2.2 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: php.h,v 1.221.2.4.2.8.2.3 2008/01/30 09:41:12 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/apache/mod_php5.h?r1=1.4.2.1.2.1.2.1&r2=1.4.2.1.2.1.2.2&diff_format=u
Index: php-src/sapi/apache/mod_php5.h
diff -u php-src/sapi/apache/mod_php5.h:1.4.2.1.2.1.2.1 
php-src/sapi/apache/mod_php5.h:1.4.2.1.2.1.2.2
--- php-src/sapi/apache/mod_php5.h:1.4.2.1.2.1.2.1      Mon Dec 31 07:17:18 2007
+++ php-src/sapi/apache/mod_php5.h      Wed Jan 30 09:41:12 2008
@@ -15,7 +15,7 @@
    | Author: Rasmus Lerdorf <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
  */
-/* $Id: mod_php5.h,v 1.4.2.1.2.1.2.1 2007/12/31 07:17:18 sebastian Exp $ */
+/* $Id: mod_php5.h,v 1.4.2.1.2.1.2.2 2008/01/30 09:41:12 dmitry Exp $ */
 
 #ifndef MOD_PHP5_H
 #define MOD_PHP5_H
@@ -44,6 +44,12 @@
 #define AP(v) (php_apache_info.v)
 #endif
 
+/* 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/apache2filter/php_apache.h?r1=1.25.2.1.2.2.2.1&r2=1.25.2.1.2.2.2.2&diff_format=u
Index: php-src/sapi/apache2filter/php_apache.h
diff -u php-src/sapi/apache2filter/php_apache.h:1.25.2.1.2.2.2.1 
php-src/sapi/apache2filter/php_apache.h:1.25.2.1.2.2.2.2
--- php-src/sapi/apache2filter/php_apache.h:1.25.2.1.2.2.2.1    Mon Dec 31 
07:17:18 2007
+++ php-src/sapi/apache2filter/php_apache.h     Wed Jan 30 09:41:12 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_apache.h,v 1.25.2.1.2.2.2.1 2007/12/31 07:17:18 sebastian Exp $ */
+/* $Id: php_apache.h,v 1.25.2.1.2.2.2.2 2008/01/30 09:41:12 dmitry Exp $ */
 
 #ifndef PHP_APACHE_H
 #define PHP_APACHE_H
@@ -74,4 +74,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.8.2.1.2.2.2.1&r2=1.8.2.1.2.2.2.2&diff_format=u
Index: php-src/sapi/apache2handler/php_apache.h
diff -u php-src/sapi/apache2handler/php_apache.h:1.8.2.1.2.2.2.1 
php-src/sapi/apache2handler/php_apache.h:1.8.2.1.2.2.2.2
--- php-src/sapi/apache2handler/php_apache.h:1.8.2.1.2.2.2.1    Mon Dec 31 
07:17:18 2007
+++ php-src/sapi/apache2handler/php_apache.h    Wed Jan 30 09:41:12 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_apache.h,v 1.8.2.1.2.2.2.1 2007/12/31 07:17:18 sebastian Exp $ */
+/* $Id: php_apache.h,v 1.8.2.1.2.2.2.2 2008/01/30 09:41:12 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.2.2.1.2.1.2.1&r2=1.2.2.1.2.1.2.2&diff_format=u
Index: php-src/sapi/apache_hooks/mod_php5.h
diff -u php-src/sapi/apache_hooks/mod_php5.h:1.2.2.1.2.1.2.1 
php-src/sapi/apache_hooks/mod_php5.h:1.2.2.1.2.1.2.2
--- php-src/sapi/apache_hooks/mod_php5.h:1.2.2.1.2.1.2.1        Mon Dec 31 
07:17:18 2007
+++ php-src/sapi/apache_hooks/mod_php5.h        Wed Jan 30 09:41:12 2008
@@ -15,7 +15,7 @@
    | Author: Rasmus Lerdorf <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
  */
-/* $Id: mod_php5.h,v 1.2.2.1.2.1.2.1 2007/12/31 07:17:18 sebastian Exp $ */
+/* $Id: mod_php5.h,v 1.2.2.1.2.1.2.2 2008/01/30 09:41:12 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.7.6.1&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.7.6.1
--- 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:41:12 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

Reply via email to