Diff for /parser3/src/include/pa_config_includes.h between versions 1.52 and 1.65

version 1.52, 2017/02/08 13:05:46 version 1.65, 2020/12/15 00:37:02
Line 96 Line 96
 # include <signal.h>  # include <signal.h>
 #endif  #endif
   
   #ifdef HAVE_PTHREAD_H
   # include <pthread.h>
   #endif
   
 #ifdef HAVE_ERRNO_H  #ifdef HAVE_ERRNO_H
 # include <errno.h>  # include <errno.h>
 #endif  #endif
Line 184  inline size_t max(size_t a, size_t b) { Line 188  inline size_t max(size_t a, size_t b) {
 inline size_t min(size_t a, size_t b){ return a<b?a:b; }  inline size_t min(size_t a, size_t b){ return a<b?a:b; }
 #endif  #endif
   
 #endif  #endif // __cplusplus
   
   // libgc usage configuration
   //#define PA_DEBUG_DISABLE_GC
   
   #ifdef PA_DEBUG_DISABLE_GC
   
   #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_FREE(ptr) free(ptr)
   
   #define GC_NEW(t) (t *)GC_MALLOC(sizeof (t))
   #define GC_NEW_ATOMIC(t) (t *)GC_MALLOC_ATOMIC(sizeof (t))
   
   #else
   
 #if defined(__GNUC__)  // allows to backtrace pointers
   //#define GC_DEBUG
   
   #include "../lib/gc/include/gc.h"
   
   #endif // PA_DEBUG_DISABLE_GC
   
   
   #ifdef __GNUC__
 #  define PA_ATTR_UNUSED __attribute__((unused))  #  define PA_ATTR_UNUSED __attribute__((unused))
 #else  #else
 #  define PA_ATTR_UNUSED  #  define PA_ATTR_UNUSED
Line 195  inline size_t min(size_t a, size_t b){ r Line 222  inline size_t min(size_t a, size_t b){ r
 #ifdef WIN32  #ifdef WIN32
 #define THREAD_LOCAL __declspec(thread)  #define THREAD_LOCAL __declspec(thread)
 #else  #else
 #define THREAD_LOCAL // __thread // multithreading support required only for apache2 module  #define THREAD_LOCAL __thread
 #endif  #endif
   
 #if __clang__  #ifdef __clang__
 #pragma clang diagnostic ignored "-Wparentheses"       // if(a=b)  #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 "-Wdeprecated-register" // 'register' specifier is deprecated and incompatible with C++17
   
   #elif defined(__GNUC__)
   #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"  // case without break
   
 #endif  #endif
   
 #ifdef _MSC_VER  #ifdef _MSC_VER
   // VS 2003
 #pragma warning(disable:4355)  // using this in calls to parent constructors  #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  #pragma warning(disable:4291)  // no matching operator delete found; memory will not be freed if initialization throws an exception
 #pragma warning(disable:4512)  // assignment operator could not be generated  #pragma warning(disable:4512)  // assignment operator could not be generated
 #pragma warning(disable:4505)  // unreferenced local function has been removed  
 #pragma warning(disable:4127)  // conditional expression is constant; while(true) OK  #pragma warning(disable:4127)  // conditional expression is constant; while(true) OK
 #pragma warning(disable:4706)  // assignment within conditional expression if(type var=somethig) OK  #pragma warning(disable:4706)  // assignment within conditional expression if(type var=somethig) OK
 #pragma warning(disable:4996)  // memcpy deprecation  #pragma warning(disable:4996)  // memcpy deprecation
 #pragma warning(disable:4702)  // unreachable code  #pragma warning(disable:4702)  // unreachable code
 #pragma warning(disable:4511)  // copy constructor could not be generated (vs2003 specific)  #pragma warning(disable:4511)  // copy constructor could not be generated (vs2003 specific)
 #endif  // VS 2015
   #pragma warning(disable:4267) // conversion from 'size_t' to 'int', possible loss of data
 /// to debug backtrace pointers switch this on:  
 #if defined(_DEBUG) || defined(PA_RELEASE_ASSERTS)  
 //// this switches on straightforward realloc implementation, bad for profiling  
 //// note: this is incompatible with -DGC_ASSERTIONS, which can be switched ON in win32/gc/NT_THREADS_MAKEFILE  
 #define GC_DEBUG  
 #endif  #endif
   
 #endif  #endif

Removed from v.1.52  
changed lines
  Added in v.1.65


E-mail: