From 5a5a99145cf24e9d87a9b57691f15db1573d98d7 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Thu, 3 May 2018 16:26:13 +0200 Subject: [PATCH] bochs: fix ac++-caused preprocessor namespace clash When building with an experiment activated, the generated instantiate-.ah gets included in each and every FAIL* translation unit including Bochs's ones. In the case of the generic-experiment (and probably many others), this indirectly included Google protobuf headers, which failed to compile for Bochs's gui/wx.cc and gui/x.cc: The included X headers pollute the preprocessor namespace by an internal protobuf "Status" class. Change-Id: I613f5c792a9519cf2573eddc7fef6266c7168494 --- simulators/bochs/gui/wx.cc | 2 ++ simulators/bochs/gui/x.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/simulators/bochs/gui/wx.cc b/simulators/bochs/gui/wx.cc index f34f9eb5..33ed9243 100644 --- a/simulators/bochs/gui/wx.cc +++ b/simulators/bochs/gui/wx.cc @@ -1706,3 +1706,5 @@ static Bit32u convertStringToGDKKey (const char *string) #endif #endif /* if BX_WITH_WX */ + +#undef Status diff --git a/simulators/bochs/gui/x.cc b/simulators/bochs/gui/x.cc index c6d5ff38..0c7ba81c 100644 --- a/simulators/bochs/gui/x.cc +++ b/simulators/bochs/gui/x.cc @@ -2624,3 +2624,5 @@ BxEvent *x11_notify_callback (void *unused, BxEvent *event) } #endif /* if BX_WITH_X11 */ + +#undef Status