ignoring features when checking version compat

The nomakedefs stuff for cross-compiling support broke the code to
treat enabling or disabling some optional features as not breaking
save and bones file compatibility.  It was relying on a macro whose
definition was local to mdlib.c rather than propagated among files.
makedefs still constructs date.h with a value indicating the ignored
features but the actual compatability check doesn't use that anymore.
Toggling SCORE_ON_BOTL shouldn't have caused existing files to be
rejected but they were.
This commit is contained in:
PatR
2022-06-16 11:00:53 -07:00
parent 479945257b
commit 3806dae153
5 changed files with 45 additions and 30 deletions
+7 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.7 makedefs.c $NHDT-Date: 1645393932 2022/02/20 21:52:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.211 $ */
/* NetHack 3.7 makedefs.c $NHDT-Date: 1655402416 2022/06/16 18:00:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.215 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* Copyright (c) M. Stephenson, 1990, 1991. */
@@ -1285,10 +1285,12 @@ do_date(void)
ul_sfx);
Fprintf(ofp, "#define VERSION_FEATURES 0x%08lx%s\n", version.feature_set,
ul_sfx);
#ifdef MD_IGNORED_FEATURES
Fprintf(ofp, "#define IGNORED_FEATURES 0x%08lx%s\n",
(unsigned long) MD_IGNORED_FEATURES, ul_sfx);
#endif
{
unsigned long ignored_features = md_ignored_features();
Fprintf(ofp, "#define IGNORED_FEATURES 0x%08lx%s\n",
ignored_features, ul_sfx);
}
Fprintf(ofp, "#define VERSION_SANITY1 0x%08lx%s\n", version.entity_count,
ul_sfx);
#ifndef __EMSCRIPTEN__