Commit a8419d68 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

#ifdef #define #undef circus to prevent compiler warnings on #if operations

with undefined variables.
parent 87a1c703
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -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 */