mirror of
https://github.com/mirror/wget.git
synced 2025-04-24 12:10:16 +08:00
Fix include/define clash with gnulib's unlink module
* src/options.h: Rename options.unlink to options.unlink_requested * src/init.c: Replace options unlink member by unlink_requested * src/http.c: Likewise * src/ftp.c: Likewise
This commit is contained in:
parent
51b401f5c4
commit
31ac36e170
@ -1463,7 +1463,7 @@ Error in server response, closing control connection.\n"));
|
||||
else if (opt.noclobber || opt.always_rest || opt.timestamping || opt.dirstruct
|
||||
|| opt.output_document || count > 0)
|
||||
{
|
||||
if (opt.unlink && file_exists_p (con->target))
|
||||
if (opt.unlink_requested && file_exists_p (con->target))
|
||||
{
|
||||
if (unlink (con->target) < 0)
|
||||
{
|
||||
|
@ -2486,7 +2486,7 @@ open_output_stream (struct http_stat *hs, int count, FILE **fp)
|
||||
}
|
||||
else if (ALLOW_CLOBBER || count > 0)
|
||||
{
|
||||
if (opt.unlink && file_exists_p (hs->local_file))
|
||||
if (opt.unlink_requested && file_exists_p (hs->local_file))
|
||||
{
|
||||
if (unlink (hs->local_file) < 0)
|
||||
{
|
||||
|
@ -321,7 +321,7 @@ static const struct {
|
||||
{ "timestamping", &opt.timestamping, cmd_boolean },
|
||||
{ "tries", &opt.ntry, cmd_number_inf },
|
||||
{ "trustservernames", &opt.trustservernames, cmd_boolean },
|
||||
{ "unlink", &opt.unlink, cmd_boolean },
|
||||
{ "unlink", &opt.unlink_requested, cmd_boolean },
|
||||
{ "useaskpass" , &opt.use_askpass, cmd_use_askpass },
|
||||
{ "useproxy", &opt.use_proxy, cmd_boolean },
|
||||
{ "user", &opt.user, cmd_string },
|
||||
|
@ -61,7 +61,7 @@ struct options
|
||||
bool add_hostdir; /* Do we add hostname directory? */
|
||||
bool protocol_directories; /* Whether to prepend "http"/"ftp" to dirs. */
|
||||
bool noclobber; /* Disables clobbering of existing data. */
|
||||
bool unlink; /* remove file before clobbering */
|
||||
bool unlink_requested; /* remove file before clobbering */
|
||||
char *dir_prefix; /* The top of directory tree */
|
||||
char *lfilename; /* Log filename */
|
||||
char *input_filename; /* Input filename */
|
||||
|
Loading…
Reference in New Issue
Block a user