diff options
author | Yang Tse <yangsita@gmail.com> | 2012-06-07 23:49:27 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-06-07 23:50:12 +0200 |
commit | 04ca9aecd1a6b32c5e81885f7f1e99d30d6d8ec3 (patch) | |
tree | cc7a188d7a6c4676fdb895df4b7c484b3ba99f78 /src | |
parent | 2e48139fbf44283a07f02978095d50bdcb112b9f (diff) |
metalink: build fixes and adjustments I
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.inc | 8 | ||||
-rw-r--r-- | src/Makefile.vc6 | 6 | ||||
-rw-r--r-- | src/tool_getparam.c | 6 | ||||
-rw-r--r-- | src/tool_metalink.c | 8 | ||||
-rw-r--r-- | src/tool_metalink.h | 2 | ||||
-rw-r--r-- | src/tool_operate.c | 4 | ||||
-rw-r--r-- | src/vc6curlsrc.dsp | 8 |
7 files changed, 28 insertions, 14 deletions
diff --git a/src/Makefile.inc b/src/Makefile.inc index 3265ea9d8..76d6b7b7a 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -36,6 +36,7 @@ CURL_CFILES = hugehelp.c \ tool_homedir.c \ tool_libinfo.c \ tool_main.c \ + tool_metalink.c \ tool_mfiles.c \ tool_msgs.c \ tool_operate.c \ @@ -50,8 +51,7 @@ CURL_CFILES = hugehelp.c \ tool_vms.c \ tool_writeenv.c \ tool_writeout.c \ - tool_xattr.c \ - tool_metalink.c + tool_xattr.c CURL_HFILES = hugehelp.h \ tool_binmode.h \ @@ -75,6 +75,7 @@ CURL_HFILES = hugehelp.h \ tool_homedir.h \ tool_libinfo.h \ tool_main.h \ + tool_metalink.h \ tool_mfiles.h \ tool_msgs.h \ tool_operate.h \ @@ -92,8 +93,7 @@ CURL_HFILES = hugehelp.h \ tool_vms.h \ tool_writeenv.h \ tool_writeout.h \ - tool_xattr.h \ - tool_metalink.h + tool_xattr.h curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES) diff --git a/src/Makefile.vc6 b/src/Makefile.vc6 index 650246fe6..f8b30669b 100644 --- a/src/Makefile.vc6 +++ b/src/Makefile.vc6 @@ -158,6 +158,7 @@ RELEASE_OBJS= \ tool_homedirr.obj \
tool_libinfor.obj \
tool_mainr.obj \
+ tool_metalinkr.obj \
tool_mfilesr.obj \
tool_msgsr.obj \
tool_operater.obj \
@@ -201,6 +202,7 @@ DEBUG_OBJS= \ tool_homedird.obj \
tool_libinfod.obj \
tool_maind.obj \
+ tool_metalinkd.obj \
tool_mfilesd.obj \
tool_msgsd.obj \
tool_operated.obj \
@@ -388,6 +390,8 @@ tool_libinfor.obj: tool_libinfo.c $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c
tool_mainr.obj: tool_main.c
$(CCR) $(CFLAGS) /Fo"$@" tool_main.c
+tool_metalinkr.obj: tool_metalink.c
+ $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c
tool_mfilesr.obj: tool_mfiles.c
$(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c
tool_msgsr.obj: tool_msgs.c
@@ -472,6 +476,8 @@ tool_libinfod.obj: tool_libinfo.c $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c
tool_maind.obj: tool_main.c
$(CCD) $(CFLAGS) /Fo"$@" tool_main.c
+tool_metalinkd.obj: tool_metalink.c
+ $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c
tool_mfilesd.obj: tool_mfiles.c
$(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c
tool_msgsd.obj: tool_msgs.c
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index c8dc7ae14..cc01efb18 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -823,7 +823,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'J': /* --metalink */ { -#ifdef HAVE_LIBMETALINK +#ifdef USE_METALINK if(parse_metalink(config, nextarg) == -1) { warnf(config, "Could not parse Metalink file: %s\n", nextarg); /* TODO Is PARAM_BAD_USE appropriate here? */ @@ -1563,9 +1563,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ if(curlinfo->features & feats[i].bitmask) printf("%s ", feats[i].name); } -#ifdef HAVE_LIBMETALINK +#ifdef USE_METALINK printf("Metalink "); -#endif /* HAVE_LIBMETALINK */ +#endif puts(""); /* newline */ } } diff --git a/src/tool_metalink.c b/src/tool_metalink.c index 58aae831d..375cdd3b2 100644 --- a/src/tool_metalink.c +++ b/src/tool_metalink.c @@ -31,7 +31,7 @@ # include <fcntl.h> #endif -#ifdef HAVE_LIBMETALINK +#ifdef USE_METALINK #include <metalink/metalink_parser.h> @@ -416,7 +416,7 @@ int metalink_check_hash(struct Configurable *config, #endif /* METALINK_HASH_CHECK */ -#ifdef HAVE_LIBMETALINK +#ifdef USE_METALINK static metalink_checksum *new_metalink_checksum(const char *hash_name, const char *hash_value) @@ -538,7 +538,7 @@ int parse_metalink(struct Configurable *config, const char *infile) return 0; } -#endif /* HAVE_LIBMETALINK */ +#endif /* USE_METALINK */ /* * Returns nonzero if content_type includes mediatype. @@ -621,4 +621,4 @@ void clean_metalink(struct Configurable *config) config->metalinkfile_last = 0; } -#endif /* HAVE_LIBMETALINK */ +#endif /* USE_METALINK */ diff --git a/src/tool_metalink.h b/src/tool_metalink.h index 25feddcad..c38240241 100644 --- a/src/tool_metalink.h +++ b/src/tool_metalink.h @@ -52,7 +52,7 @@ typedef struct metalinkfile { /* * Counts the resource in the metalinkfile. */ -#ifdef HAVE_LIBMETALINK +#ifdef USE_METALINK int count_next_metalink_resource(metalinkfile *mlfile); void clean_metalink(struct Configurable *config); #else diff --git a/src/tool_operate.c b/src/tool_operate.c index 7c70fd2da..2da92ca44 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1559,7 +1559,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) } #endif -#ifdef HAVE_LIBMETALINK +#ifdef USE_METALINK if(!metalink && res == CURLE_OK && outs.filename) { /* Check the content-type header field and if it indicates Metalink file, parse it and add getout for them. */ @@ -1585,7 +1585,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) } } # endif /* METALINK_HASH_CHECK */ -#endif /* HAVE_LIBMETALINK */ +#endif /* USE_METALINK */ /* No more business with this output struct */ if(outs.alloc_filename) diff --git a/src/vc6curlsrc.dsp b/src/vc6curlsrc.dsp index a2d9e7bf9..7c757654d 100644 --- a/src/vc6curlsrc.dsp +++ b/src/vc6curlsrc.dsp @@ -239,6 +239,10 @@ SOURCE=.\tool_main.c # End Source File
# Begin Source File
+SOURCE=.\tool_metalink.c
+# End Source File
+# Begin Source File
+
SOURCE=.\tool_mfiles.c
# End Source File
# Begin Source File
@@ -407,6 +411,10 @@ SOURCE=.\tool_main.h # End Source File
# Begin Source File
+SOURCE=.\tool_metalink.h
+# End Source File
+# Begin Source File
+
SOURCE=.\tool_mfiles.h
# End Source File
# Begin Source File
|