--- a/src/gui/Makefile.am 2023-05-07 17:28:07.963906346 -0400 +++ b/src/gui/Makefile.am 2023-05-07 17:28:11.158866027 -0400 @@ -1,9 +1,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/include noinst_LIBRARIES = libgui.a -libgui_a_SOURCES = sdlmain.cpp sdl_mapper.cpp dosbox_logo.h \ +libgui_a_SOURCES = sdlmain.cpp sdl_mapper.cpp cpp_compat.h dosbox_logo.h \ render.cpp render_scalers.cpp render_scalers.h \ render_templates.h render_loops.h render_simple.h \ render_templates_sai.h render_templates_hq.h \ render_templates_hq2x.h render_templates_hq3x.h \ midi.cpp midi_win32.h midi_oss.h midi_coreaudio.h midi_alsa.h \ --- a/src/gui/render_templates_sai.h 2023-05-07 17:22:19.173307921 -0400 +++ b/src/gui/render_templates_sai.h 2023-05-07 17:22:55.911844297 -0400 @@ -14,10 +14,12 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "cpp_compat.h" + static inline int conc2d(GetResult,SBPP)(PTYPE A, PTYPE B, PTYPE C, PTYPE D) { const bool ac = (A==C); const bool bc = (B==C); const int x1 = ac; const int y1 = (bc & !ac); @@ -41,11 +43,11 @@ inline void conc2d(Super2xSaI,SBPP)(PTYP if (C7 == C5 && C4 != C8) { line1[1] = line0[1] = C7; } else if (C4 == C8 && C7 != C5) { line1[1] = line0[1] = C4; } else if (C4 == C8 && C7 == C5) { - register int r = 0; + REGISTER int r = 0; r += conc2d(GetResult,SBPP)(C5,C4,C6,D1); r += conc2d(GetResult,SBPP)(C5,C4,C3,C1); r += conc2d(GetResult,SBPP)(C5,C4,D2,D5); r += conc2d(GetResult,SBPP)(C5,C4,C2,D4); @@ -125,11 +127,11 @@ inline void conc2d(SuperEagle,SBPP)(PTYP line1[0] = interp_w2(C4,C7,3U,1U); } else { line1[0] = interp_w2(C7,C8,1U,1U); } } else { - register int r = 0; + REGISTER int r = 0; r += conc2d(GetResult,SBPP)(C5,C4,C6,D1); r += conc2d(GetResult,SBPP)(C5,C4,C3,C1); r += conc2d(GetResult,SBPP)(C5,C4,D2,D5); r += conc2d(GetResult,SBPP)(C5,C4,C2,D4); @@ -183,11 +185,11 @@ inline void conc2d(_2xSaI,SBPP)(PTYPE * if (C4 == C5) { line0[1] = C4; line1[0] = C4; line1[1] = C4; } else { - register int r = 0; + REGISTER int r = 0; r += conc2d(GetResult,SBPP)(C4,C5,C3,C1); r -= conc2d(GetResult,SBPP)(C5,C4,D4,C2); r -= conc2d(GetResult,SBPP)(C5,C4,C6,D1); r += conc2d(GetResult,SBPP)(C4,C5,D5,D2); --- /dev/null 2023-04-17 21:04:02.077579196 -0400 +++ b/src/gui/cpp_compat.h 2023-05-07 17:25:20.687017303 -0400 @@ -0,0 +1,10 @@ +#ifndef DOSBOX_CPP_COMPAT_H +#define DOSBOX_CPP_COMPAT_H + +#if __cplusplus < 201703L +#define REGISTER register +#else +#define REGISTER +#endif + +#endif