diff options
author | Yang Tse <yangsita@gmail.com> | 2012-06-08 14:21:29 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-06-08 14:27:45 +0200 |
commit | eeeba1496cbcac7aaffdd9355270d61582e98d3a (patch) | |
tree | 63aad82c2a402ad3341834ada88100a28cc95be7 /src/tool_metalink.h | |
parent | 186b101deb1e1b46b4f2797e8aed9ce6c774fcae (diff) | |
download | curl-eeeba1496cbcac7aaffdd9355270d61582e98d3a.tar.gz |
metalink: build fixes and adjustments II
Additionally, make hash checking ability mandatory in order to allow metalink
support in curl.
A command line option could be introduced to skip hash checking at runtime,
but the ability to check hashes should always be built-in when providing
metalink support.
Diffstat (limited to 'src/tool_metalink.h')
-rw-r--r-- | src/tool_metalink.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/tool_metalink.h b/src/tool_metalink.h index c38240241..3ce1fe2f9 100644 --- a/src/tool_metalink.h +++ b/src/tool_metalink.h @@ -23,13 +23,6 @@ ***************************************************************************/ #include "tool_setup.h" -struct Configurable; - -#if defined(USE_OPENSSL) || defined(USE_GNUTLS) -/* Define 1 if hash check is enabled in Metalink transfer */ -# define METALINK_HASH_CHECK 1 -#endif - typedef struct metalink_checksum { struct metalink_checksum *next; char *hash_name; @@ -49,17 +42,13 @@ typedef struct metalinkfile { metalink_resource *resource; } metalinkfile; +#ifdef USE_METALINK + /* * Counts the resource in the metalinkfile. */ -#ifdef USE_METALINK int count_next_metalink_resource(metalinkfile *mlfile); void clean_metalink(struct Configurable *config); -#else -#define count_next_metalink_resource(x) 0 -#define clean_metalink(x) -#endif - int parse_metalink(struct Configurable *config, const char *infile); @@ -126,4 +115,11 @@ int metalink_check_hash(struct Configurable *config, metalinkfile *mlfile, const char *filename); +#else /* USE_METALINK */ + +#define count_next_metalink_resource(x) 0 +#define clean_metalink(x) Curl_nop_stmt + +#endif /* USE_METALINK */ + #endif /* HEADER_CURL_TOOL_METALINK_H */ |