Date: 09/16/99
- Next message: jap <email protected>: "[PHP-DEV] PHP 4.0 Bug #2315: httpd lock"
- Previous message: Andrew Skalski: "[PHP-DEV] cvs: /php3/functions ftp.c ftp.h ftplib.c ftplib.h"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
musone Thu Sep 16 13:20:15 1999 EDT
Modified files:
/php3/functions ftp.c ftp.h
/php3 Makefile.in config.h.in configure.in internal_functions.c
Log:
backporting to php3
Index: php3/functions/ftp.c
diff -u php3/functions/ftp.c:1.1 php3/functions/ftp.c:1.2
--- php3/functions/ftp.c:1.1 Thu Sep 16 12:47:15 1999
+++ php3/functions/ftp.c Thu Sep 16 13:20:14 1999
@@ -29,8 +29,19 @@
*/
#include "php.h"
+
+#ifndef ZEND_VERSION
+#include "internal_functions.h"
+#endif
+
+#ifdef ZEND_VERSION
#include "php_globals.h"
+#endif
+#ifndef ZEND_VERSION
+#include "php3_list.h"
+#endif
+
#include <ftplib.h>
#include "ftp.h"
@@ -51,17 +62,32 @@
{NULL, NULL, NULL}
};
+#ifdef ZEND_VERSION
php3_module_entry php3_ftp_module_entry = {
- "FTP Functions",
- php3_ftp_functions,
- PHP_MINIT(ftp),
- NULL,
- NULL,
- NULL,
- NULL,
- STANDARD_MODULE_PROPERTIES
+ "FTP Functions",
+ php3_ftp_functions,
+ PHP_MINIT(ftp),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ STANDARD_MODULE_PROPERTIES
};
+#else
+php3_module_entry php3_ftp_module_entry = {
+ "FTP Functions",
+ php3_ftp_functions,
+ PHP_MINIT_FUNCTION,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ STANDARD_MODULE_PROPERTIES
+};
+
+#endif
+
static void ftp_destructor_netbuf(netbuf *net)
{
if (net) {
@@ -69,7 +95,11 @@
}
}
+#ifdef ZEND_VERSION
PHP_MINIT_FUNCTION(ftp)
+#else
+int PHP_MINIT_FUNCTION(INIT_FUNC_ARGS)
+#endif
{
le_netbuf = register_list_destructors(ftp_destructor_netbuf, NULL);
REGISTER_MAIN_LONG_CONSTANT("FTP_ASCII", FTPLIB_ASCII,
Index: php3/functions/ftp.h
diff -u php3/functions/ftp.h:1.1 php3/functions/ftp.h:1.2
--- php3/functions/ftp.h:1.1 Thu Sep 16 12:47:15 1999
+++ php3/functions/ftp.h Thu Sep 16 13:20:14 1999
@@ -1,4 +1,4 @@
-/* $Id: ftp.h,v 1.1 1999/09/16 16:47:15 askalski Exp $ */
+/* $Id: ftp.h,v 1.2 1999/09/16 17:20:14 musone Exp $ */
#ifndef _INCLUDED_FTP_H
#define _INCLUDED_FTP_H
@@ -13,7 +13,14 @@
extern php3_module_entry php3_ftp_module_entry;
#define php3_ftp_module_ptr &php3_ftp_module_entry
+#ifdef ZEND_VERSION
extern PHP_MINIT_FUNCTION(ftp);
+PHP_MINFO_FUNCTION(ftp);
+#else
+extern int PHP_MINIT_FUNCTION(INIT_FUNC_ARGS);
+extern void PHP_MINFO_FUNCTION(void);
+#endif
+
PHP_FUNCTION(ftp_connect);
PHP_FUNCTION(ftp_login);
Index: php3/Makefile.in
diff -u php3/Makefile.in:1.350 php3/Makefile.in:1.351
--- php3/Makefile.in:1.350 Fri Sep 10 18:56:46 1999
+++ php3/Makefile.in Thu Sep 16 13:20:14 1999
@@ -24,7 +24,7 @@
# +----------------------------------------------------------------------+
#
-# $Id: Makefile.in,v 1.350 1999/09/10 22:56:46 sas Exp $
+# $Id: Makefile.in,v 1.351 1999/09/16 17:20:14 musone Exp $
#
prefix = <email protected>@
@@ -78,7 +78,7 @@
functions/dl.c functions/dns.c functions/exec.c functions/file.c \
functions/filepro.c functions/filestat.c \
functions/formatted_print.c functions/fsock.c functions/gd.c \
- functions/head.c functions/html.c functions/image.c functions/imap.c functions/php3_mcal.c functions/imsp.c \
+ functions/head.c functions/html.c functions/image.c functions/imap.c functions/php3_mcal.c functions/ftp.c functions/ftplib.c functions/imsp.c \
functions/link.c functions/mail.c functions/math.c functions/iptc.c \
functions/md5.c functions/microtime.c functions/mime.c \
functions/msql.c functions/mysql.c \
@@ -292,7 +292,7 @@
functions/oracle.h functions/base64.h functions/php3_dir.h \
functions/dns.h functions/php3_pgsql.h functions/php3_velocis.h \
functions/php3_sybase.h functions/php3_sybase-ct.h functions/reg.h \
- functions/php3_mail.h functions/imap.h functions/php3_mcal.h functions/imsp.h functions/php3_aspell.h \
+ functions/php3_mail.h functions/imap.h functions/php3_mcal.h functions/ftp.h functions/ftplib.h functions/imsp.h functions/php3_aspell.h \
functions/md5.h functions/php3_global.h functions/php3_gd.h \
functions/html.h functions/dl.h functions/head.h functions/post.h \
functions/exec.h functions/php3_solid.h functions/adabasd.h \
@@ -477,7 +477,15 @@
php3_hash.h alloc.h safe_mode.h fopen-wrappers.h \
mod_php3.h stack.h operators.h token_cache.h variables.h constants.h \
internal_functions.h modules.h
-functions/php3_mcal.c: functions/php3_mcal.h config.h php.h php_version.h request_info.h \
+functions/php3_mcal.o: functions/php3_mcal.c functions/php3_mcal.h config.h php.h php_version.h request_info.h \
+php3_hash.h alloc.h safe_mode.h fopen-wrappers.h \
+mod_php3.h stack.h operators.h token_cache.h variables.h constants.h \
+internal_functions.h modules.h
+functions/ftplib.o: functions/ftplib.c functions/ftplib.h config.h php.h php_version.h request_info.h \
+php3_hash.h alloc.h safe_mode.h fopen-wrappers.h \
+mod_php3.h stack.h operators.h token_cache.h variables.h constants.h \
+internal_functions.h modules.h
+functions/ftp.o: functions/ftp.c functions/ftp.h config.h php.h php_version.h request_info.h \
php3_hash.h alloc.h safe_mode.h fopen-wrappers.h \
mod_php3.h stack.h operators.h token_cache.h variables.h constants.h \
internal_functions.h modules.h
Index: php3/config.h.in
diff -u php3/config.h.in:1.192 php3/config.h.in:1.193
--- php3/config.h.in:1.192 Fri Sep 3 14:42:35 1999
+++ php3/config.h.in Thu Sep 16 13:20:14 1999
@@ -235,6 +235,9 @@
/* Define if you want MCAL */
#define HAVE_MCAL 0
+/* Define if you want FTP */
+#define HAVE_FTP 0
+
/* Define if you want the IMSP options/addressbook interface */
#define HAVE_IMSP 0
Index: php3/configure.in
diff -u php3/configure.in:1.461 php3/configure.in:1.462
--- php3/configure.in:1.461 Fri Sep 10 18:19:26 1999
+++ php3/configure.in Thu Sep 16 13:20:14 1999
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.461 1999/09/10 22:19:26 sas Exp $
+dnl $Id: configure.in,v 1.462 1999/09/16 17:20:14 musone Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)
@@ -722,6 +722,20 @@
AC_ADD_INCLUDE($MCAL_DIR/)
AC_ADD_LIBRARY_WITH_PATH(mcal, $MCAL_DIR/)
AC_DEFINE(HAVE_MCAL)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_ERROR(no)
+ fi
+],[
+ AC_MSG_RESULT(no)
+])
+
+AC_MSG_CHECKING(for ftp support)
+AC_ARG_WITH(ftp,
+[ --with-ftp Include FTP support.],
+[
+ if test "$withval" != "no"; then
+ AC_DEFINE(HAVE_FTP)
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR(no)
Index: php3/internal_functions.c
diff -u php3/internal_functions.c:1.358 php3/internal_functions.c:1.359
--- php3/internal_functions.c:1.358 Wed Sep 1 16:49:03 1999
+++ php3/internal_functions.c Thu Sep 16 13:20:14 1999
@@ -29,7 +29,7 @@
*/
-/* $Id: internal_functions.c,v 1.358 1999/09/01 20:49:03 musone Exp $ */
+/* $Id: internal_functions.c,v 1.359 1999/09/16 17:20:14 musone Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
@@ -69,6 +69,7 @@
#include "functions/imap.h"
#include "functions/imsp.h"
#include "functions/php3_mcal.h"
+#include "functions/ftp.h"
#include "functions/php3_aspell.h"
#include "functions/md5.h"
#include "functions/php3_gd.h"
@@ -180,6 +181,7 @@
{"IMAP", php3_imap_module_ptr},
{"IMSP", php3_imsp_module_ptr},
{"MCAL", php3_mcal_module_ptr},
+ {"FTP", php3_ftp_module_ptr},
{"ASPELL", php3_aspell_module_ptr},
{"InterBase", php3_ibase_module_ptr},
{"XML", xml_module_ptr},
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: jap <email protected>: "[PHP-DEV] PHP 4.0 Bug #2315: httpd lock"
- Previous message: Andrew Skalski: "[PHP-DEV] cvs: /php3/functions ftp.c ftp.h ftplib.c ftplib.h"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

