--- parser3/src/include/pa_config_includes.h 2024/12/23 16:59:17 1.76 +++ parser3/src/include/pa_config_includes.h 2026/10/29 11:50:58 1.84 @@ -1,7 +1,7 @@ /** @file Parser: includes all Configure-d headers - Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian when used Configure [HAVE_CONFIG_H] it uses defines from Configure, @@ -153,16 +153,12 @@ # include #endif - -#if TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include +#endif + +#ifdef HAVE_TIME_H # include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif #ifdef HAVE_PCRE2 @@ -194,6 +190,11 @@ inline size_t min(size_t a, size_t b){ r #endif // __cplusplus +// $response:timeout needs the timer that signals the calling thread and the OS id of the thread +#if defined(HAVE_GETTID) || defined(HAVE_THR_SELF) +# define PA_RESPONSE_TIMEOUT +#endif + // libgc usage configuration //#define PA_DEBUG_DISABLE_GC @@ -201,7 +202,7 @@ inline size_t min(size_t a, size_t b){ r #define GC_MALLOC(size) memset(malloc(size), 0 , size) #define GC_MALLOC_ATOMIC(size) memset(malloc(size), 0 , size) -#define GC_REALLOC(ptr, size) realloc(ptr, size) +#define GC_REALLOC(ptr, size) realloc(ptr, size) // warning: non-gc realloc doesn't zero expanded region #define GC_FREE(ptr) free(ptr) #define GC_NEW(t) (t *)GC_MALLOC(sizeof (t)) @@ -243,6 +244,7 @@ inline size_t min(size_t a, size_t b){ r #pragma clang diagnostic ignored "-Wparentheses" // if(a=b) #pragma clang diagnostic ignored "-Wpointer-sign" // CORD (unsigned char *) to char * in libcord #pragma clang diagnostic ignored "-Winline-new-delete" // test for regular new/delete usage in memory.h +#pragma clang diagnostic ignored "-Winvalid-offsetof" // intentional container_of-style offsetof(Pair,next) in OrderedHash reverse iterator #elif defined(__GNUC__) && (__GNUC__ >= 7) #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" // case without break @@ -250,6 +252,10 @@ inline size_t min(size_t a, size_t b){ r #endif #ifdef _MSC_VER + +// must be the very first Windows include: to prevent windows.h auto-include the legacy winsock.h +#include + // VS 2003 #pragma warning(disable:4355) // using this in calls to parent constructors #pragma warning(disable:4291) // no matching operator delete found; memory will not be freed if initialization throws an exception @@ -261,6 +267,9 @@ inline size_t min(size_t a, size_t b){ r #pragma warning(disable:4511) // copy constructor could not be generated (vs2003 specific) // VS 2015 #pragma warning(disable:4267) // conversion from 'size_t' to 'int', possible loss of data +#pragma warning(disable:4456) // local declaration hides another local +#pragma warning(disable:4458) // declaration hides class member +#pragma warning(disable:4459) // declaration hides global #endif #endif