aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-18 03:37:39 +0000
committerYang Tse <yangsita@gmail.com>2009-10-18 03:37:39 +0000
commit6d4e6cc8137ff2ebdbaf055e39ce1263ad634191 (patch)
tree8fa6c09f7defeaaf54e2beffed0210a67b7a1db6 /src
parent86cec97b2214cefdbc7cfa1c434c5823b28a47c3 (diff)
Check for basename() is now done the same as other function checks
Diffstat (limited to 'src')
-rw-r--r--src/main.c9
1 files changed, 8 insertions, 1 deletions
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 <ctype.h>
#include <errno.h>
+#if defined(MSDOS) || defined(WIN32)
+# if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
+# include <libgen.h>
+# endif
+#endif
+
#include <curl/curl.h>
#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