From a6c915aab98a51b69a77a23ebe1ad8eaf0fd251f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 18 Sep 2008 16:21:09 +0000 Subject: fix compiler warning: external declaration in primary source file --- lib/hostip.h | 14 ++++++++++++-- lib/url.c | 4 ---- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/hostip.h b/lib/hostip.h index d37203cc5..c6172be0f 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -26,6 +26,10 @@ #include "setup.h" #include "hash.h" +#ifdef HAVE_SETJMP_H +#include +#endif + #ifdef NETWARE #undef in_addr_t #define in_addr_t unsigned long @@ -287,7 +291,13 @@ void Curl_destroy_thread_data(struct Curl_async *async); #define CURL_INADDR_NONE INADDR_NONE #endif - - +#ifdef HAVE_SIGSETJMP +/* Forward-declaration of variable defined in hostip.c. Beware this + * is a global and unique instance. This is used to store the return + * address that we can jump back to from inside a signal handler. + * This is not thread-safe stuff. + */ +extern sigjmp_buf curl_jmpenv; +#endif #endif diff --git a/lib/url.c b/lib/url.c index a79ab9d78..15c5cc7a4 100644 --- a/lib/url.c +++ b/lib/url.c @@ -184,10 +184,6 @@ static void flush_cookies(struct SessionHandle *data, int cleanup); #ifndef WIN32 /* not for WIN32 builds */ -#ifdef HAVE_SIGSETJMP -extern sigjmp_buf curl_jmpenv; -#endif - #ifdef SIGALRM static RETSIGTYPE alarmfunc(int sig) -- cgit v1.2.3