From b09fa00cca1a9baa0327a33d865fc970f77d4db0 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 18 Oct 2019 17:57:55 +0200 Subject: Netlist: code maintenance and improvements. [Couriersud] - Added support for line markers to the preprocessor and parser. - Added support for include processing to the preprocessor. - Moved sources base type to plib to be used for preprocessor includes. This enables to include e.g. from rom memory regions. - Renamed some defines --- src/lib/netlist/plib/pconfig.h | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'src/lib/netlist/plib/pconfig.h') diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h index 3e20170a752..102a991e613 100644 --- a/src/lib/netlist/plib/pconfig.h +++ b/src/lib/netlist/plib/pconfig.h @@ -38,20 +38,20 @@ * netlists like kidniki. */ -#ifndef USE_OPENMP -#define USE_OPENMP (0) +#ifndef PUSE_OPENMP +#define PUSE_OPENMP (0) #endif /* * Set this to one if you want to use aligned storage optimizations. */ -#ifndef USE_ALIGNED_OPTIMIZATIONS -#define USE_ALIGNED_OPTIMIZATIONS (0) +#ifndef PUSE_ALIGNED_OPTIMIZATIONS +#define PUSE_ALIGNED_OPTIMIZATIONS (0) #endif -#define USE_ALIGNED_ALLOCATION (USE_ALIGNED_OPTIMIZATIONS) -#define USE_ALIGNED_HINTS (USE_ALIGNED_OPTIMIZATIONS) +#define PUSE_ALIGNED_ALLOCATION (PUSE_ALIGNED_OPTIMIZATIONS) +#define PUSE_ALIGNED_HINTS (PUSE_ALIGNED_OPTIMIZATIONS) /* * Standard alignment macros */ @@ -114,11 +114,19 @@ typedef __int128_t INT128; //============================================================ #if defined(OPENMP) -#define HAS_OPENMP ( OPENMP >= 200805 ) +#if ( OPENMP >= 200805 ) +#define PHAS_OPENMP (1) +#else +#define PHAS_OPENMP (0) +#endif #elif defined(_OPENMP) -#define HAS_OPENMP ( _OPENMP >= 200805 ) +#if ( _OPENMP >= 200805 ) +#define PHAS_OPENMP (1) +#else +#define PHAS_OPENMP (0) +#endif #else -#define HAS_OPENMP (0) +#define PHAS_OPENMP (0) #endif @@ -126,8 +134,8 @@ typedef __int128_t INT128; // WARNINGS //============================================================ -#if (USE_OPENMP) -#if (!(HAS_OPENMP)) +#if (PUSE_OPENMP) +#if (!(PHAS_OPENMP)) #error To use openmp compile and link with "-fopenmp" #endif #endif -- cgit v1.2.3-70-g09d2