nlopess         Thu Jan 31 18:48:01 2008 UTC

  Modified files:              
    /php-src/ext/imap   config.m4 php_imap.c 
  Log:
  fix gcc 4 build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/config.m4?r1=1.76&r2=1.77&diff_format=u
Index: php-src/ext/imap/config.m4
diff -u php-src/ext/imap/config.m4:1.76 php-src/ext/imap/config.m4:1.77
--- php-src/ext/imap/config.m4:1.76     Sun Feb 11 09:25:25 2007
+++ php-src/ext/imap/config.m4  Thu Jan 31 18:48:00 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.76 2007/02/11 09:25:25 tony2001 Exp $
+dnl $Id: config.m4,v 1.77 2008/01/31 18:48:00 nlopess Exp $
 dnl
 
 AC_DEFUN([IMAP_INC_CHK],[if test -r "$i$1/c-client.h"; then
@@ -24,21 +24,27 @@
 AC_DEFUN([PHP_IMAP_TEST_BUILD], [
   PHP_TEST_BUILD([$1], [$2], [$3], [$4],
   [
-    void mm_log(void){}
-    void mm_dlog(void){}
-    void mm_flags(void){}
-    void mm_fatal(void){}
-    void mm_critical(void){}
-    void mm_nocritical(void){}
-    void mm_notify(void){}
-    void mm_login(void){}
-    void mm_diskerror(void){}
-    void mm_status(void){}
-    void mm_lsub(void){}
-    void mm_list(void){}
-    void mm_exists(void){}
-    void mm_searched(void){}
-    void mm_expunged(void){}
+#if defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_IMAP_EXPORT __attribute__ ((visibility("default")))
+#else
+# define PHP_IMAP_EXPORT
+#endif
+
+    PHP_IMAP_EXPORT void mm_log(void){}
+    PHP_IMAP_EXPORT void mm_dlog(void){}
+    PHP_IMAP_EXPORT void mm_flags(void){}
+    PHP_IMAP_EXPORT void mm_fatal(void){}
+    PHP_IMAP_EXPORT void mm_critical(void){}
+    PHP_IMAP_EXPORT void mm_nocritical(void){}
+    PHP_IMAP_EXPORT void mm_notify(void){}
+    PHP_IMAP_EXPORT void mm_login(void){}
+    PHP_IMAP_EXPORT void mm_diskerror(void){}
+    PHP_IMAP_EXPORT void mm_status(void){}
+    PHP_IMAP_EXPORT void mm_lsub(void){}
+    PHP_IMAP_EXPORT void mm_list(void){}
+    PHP_IMAP_EXPORT void mm_exists(void){}
+    PHP_IMAP_EXPORT void mm_searched(void){}
+    PHP_IMAP_EXPORT void mm_expunged(void){}
   ])
 ])
 
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.242&r2=1.243&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.242 php-src/ext/imap/php_imap.c:1.243
--- php-src/ext/imap/php_imap.c:1.242   Mon Dec 31 07:12:10 2007
+++ php-src/ext/imap/php_imap.c Thu Jan 31 18:48:00 2008
@@ -26,7 +26,7 @@
    | PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>                       |
    +----------------------------------------------------------------------+
  */
-/* $Id: php_imap.c,v 1.242 2007/12/31 07:12:10 sebastian Exp $ */
+/* $Id: php_imap.c,v 1.243 2008/01/31 18:48:00 nlopess Exp $ */
 
 #define IMAP41
 
@@ -66,6 +66,12 @@
 #define SENDBUFLEN 16385
 #endif
 
+#if defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_IMAP_EXPORT __attribute__ ((visibility("default")))
+#else
+# define PHP_IMAP_EXPORT
+#endif
+
 static void _php_make_header_object(zval *myzvalue, ENVELOPE *en TSRMLS_DC);
 static void _php_imap_add_body(zval *arg, BODY *body TSRMLS_DC);
 static void _php_imap_parse_address(ADDRESS *addresslist, char **fulladdress, 
zval *paddress TSRMLS_DC);
@@ -4331,7 +4337,7 @@
 
 /* {{{ Interfaces to C-client 
  */
-void mm_searched(MAILSTREAM *stream, unsigned long number)
+PHP_IMAP_EXPORT void mm_searched(MAILSTREAM *stream, unsigned long number)
 {
        MESSAGELIST *cur = NIL;
        TSRMLS_FETCH();
@@ -4351,20 +4357,20 @@
        }
 }
 
-void mm_exists(MAILSTREAM *stream, unsigned long number)
+PHP_IMAP_EXPORT void mm_exists(MAILSTREAM *stream, unsigned long number)
 {
 }
 
-void mm_expunged(MAILSTREAM *stream, unsigned long number)
+PHP_IMAP_EXPORT void mm_expunged(MAILSTREAM *stream, unsigned long number)
 {
 }
 
-void mm_flags(MAILSTREAM *stream, unsigned long number)
+PHP_IMAP_EXPORT void mm_flags(MAILSTREAM *stream, unsigned long number)
 {
 }
 
 /* Author: CJH */
-void mm_notify(MAILSTREAM *stream, char *str, long errflg)
+PHP_IMAP_EXPORT void mm_notify(MAILSTREAM *stream, char *str, long errflg)
 {
        STRINGLIST *cur = NIL;
        TSRMLS_FETCH();
@@ -4387,7 +4393,7 @@
        }
 }
 
-void mm_list(MAILSTREAM *stream, DTYPE delimiter, char *mailbox, long 
attributes)
+PHP_IMAP_EXPORT void mm_list(MAILSTREAM *stream, DTYPE delimiter, char 
*mailbox, long attributes)
 {
        STRINGLIST *cur=NIL;
        FOBJECTLIST *ocur=NIL;
@@ -4434,7 +4440,7 @@
        }
 }
 
-void mm_lsub(MAILSTREAM *stream, DTYPE delimiter, char *mailbox, long 
attributes)
+PHP_IMAP_EXPORT void mm_lsub(MAILSTREAM *stream, DTYPE delimiter, char 
*mailbox, long attributes)
 {
        STRINGLIST *cur=NIL;
        FOBJECTLIST *ocur=NIL;
@@ -4478,7 +4484,7 @@
        }
 }
 
-void mm_status(MAILSTREAM *stream, char *mailbox, MAILSTATUS *status)
+PHP_IMAP_EXPORT void mm_status(MAILSTREAM *stream, char *mailbox, MAILSTATUS 
*status)
 {
        TSRMLS_FETCH();
 
@@ -4500,7 +4506,7 @@
        }
 }
 
-void mm_log(char *str, long errflg)
+PHP_IMAP_EXPORT void mm_log(char *str, long errflg)
 {
        ERRORLIST *cur = NIL;
        TSRMLS_FETCH();
@@ -4526,14 +4532,14 @@
        }
 }
 
-void mm_dlog(char *str)
+PHP_IMAP_EXPORT void mm_dlog(char *str)
 {
        /* CJH: this is for debugging; it might be useful to allow setting
           the stream to debug mode and capturing this somewhere - syslog?
           php debugger? */
 }
 
-void mm_login(NETMBX *mb, char *user, char *pwd, long trial)
+PHP_IMAP_EXPORT void mm_login(NETMBX *mb, char *user, char *pwd, long trial)
 {
        TSRMLS_FETCH();
 
@@ -4545,20 +4551,20 @@
        strlcpy (pwd, IMAPG(imap_password), MAILTMPLEN);
 }
 
-void mm_critical(MAILSTREAM *stream)
+PHP_IMAP_EXPORT void mm_critical(MAILSTREAM *stream)
 {
 }
 
-void mm_nocritical(MAILSTREAM *stream)
+PHP_IMAP_EXPORT void mm_nocritical(MAILSTREAM *stream)
 {
 }
 
-long mm_diskerror(MAILSTREAM *stream, long errcode, long serious)
+PHP_IMAP_EXPORT long mm_diskerror(MAILSTREAM *stream, long errcode, long 
serious)
 {
        return 1;
 }
 
-void mm_fatal(char *str)
+PHP_IMAP_EXPORT void mm_fatal(char *str)
 {
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to