From 84fa033e9f7f1567f6174bf5e18cb7fb37914aa7 Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@his.com>
Date: Sat, 27 May 2023 00:34:15 +0000
Subject: [PATCH] issue #17: avoid _Static_assert from c++

---
 include/X11/Intrinsic.h  | 2 +-
 include/X11/IntrinsicP.h | 2 +-
 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");
-- 
GitLab