added a static assertion in lib/hawk-cmn.h

This commit is contained in:
hyung-hwan 2020-08-19 04:28:38 +00:00
parent afb7fa41ff
commit 6602de8527

View File

@ -1331,8 +1331,12 @@ typedef enum hawk_log_mask_t hawk_log_mask_t;
# define HAWK_UT(txt) (u ## txt)
#else
# define HAWK_UT(txt) (L ## txt)
/* if this assertion fails, you should check the compiler flags determining the sizeof wchar_t */
HAWK_STATIC_ASSERT (sizeof(HAWK_UT('X')) == HAWK_SIZEOF_UCH_T);
#endif
/** \def HAWK_T
* The #HAWK_T macro maps to #HAWK_BT if #HAWK_OOCH_IS_BCH is defined, and to
* #HAWK_UT if #HAWK_OOCH_IS_UCH is defined.