summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@his.com>2023-05-27 00:34:15 +0000
committerThomas E. Dickey <dickey@his.com>2023-05-27 00:34:15 +0000
commit84fa033e9f7f1567f6174bf5e18cb7fb37914aa7 (patch)
treedfa4997e249b67dc6d480742a3ce315ff27c7d9d
parent64fca6a2d7cf4fee28ca2277ca6a8b7b32aee66e (diff)
issue #17: avoid _Static_assert from c++
-rw-r--r--include/X11/Intrinsic.h2
-rw-r--r--include/X11/IntrinsicP.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/X11/Intrinsic.h b/include/X11/Intrinsic.h
index 71199e7..94197f9 100644
--- a/include/X11/Intrinsic.h
+++ b/include/X11/Intrinsic.h
@@ -174,7 +174,7 @@ typedef unsigned short Dimension; /* Size in pixels */
typedef short Position; /* Offset from 0 coordinate */
typedef void* XtPointer;
-#if __STDC_VERSION__ >= 201112L
+#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
_Static_assert(sizeof(XtArgVal) >= sizeof(XtPointer), "XtArgVal too small");
_Static_assert(sizeof(XtArgVal) >= sizeof(long), "XtArgVal too small");
#endif
diff --git a/include/X11/IntrinsicP.h b/include/X11/IntrinsicP.h
index 21c5aca..a2d8a29 100644
--- a/include/X11/IntrinsicP.h
+++ b/include/X11/IntrinsicP.h
@@ -64,7 +64,7 @@ typedef struct {
XtIntPtr xrm_default_type; /* Default representation type quark */
XtPointer xrm_default_addr; /* Default resource address */
} XrmResource, *XrmResourceList;
-#if __STDC_VERSION__ >= 201112L
+#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
_Static_assert(XtOffsetOf(XrmResource, xrm_default_addr) ==
XtOffsetOf(XtResource, default_addr),
"Field offset mismatch");