From db5301e1ed13f8a84ee413ce5cdf65b77acba51c Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Fri, 21 Nov 2014 16:53:32 +0530 Subject: [PATCH 2/2] Fix location of extern declaration for numurls --- src/ChangeLog | 5 +++++ src/http.c | 1 - src/retr.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e9a8160..db16d5d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2014-11-21 Darshit Shah + * retr.h: Declare extern int numurls for globally shared variable + * http.c: Remove extern declaration from here. + +2014-11-21 Darshit Shah + * Makefile.am: Generate version.h containing extern declarations for strings in version.c * main.c: Include version.h and remove local extern declarations diff --git a/src/http.c b/src/http.c index b96d4a9..ce007cb 100644 --- a/src/http.c +++ b/src/http.c @@ -147,7 +147,6 @@ struct request { int hcount, hcapacity; }; -extern int numurls; /* Create a new, empty request. Set the request's method and its arguments. METHOD should be a literal string (or it should outlive diff --git a/src/retr.h b/src/retr.h index d766ec5..da1ae58 100644 --- a/src/retr.h +++ b/src/retr.h @@ -41,6 +41,10 @@ extern double total_download_time; extern FILE *output_stream; extern bool output_stream_regular; +/* This global variable is required by http.c and ftp.c to keep a count of the + * number of URLs. It is initialized in main.c */ +extern int numurls; + /* Flags for fd_read_body. */ enum { rb_read_exactly = 1, -- 2.1.3