diff -ru curl-7.9.7\lib\arpa_telnet.h curl-7.9.7-mn\lib\arpa_telnet.h --- curl-7.9.7\lib\arpa_telnet.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\arpa_telnet.h Fri Jun 07 10:09:57 2002 @@ -22,7 +22,7 @@ * * $Id: arpa_telnet.h,v 1.6 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ - +#ifndef DISABLE_TELNET /* * Telnet option defines. Add more here if in need. */ @@ -97,5 +97,5 @@ #define TELCMD_OK(x) ( ((unsigned int)(x) >= TELCMD_MINIMUM) && \ ((unsigned int)(x) <= TELCMD_MAXIMUM) ) #define TELCMD(x) telnetcmds[(x)-TELCMD_MINIMUM] - +#endif #endif diff -ru curl-7.9.7\lib\dict.h curl-7.9.7-mn\lib\dict.h --- curl-7.9.7\lib\dict.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\dict.h Fri Jun 07 10:22:52 2002 @@ -23,7 +23,8 @@ * * $Id: dict.h,v 1.7 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ +#ifndef DISABLE_DICT CURLcode Curl_dict(struct connectdata *conn); CURLcode Curl_dict_done(struct connectdata *conn); - +#endif #endif diff -ru curl-7.9.7\lib\file.c curl-7.9.7-mn\lib\file.c --- curl-7.9.7\lib\file.c Mon Apr 22 16:56:56 2002 +++ curl-7.9.7-mn\lib\file.c Fri Jun 07 10:12:29 2002 @@ -23,6 +23,7 @@ #include "setup.h" +#ifndef DISABLE_FILE /* -- WIN32 approved -- */ #include #include @@ -204,3 +205,4 @@ * vim600: fdm=marker * vim: et sw=2 ts=2 sts=2 tw=78 */ +#endif diff -ru curl-7.9.7\lib\file.h curl-7.9.7-mn\lib\file.h --- curl-7.9.7\lib\file.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\file.h Fri Jun 07 10:10:23 2002 @@ -23,6 +23,8 @@ * * $Id: file.h,v 1.7 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ +#ifndef DISABLE_FILE CURLcode Curl_file(struct connectdata *conn); CURLcode Curl_file_connect(struct connectdata *conn); +#endif #endif diff -ru curl-7.9.7\lib\ftp.c curl-7.9.7-mn\lib\ftp.c --- curl-7.9.7\lib\ftp.c Mon Apr 29 04:57:26 2002 +++ curl-7.9.7-mn\lib\ftp.c Fri Jun 07 10:22:52 2002 @@ -23,6 +23,8 @@ #include "setup.h" +/* MN 06/07/02 */ +#ifndef DISABLE_FTP #include #include #include @@ -2141,3 +2143,5 @@ * vim600: fdm=marker * vim: et sw=2 ts=2 sts=2 tw=78 */ +/* MN 06/07/02 */ +#endif diff -ru curl-7.9.7\lib\ftp.h curl-7.9.7-mn\lib\ftp.h --- curl-7.9.7\lib\ftp.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\ftp.h Fri Jun 07 09:51:36 2002 @@ -23,6 +23,10 @@ * * $Id: ftp.h,v 1.11 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ + +/* MN 06/07/02 */ +#ifndef DISABLE_FTP + CURLcode Curl_ftp(struct connectdata *conn); CURLcode Curl_ftp_done(struct connectdata *conn); CURLcode Curl_ftp_connect(struct connectdata *conn); @@ -33,5 +37,9 @@ /* The kerberos stuff needs this: */ int Curl_GetFTPResponse(char *buf, struct connectdata *conn, int *ftpcode); + +/* MN 06/07/02 */ +#endif + #endif diff -ru curl-7.9.7\lib\http.c curl-7.9.7-mn\lib\http.c --- curl-7.9.7\lib\http.c Mon Apr 22 16:56:56 2002 +++ curl-7.9.7-mn\lib\http.c Fri Jun 07 10:22:52 2002 @@ -23,6 +23,7 @@ #include "setup.h" +#ifndef DISABLE_HTTP /* -- WIN32 approved -- */ #include #include @@ -986,3 +987,4 @@ * vim600: fdm=marker * vim: et sw=2 ts=2 sts=2 tw=78 */ +#endif diff -ru curl-7.9.7\lib\http.h curl-7.9.7-mn\lib\http.h --- curl-7.9.7\lib\http.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\http.h Fri Jun 07 10:10:58 2002 @@ -23,7 +23,7 @@ * * $Id: http.h,v 1.13 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ - +#ifndef DISABLE_HTTP /* ftp can use this as well */ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, int tunnelsocket, @@ -38,5 +38,5 @@ void Curl_httpchunk_init(struct connectdata *conn); CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap, ssize_t length, ssize_t *wrote); - +#endif #endif diff -ru curl-7.9.7\lib\http_chunks.c curl-7.9.7-mn\lib\http_chunks.c --- curl-7.9.7\lib\http_chunks.c Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\http_chunks.c Fri Jun 07 10:22:52 2002 @@ -22,6 +22,7 @@ *****************************************************************************/ #include "setup.h" +#ifndef DISABLE_HTTP /* -- WIN32 approved -- */ #include #include @@ -228,3 +229,4 @@ * vim600: fdm=marker * vim: et sw=2 ts=2 sts=2 tw=78 */ +#endif diff -ru curl-7.9.7\lib\ldap.c curl-7.9.7-mn\lib\ldap.c --- curl-7.9.7\lib\ldap.c Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\ldap.c Fri Jun 07 10:22:52 2002 @@ -23,6 +23,7 @@ #include "setup.h" +#ifndef DISABLE_LDAP /* -- WIN32 approved -- */ #include #include @@ -229,3 +230,4 @@ * vim600: fdm=marker * vim: et sw=2 ts=2 sts=2 tw=78 */ +#endif \ No newline at end of file diff -ru curl-7.9.7\lib\ldap.h curl-7.9.7-mn\lib\ldap.h --- curl-7.9.7\lib\ldap.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\ldap.h Fri Jun 07 10:22:52 2002 @@ -23,7 +23,8 @@ * * $Id: ldap.h,v 1.7 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ +#ifndef DISABLE_LDAP CURLcode Curl_ldap(struct connectdata *conn); CURLcode Curl_ldap_done(struct connectdata *conn); - +#endif #endif /* __LDAP_H */ diff -ru curl-7.9.7\lib\setup.h curl-7.9.7-mn\lib\setup.h --- curl-7.9.7\lib\setup.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\setup.h Mon Jun 10 11:41:30 2002 @@ -1,10 +1,10 @@ #ifndef __SETUP_H #define __SETUP_H /***************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. @@ -23,7 +23,17 @@ * $Id: setup.h,v 1.22 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ - +/* MN 06/07/02 */ +/* #define HTTP_ONLY +*/ +#ifdef HTTP_ONLY +#define DISABLE_FTP +#define DISABLE_LDAP +#define DISABLE_TELNET +#define DISABLE_DICT +#define DISABLE_FILE +#define DISABLE_GOPHER +#endif #if !defined(WIN32) && defined(_WIN32) /* This _might_ be a good Borland fix. Please report whether this works or diff -ru curl-7.9.7\lib\telnet.c curl-7.9.7-mn\lib\telnet.c --- curl-7.9.7\lib\telnet.c Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\telnet.c Fri Jun 07 10:22:52 2002 @@ -23,6 +23,7 @@ #include "setup.h" +#ifndef DISABLE_TELNET /* -- WIN32 approved -- */ #include #include @@ -1211,3 +1212,4 @@ * vim600: fdm=marker * vim: et sw=2 ts=2 sts=2 tw=78 */ +#endif \ No newline at end of file diff -ru curl-7.9.7\lib\telnet.h curl-7.9.7-mn\lib\telnet.h --- curl-7.9.7\lib\telnet.h Mon Mar 18 23:54:56 2002 +++ curl-7.9.7-mn\lib\telnet.h Fri Jun 07 10:11:39 2002 @@ -23,7 +23,8 @@ * * $Id: telnet.h,v 1.7 2002/03/19 07:54:55 bagder Exp $ *****************************************************************************/ +#ifndef DISABLE_TELNET CURLcode Curl_telnet(struct connectdata *conn); CURLcode Curl_telnet_done(struct connectdata *conn); - +#endif #endif diff -ru curl-7.9.7\lib\url.c curl-7.9.7-mn\lib\url.c --- curl-7.9.7\lib\url.c Tue May 07 02:58:14 2002 +++ curl-7.9.7-mn\lib\url.c Fri Jun 07 10:22:29 2002 @@ -1730,6 +1730,7 @@ conn->protocol &= ~PROT_MISSING; /* switch that one off again */ } +#ifndef DISABLE_HTTP /************************************************************ * RESUME on a HTTP page is a tricky business. First, let's just check that * 'range' isn't used, then set the range parameter and leave the resume as @@ -1748,12 +1749,13 @@ conn->bits.use_range = 1; /* switch on range usage */ } } - +#endif /************************************************************* * Setup internals depending on protocol *************************************************************/ if (strequal(conn->protostr, "HTTP")) { +#ifndef DISABLE_HTTP conn->port = (data->set.use_port && data->state.allow_port)? data->set.use_port:PORT_HTTP; conn->remote_port = PORT_HTTP; @@ -1761,6 +1763,11 @@ conn->curl_do = Curl_http; conn->curl_done = Curl_http_done; conn->curl_connect = Curl_http_connect; +#else + failf(data, LIBCURL_NAME + " was built with HTTP disabled, http: not supported!"); + return CURLE_UNSUPPORTED_PROTOCOL; +#endif } else if (strequal(conn->protostr, "HTTPS")) { #ifdef USE_SSLEAY @@ -1781,6 +1788,7 @@ #endif /* !USE_SSLEAY */ } else if (strequal(conn->protostr, "GOPHER")) { +#ifndef DISABLE_GOPHER conn->port = (data->set.use_port && data->state.allow_port)? data->set.use_port:PORT_GOPHER; conn->remote_port = PORT_GOPHER; @@ -1793,9 +1801,16 @@ conn->protocol |= PROT_GOPHER; conn->curl_do = Curl_http; conn->curl_done = Curl_http_done; +#else + failf(data, LIBCURL_NAME + " was built with GOPHER disabled, gopher: not supported!"); +#endif } else if(strequal(conn->protostr, "FTP") || strequal(conn->protostr, "FTPS")) { + +/* MN 06/07/02 */ +#ifndef DISABLE_FTP char *type; if(strequal(conn->protostr, "FTPS")) { @@ -1859,8 +1874,16 @@ break; } } + +/* MN 06/07/02 */ +#else /* DISABLE_FTP */ + failf(data, LIBCURL_NAME + " was built with FTP disabled, ftp/ftps: not supported!"); + return CURLE_UNSUPPORTED_PROTOCOL; +#endif } else if(strequal(conn->protostr, "TELNET")) { +#ifndef DISABLE_TELNET /* telnet testing factory */ conn->protocol |= PROT_TELNET; @@ -1869,24 +1892,39 @@ conn->remote_port = PORT_TELNET; conn->curl_do = Curl_telnet; conn->curl_done = Curl_telnet_done; +#else + failf(data, LIBCURL_NAME + " was built with TELNET disabled!"); +#endif } else if (strequal(conn->protostr, "DICT")) { +#ifndef DISABLE_DICT conn->protocol |= PROT_DICT; conn->port = (data->set.use_port && data->state.allow_port)? data->set.use_port:PORT_DICT; conn->remote_port = PORT_DICT; conn->curl_do = Curl_dict; conn->curl_done = NULL; /* no DICT-specific done */ +#else + failf(data, LIBCURL_NAME + " was built with DICT disabled!"); +#endif } else if (strequal(conn->protostr, "LDAP")) { +#ifndef DISABLE_LDAP conn->protocol |= PROT_LDAP; conn->port = (data->set.use_port && data->state.allow_port)? data->set.use_port:PORT_LDAP; conn->remote_port = PORT_LDAP; conn->curl_do = Curl_ldap; conn->curl_done = NULL; /* no LDAP-specific done */ +#else + failf(data, LIBCURL_NAME + " was built with LDAP disabled!"); +#endif } else if (strequal(conn->protostr, "FILE")) { +#ifndef DISABLE_FILE conn->protocol |= PROT_FILE; conn->curl_do = Curl_file; @@ -1903,6 +1941,10 @@ } return result; +#else + failf(data, LIBCURL_NAME + " was built with FILE disabled!"); +#endif } else { /* We fell through all checks and thus we don't support the specified