sniper          Fri Jun 27 12:41:41 2003 EDT

  Modified files:              
    /php-src/ext/ftp    ftp.c ftp.h php_ftp.c php_ftp.h 
    /php-src/ext/openssl        php_openssl.h 
    /php-src/main       internal_functions.c.in 
    /php-src/sapi/apache        php_apache_http.h 
  Log:
  - HAVE_OPENSSL_EXT is not defined always.
  
  
Index: php-src/ext/ftp/ftp.c
diff -u php-src/ext/ftp/ftp.c:1.87 php-src/ext/ftp/ftp.c:1.88
--- php-src/ext/ftp/ftp.c:1.87  Tue Jun 10 16:03:28 2003
+++ php-src/ext/ftp/ftp.c       Fri Jun 27 12:41:40 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: ftp.c,v 1.87 2003/06/10 20:03:28 imajes Exp $ */
+/* $Id: ftp.c,v 1.88 2003/06/27 16:41:40 sniper Exp $ */
 
 #include "php.h"
 
@@ -65,7 +65,7 @@
 #include <sys/select.h>
 #endif
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
 #include <openssl/ssl.h>
 #endif
 
@@ -179,7 +179,7 @@
                data_close(ftp, ftp->data);
        }
        if (ftp->fd != -1) {
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
                if (ftp->ssl_active) {
                        SSL_shutdown(ftp->ssl_handle);
                }
@@ -241,14 +241,14 @@
 int
 ftp_login(ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC)
 {
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        SSL_CTX *ctx = NULL;
 #endif
        if (ftp == NULL) {
                return 0;
        }
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        if (ftp->use_ssl && !ftp->ssl_active) {
                if (!ftp_putcmd(ftp, "AUTH", "TLS")) {
                        return 0;
@@ -1199,7 +1199,7 @@
                        return -1;
                }
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
                if (ftp->use_ssl && ftp->fd == s && ftp->ssl_active) {
                        sent = SSL_write(ftp->ssl_handle, buf, size);
                } else if (ftp->use_ssl && ftp->fd != s && ftp->use_ssl_for_data && 
ftp->data->ssl_active) {    
@@ -1207,7 +1207,7 @@
                } else {
 #endif
                        sent = send(s, buf, size, 0);
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
                }
 #endif
                if (sent == -1) {
@@ -1247,7 +1247,7 @@
                return -1;
        }
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        if (ftp->use_ssl && ftp->fd == s && ftp->ssl_active) {
                nr_bytes = SSL_read(ftp->ssl_handle, buf, len);
        } else if (ftp->use_ssl && ftp->fd != s && ftp->use_ssl_for_data && 
ftp->data->ssl_active) {    
@@ -1255,7 +1255,7 @@
        } else {
 #endif
                nr_bytes = recv(s, buf, len, 0);
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        }
 #endif 
        return (nr_bytes);
@@ -1475,7 +1475,7 @@
        php_sockaddr_storage addr;
        socklen_t                       size;
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        SSL_CTX         *ctx;
 #endif
 
@@ -1493,7 +1493,7 @@
        }
 
 data_accepted:
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        
        /* now enable ssl if we need to */
        if (ftp->use_ssl && ftp->use_ssl_for_data) {
@@ -1541,7 +1541,7 @@
                return NULL;
        }
        if (data->listener != -1) {
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
                if (data->ssl_active) {
                        SSL_shutdown(data->ssl_handle);
                        data->ssl_active = 0;
@@ -1550,7 +1550,7 @@
                closesocket(data->listener);
        }       
        if (data->fd != -1) {
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
                if (data->ssl_active) {
                        SSL_shutdown(data->ssl_handle);
                        data->ssl_active = 0;
Index: php-src/ext/ftp/ftp.h
diff -u php-src/ext/ftp/ftp.h:1.38 php-src/ext/ftp/ftp.h:1.39
--- php-src/ext/ftp/ftp.h:1.38  Tue Jun 10 16:03:29 2003
+++ php-src/ext/ftp/ftp.h       Fri Jun 27 12:41:41 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: ftp.h,v 1.38 2003/06/10 20:03:29 imajes Exp $ */
+/* $Id: ftp.h,v 1.39 2003/06/27 16:41:41 sniper Exp $ */
 
 #ifndef        FTP_H
 #define        FTP_H
@@ -49,7 +49,7 @@
        php_socket_t            fd;                     /* data connection */
        ftptype_t       type;                   /* transfer type */
        char            buf[FTP_BUFSIZE];       /* data buffer */
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        SSL             *ssl_handle;    /* ssl handle */
        int             ssl_active;             /* flag if ssl is active or not */
 #endif
@@ -78,7 +78,7 @@
        int                             lastch;         /* last char of previous call 
*/
        int                             direction;      /* recv = 0 / send = 1 */
        int                             closestream;/* close or not close stream */
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        int                             use_ssl; /* enable(1) or disable(0) ssl */
        int                             use_ssl_for_data; /* en/disable ssl for the 
dataconnection */
        int                             old_ssl;        /* old mode = forced data 
encryption */
Index: php-src/ext/ftp/php_ftp.c
diff -u php-src/ext/ftp/php_ftp.c:1.90 php-src/ext/ftp/php_ftp.c:1.91
--- php-src/ext/ftp/php_ftp.c:1.90      Sun Jun 15 11:24:24 2003
+++ php-src/ext/ftp/php_ftp.c   Fri Jun 27 12:41:41 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_ftp.c,v 1.90 2003/06/15 15:24:24 andrey Exp $ */
+/* $Id: php_ftp.c,v 1.91 2003/06/27 16:41:41 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -35,7 +35,7 @@
 #endif
 #endif
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
 #include <openssl/ssl.h>
 #endif
 
@@ -52,7 +52,7 @@
 
 function_entry php_ftp_functions[] = {
        PHP_FE(ftp_connect,                     NULL)
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        PHP_FE(ftp_ssl_connect,         NULL)
 #endif 
        PHP_FE(ftp_login,                       NULL)
@@ -171,7 +171,7 @@
 
        /* autoseek for resuming */
        ftp->autoseek = FTP_DEFAULT_AUTOSEEK;
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
        /* disable ssl */
        ftp->use_ssl = 0;
 #endif
@@ -180,7 +180,7 @@
 }
 /* }}} */
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
 /* {{{ proto resource ftp_ssl_connect(string host [, int port [, int timeout)]])
    Opens a FTP-SSL stream */
 PHP_FUNCTION(ftp_ssl_connect)
Index: php-src/ext/ftp/php_ftp.h
diff -u php-src/ext/ftp/php_ftp.h:1.25 php-src/ext/ftp/php_ftp.h:1.26
--- php-src/ext/ftp/php_ftp.h:1.25      Tue Jun 10 16:03:29 2003
+++ php-src/ext/ftp/php_ftp.h   Fri Jun 27 12:41:41 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_ftp.h,v 1.25 2003/06/10 20:03:29 imajes Exp $ */
+/* $Id: php_ftp.h,v 1.26 2003/06/27 16:41:41 sniper Exp $ */
 
 #ifndef        _INCLUDED_FTP_H
 #define        _INCLUDED_FTP_H
@@ -35,7 +35,7 @@
 PHP_MINFO_FUNCTION(ftp);
 
 PHP_FUNCTION(ftp_connect);
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
 PHP_FUNCTION(ftp_ssl_connect);
 #endif
 PHP_FUNCTION(ftp_login);
Index: php-src/ext/openssl/php_openssl.h
diff -u php-src/ext/openssl/php_openssl.h:1.13 php-src/ext/openssl/php_openssl.h:1.14
--- php-src/ext/openssl/php_openssl.h:1.13      Tue Jun 10 16:03:34 2003
+++ php-src/ext/openssl/php_openssl.h   Fri Jun 27 12:41:41 2003
@@ -17,12 +17,12 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_openssl.h,v 1.13 2003/06/10 20:03:34 imajes Exp $ */
+/* $Id: php_openssl.h,v 1.14 2003/06/27 16:41:41 sniper Exp $ */
 
 #ifndef PHP_OPENSSL_H
 #define PHP_OPENSSL_H
 /* HAVE_OPENSSL would include SSL MySQL stuff */
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
 extern zend_module_entry openssl_module_entry;
 #define phpext_openssl_ptr &openssl_module_entry
 
Index: php-src/main/internal_functions.c.in
diff -u php-src/main/internal_functions.c.in:1.24 
php-src/main/internal_functions.c.in:1.25
--- php-src/main/internal_functions.c.in:1.24   Tue Jun 10 16:03:41 2003
+++ php-src/main/internal_functions.c.in        Fri Jun 27 12:41:41 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: internal_functions.c.in,v 1.24 2003/06/10 20:03:41 imajes Exp $ */
+/* $Id: internal_functions.c.in,v 1.25 2003/06/27 16:41:41 sniper Exp $ */
 
 #include "php.h"
 #include "php_main.h"
@@ -28,7 +28,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
 /* zlib typedefs free_func which causes problems if the SSL includes happen
  * after zlib.h is included */
 # include <openssl/ssl.h>
Index: php-src/sapi/apache/php_apache_http.h
diff -u php-src/sapi/apache/php_apache_http.h:1.9 
php-src/sapi/apache/php_apache_http.h:1.10
--- php-src/sapi/apache/php_apache_http.h:1.9   Tue Jun 10 16:03:44 2003
+++ php-src/sapi/apache/php_apache_http.h       Fri Jun 27 12:41:41 2003
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_apache_http.h,v 1.9 2003/06/10 20:03:44 imajes Exp $ */
+/* $Id: php_apache_http.h,v 1.10 2003/06/27 16:41:41 sniper Exp $ */
 
 #define NO_REGEX_EXTRA_H
 
@@ -34,7 +34,7 @@
 #include "php_regex.h"
 #include "php_compat.h"
 
-#if HAVE_OPENSSL_EXT
+#ifdef HAVE_OPENSSL_EXT
 /* zlib typedefs free_func which causes problems if the SSL includes happen
  * after zlib.h is included */
 # include <openssl/ssl.h>

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

Reply via email to