From b5919771aea2d43c64be381b7d7b395eeb1191bd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 14 Apr 2015 00:58:07 -0700 Subject: [PATCH] Assume C89 offsetof in xterm.c, xlwmenu.c * lwlib/xlwmenu.c (offset): * src/xterm.c (cvt_string_to_pixel_args): Use offsetof, not XtOffset. --- lwlib/xlwmenu.c | 2 +- src/xterm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 9317dea02b0..61f175b3c25 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -105,7 +105,7 @@ xlwMenuTranslations [] = /* FIXME: F10 should enter the menu, the first one in the menu-bar. */ -#define offset(field) XtOffset(XlwMenuWidget, field) +#define offset(field) offsetof (XlwMenuRec, field) static XtResource xlwMenuResources[] = { diff --git a/src/xterm.c b/src/xterm.c index e904343387c..48b250b81a3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1378,9 +1378,9 @@ x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap static XtConvertArgRec cvt_string_to_pixel_args[] = { - {XtWidgetBaseOffset, (XtPointer) XtOffset (Widget, core.screen), + {XtWidgetBaseOffset, (XtPointer) offsetof (WidgetRec, core.screen), sizeof (Screen *)}, - {XtWidgetBaseOffset, (XtPointer) XtOffset (Widget, core.colormap), + {XtWidgetBaseOffset, (XtPointer) offsetof (WidgetRec, core.colormap), sizeof (Colormap)} }; -- 2.39.2