From 6d4e6cc8137ff2ebdbaf055e39ce1263ad634191 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 18 Oct 2009 03:37:39 +0000 Subject: Check for basename() is now done the same as other function checks --- src/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index f2efc2caa..3459eb53f 100644 --- a/src/main.c +++ b/src/main.c @@ -31,6 +31,12 @@ #include #include +#if defined(MSDOS) || defined(WIN32) +# if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME) +# include +# endif +#endif + #include #include "urlglob.h" @@ -5437,7 +5443,7 @@ static int create_dir_hierarchy(const char *outfile, FILE *errors) /* basename() returns a pointer to the last component of a pathname. * Ripped from lib/formdata.c. */ -static char *basename(char *path) +static char *Curl_basename(char *path) { /* Ignore all the details above for now and make a quick and simple implementaion here */ @@ -5457,6 +5463,7 @@ static char *basename(char *path) return path; } +#define basename(x) Curl_basename((x)) #endif /* HAVE_BASENAME */ /* The following functions are taken with modification from the DJGPP -- cgit v1.2.3