X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=internals%2F_PDCLIB_int.h;h=b0c79146f4e1bf481586875464d9ed622959e457;hp=ecf8f66acc77211a28e12cd05341f6c49e004d23;hb=21fd32d9b884bcd1adb78c04b99668a1cb4bc3aa;hpb=d7f375a09a9912bb18ad42f1442fbf64311bfed6 diff --git a/internals/_PDCLIB_int.h b/internals/_PDCLIB_int.h index ecf8f66..b0c7914 100644 --- a/internals/_PDCLIB_int.h +++ b/internals/_PDCLIB_int.h @@ -12,8 +12,8 @@ /* would be considered a bug / missing feature: notify the author(s). */ /* -------------------------------------------------------------------------- */ -#include <_PDCLIB_config.h> -#include <_PDCLIB_aux.h> +#include "_PDCLIB_config.h" +#include "_PDCLIB_aux.h" /* null pointer constant */ #define _PDCLIB_NULL 0 @@ -33,7 +33,7 @@ #define _PDCLIB_UCHAR_MAX 0xff #define _PDCLIB_SCHAR_MIN (-0x7f - 1) #define _PDCLIB_SCHAR_MAX 0x7f -#ifdef _PDCLIB_CHAR_SIGNED +#if _PDCLIB_CHAR_SIGNED == 1 #define _PDCLIB_CHAR_MIN _PDCLIB_SCHAR_MIN #define _PDCLIB_CHAR_MAX _PDCLIB_SCHAR_MAX #else @@ -306,15 +306,19 @@ extern char _PDCLIB_Xdigits[]; /* -------------------------------------------------------------------------- */ #if _PDCLIB_C_VERSION >= 2011 -_Static_assert( sizeof( short ) == _PDCLIB_SHRT_BYTES, "_PDCLIB_SHRT_BYTES incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( sizeof( int ) == _PDCLIB_INT_BYTES, "_PDCLIB_INT_BYTES incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( sizeof( long ) == _PDCLIB_LONG_BYTES, "_PDCLIB_LONG_BYTES incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( sizeof( long long ) == _PDCLIB_LLONG_BYTES, "_PDCLIB_LLONG_BYTES incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( ( (char)-1 < 0 ) == _PDCLIB_CHAR_SIGNED, "_PDCLIB_CHAR_SIGNED incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( sizeof( _PDCLIB_wchar ) == sizeof( L'x' ), "_PDCLIB_wchar incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( sizeof( void * ) == sizeof( _PDCLIB_intptr ), "_PDCLIB_intptr incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( sizeof( sizeof( 1 ) ) == sizeof( _PDCLIB_size ), "_PDCLIB_size incorrectly defined, check _PDCLIB_config.h" ); -_Static_assert( sizeof( &_PDCLIB_digits[1] - &_PDCLIB_digits[0] ) == sizeof( _PDCLIB_ptrdiff ), "_PDCLIB_ptrdiff incorrectly defined, check _PDCLIB_config.h" ); +_Static_assert( sizeof( short ) == _PDCLIB_SHRT_BYTES, "Compiler disagrees on _PDCLIB_SHRT_BYTES." ); +_Static_assert( sizeof( int ) == _PDCLIB_INT_BYTES, "Compiler disagrees on _PDCLIB_INT_BYTES." ); +_Static_assert( sizeof( long ) == _PDCLIB_LONG_BYTES, "Compiler disagrees on _PDCLIB_LONG_BYTES." ); +_Static_assert( sizeof( long long ) == _PDCLIB_LLONG_BYTES, "Compiler disagrees on _PDCLIB_LLONG_BYTES." ); + +_Static_assert( ( (char)-1 < 0 ) == _PDCLIB_CHAR_SIGNED, "Compiler disagrees on _PDCLIB_CHAR_SIGNED." ); +_Static_assert( sizeof( sizeof( int ) ) == sizeof( _PDCLIB_size ), "Compiler disagrees on _PDCLIB_size." ); + +_Static_assert( sizeof( _PDCLIB_wchar ) == sizeof( L'x' ), "Compiler disagrees on _PDCLIB_wchar." ); + +_Static_assert( sizeof( void * ) == sizeof( _PDCLIB_intptr ), "Compiler disagrees on _PDCLIB_intptr." ); + +_Static_assert( sizeof( &_PDCLIB_digits[1] - &_PDCLIB_digits[0] ) == sizeof( _PDCLIB_ptrdiff ), "Compiler disagrees on _PDCLIB_ptrdiff." ); #endif /* -------------------------------------------------------------------------- */