From 05f6f2497a9cd238e3314ab60ebbd8d816780a73 Mon Sep 17 00:00:00 2001 From: Mark Salisbury Date: Mon, 18 Jun 2012 13:06:02 +0200 Subject: ftplistparser.c: do not compile if FTP protocol is not enabled --- lib/ftplistparser.c | 12 ++++++++---- lib/ftplistparser.h | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c index bbf6e9ef9..49ee4b6a6 100644 --- a/lib/ftplistparser.c +++ b/lib/ftplistparser.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -37,16 +37,18 @@ #include "setup.h" -#include "ftplistparser.h" -#include "curl_fnmatch.h" +#ifndef CURL_DISABLE_FTP + +#include #include "urldata.h" -#include "ftp.h" #include "fileinfo.h" #include "llist.h" #include "strtoofft.h" #include "rawstr.h" #include "ftp.h" +#include "ftplistparser.h" +#include "curl_fnmatch.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -1044,3 +1046,5 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, return bufflen; } + +#endif /* CURL_DISABLE_FTP */ diff --git a/lib/ftplistparser.h b/lib/ftplistparser.h index 67a06c296..8499ccda4 100644 --- a/lib/ftplistparser.h +++ b/lib/ftplistparser.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -21,8 +21,9 @@ * KIND, either express or implied. * ***************************************************************************/ +#include "setup.h" -#include +#ifndef CURL_DISABLE_FTP /* WRITEFUNCTION callback for parsing LIST responses */ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, @@ -36,4 +37,5 @@ struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void); void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data); +#endif /* CURL_DISABLE_FTP */ #endif /* HEADER_CURL_FTPLISTPARSER_H */ -- cgit v1.2.3