From a8419d68b6590365c5cb324372789bb5f68e56d5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Mar 2004 12:37:15 +0000 Subject: #ifdef #define #undef circus to prevent compiler warnings on #if operations with undefined variables. --- include/curl/curl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 60f46787e..5ba819213 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -94,6 +94,15 @@ extern "C" { /* Check a range of defines to detect large file support. On Linux it seems none of these are set by default, so if you don't explicitly switches on large file support, this define will be made for "small file" support. */ +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 0 /* to prevent warnings in the check below */ +#define UNDEF_FILE_OFFSET_BITS +#endif +#ifndef FILESIZEBITS +#define FILESIZEBITS 0 /* to prevent warnings in the check below */ +#define UNDEF_FILESIZEBITS +#endif + #if defined(_LARGE_FILES) || (_FILE_OFFSET_BITS > 32) || (FILESIZEBITS > 32) \ || defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE) /* For now, we assume at least one of these to be set for large files to @@ -105,6 +114,16 @@ extern "C" { #endif /* GCC or Watcom on Windows */ #endif /* MSC_VER */ +#ifdef UNDEF_FILE_OFFSET_BITS +/* this was defined above for our checks, undefine it again */ +#undef _FILE_OFFSET_BITS +#endif + +#ifdef UNDEF_FILESIZEBITS +/* this was defined above for our checks, undefine it again */ +#undef FILESIZEBITS +#endif + struct curl_httppost { struct curl_httppost *next; /* next entry in the list */ char *name; /* pointer to allocated name */ -- cgit v1.2.3