From c891066bf118bd017e52e795ad41efb20ffb4f40 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 23 Jun 2023 13:15:01 -0400 Subject: [PATCH] cppregex.cpp: move NetHack includes below c++ includes Avoid a conflict with c++ std header file on at least one platform. Build log prior: In file included from DKA100:[DEVEL.nethack-37.sys.share]cppregex.cpp;1:12: In file included from /SYS$COMMON/VSICXX$LIB/INCLUDE/LIB_CXX/INCLUDE/regex:768: In file included from /SYS$COMMON/VSICXX$LIB/INCLUDE/LIB_CXX/INCLUDE/stdexcept:5 1: In file included from /SYS$COMMON/VSICXX$LIB/INCLUDE/LIB_CXX/INCLUDE/exception:8 7: In file included from /SYS$COMMON/VSICXX$LIB/INCLUDE/LIB_CXX/INCLUDE/cstdlib:91: In file included from /SYS$COMMON/VSICXX$LIB/INCLUDE/LIB_CXX/INCLUDE/stdlib.h:10 3: /SYS$COMMON/VSICXX$LIB/INCLUDE/DECC$RTLDEF/stdlib.h:200:24: error: too many argu ments provided to function-like macro invocation void abort (void); ^ ../INCLUDE/vmsconf.h:307:9: note: macro 'abort' defined here #define abort() vms_abort() /* vmsmisc.c */ ^ --- sys/share/cppregex.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/share/cppregex.cpp b/sys/share/cppregex.cpp index eeec30b98..75cfa6123 100644 --- a/sys/share/cppregex.cpp +++ b/sys/share/cppregex.cpp @@ -3,15 +3,16 @@ /* Copyright (c) Sean Hunt 2015. */ /* NetHack may be freely redistributed. See license for details. */ +#include +#include +#include + extern "C" { #include "config.h" #define CPPREGEX_C #include "extern.h" } // extern "C" -#include -#include -#include extern "C" { // rest of file