8#ifndef INCLUDED_BDLDFP_DECIMALPLATFORM
9#define INCLUDED_BDLDFP_DECIMALPLATFORM
141#include <bdlscm_version.h>
153#if 0 && defined(BSLS_PLATFORM_CMP_IBM) && defined(__IBM_DFP__) && __IBM_DFP__
156# define BDLDFP_DECIMALPLATFORM_C99_QNAN32 __d32_qNaN()
157# define BDLDFP_DECIMALPLATFORM_C99_QNAN64 __d64_qNaN()
158# define BDLDFP_DECIMALPLATFORM_C99_QNAN128 __d128_qNaN()
159# define BDLDFP_DECIMALPLATFORM_C99_SNAN32 __d32_sNaN()
160# define BDLDFP_DECIMALPLATFORM_C99_SNAN64 __d64_sNaN()
161# define BDLDFP_DECIMALPLATFORM_C99_SNAN128 __d128_sNaN()
163# define BDLDFP_DECIMALPLATFORM_C99_NO_FMAD64 1
165# if defined(__IBM_DFP_SW_EMULATION__) && __IBM_DFP_SW_EMULATION__
166# define BDLDFP_DECIMALPLATFORM_SOFTWARE 1
168# define BDLDFP_DECIMALPLATFORM_HARDWARE 1
170# define BDLDFP_DECIMALPLATFORM_C99_TR 1
172# define BDLDFP_DECIMALPLATFORM_SOFTWARE 1
177# define BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE 256
179#ifndef BDLDFP_DECIMALPLATFORM_C99_TR
181# define BDLDFP_DECIMALPLATFORM_INTELDFP 1
185#ifdef BDLDFP_DECIMALPLATFORM_C99_TR
186# define BDLDFP_DECIMALPLATFORM_DPD 1
187#elif defined(BDLDFP_DECIMALPLATFORM_INTELDFP)
188# define BDLDFP_DECIMALPLATFORM_BININT 1
190# error Unsupported decimal floating point platform.
198#ifdef BSLS_PLATFORM_IS_BIG_ENDIAN
199# define BDLDFP_DECIMALPLATFORM_BIG_ENDIAN 1
200#elif defined(BSLS_PLATFORM_IS_LITTLE_ENDIAN)
201# define BDLDFP_DECIMALPLATFORM_LITTLE_ENDIAN 1
203# error "Unsupported endianness"
207#define BDLDFP_DECIMALPLATFORM_COMPILER_ERROR BSLMF_ASSERT(false)
217#if BDLDFP_DECIMALPLATFORM_HARDWARE \
218 + BDLDFP_DECIMALPLATFORM_SOFTWARE != 1
219 #error "Exactly one decimal platform implementation class must be set."
225#if BDLDFP_DECIMALPLATFORM_BIG_ENDIAN \
226 + BDLDFP_DECIMALPLATFORM_LITTLE_ENDIAN != 1
227 #error "Exactly one decimal platform endian selection must be set."
233#if BDLDFP_DECIMALPLATFORM_DPD \
234 + BDLDFP_DECIMALPLATFORM_BININT != 1
235 #error "Exactly one decimal platform format selection must be set."
241#if BDLDFP_DECIMALPLATFORM_INTELDFP \
242 + BDLDFP_DECIMALPLATFORM_C99_TR != 1
243 #error "Exactly one decimal implementation library must be selected."
248#if defined(BDLDFP_DECIMALPLATFORM_INTELDFP) && \
249 !defined(BDLDFP_DECIMALPLATFORM_SOFTWARE) && \
250 !defined(BDLDFP_DECIMALPLATFORM_BININT)
251 #error "INTELDFP mode requires SOFTWARE and BININT modes to be set."
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_IDENT(str)
Definition bsls_ident.h:195