compatibility checks fix for TIMED_DELAY

makedefs has been listing TIMED_DELAY as one of the options which
affects save file contents even though that hasn't been the case for
a long time.  Unfortunately, simply fixing that by itself would break
save file compatibility for anyone who has been building with it set.
This workaround prevents the fix from doing that.  And now folks can
rebuild after toggling TIMED_DELAY without unnecessarily invalidating
save and bones files.
This commit is contained in:
nethack.rankin
2002-08-15 02:48:34 +00:00
parent c9a52fa6bd
commit fab39a2007
3 changed files with 26 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)makedefs.c 3.4 2002/03/03 */
/* SCCS Id: @(#)makedefs.c 3.4 2002/08/14 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* Copyright (c) M. Stephenson, 1990, 1991. */
/* Copyright (c) Dean Luick, 1990. */
@@ -406,6 +406,18 @@ do_rumors()
return;
}
/*
* 3.4.1: way back in 3.2.1 `flags.nap' became unconditional but
* TIMED_DELAY was erroneously left in VERSION_FEATURES and has
* been there up through 3.4.0. Simply removing it now would
* break save file compatibility with 3.4.0 files, so we will
* explicitly mask it out during version checks.
* This should go away in the next version update.
*/
#define IGNORED_FEATURES ( 0L \
| (1L << 23) /* TIMED_DELAY */ \
)
static void
make_version()
{
@@ -465,9 +477,6 @@ make_version()
#endif
#ifdef SCORE_ON_BOTL
| (1L << 21)
#endif
#ifdef TIMED_DELAY
| (1L << 23)
#endif
/* data format [COMPRESS excluded] (27..31) */
#ifdef ZEROCOMP
@@ -569,6 +578,10 @@ do_date()
version.incarnation, ul_sfx);
Fprintf(ofp,"#define VERSION_FEATURES 0x%08lx%s\n",
version.feature_set, ul_sfx);
#ifdef IGNORED_FEATURES
Fprintf(ofp,"#define IGNORED_FEATURES 0x%08lx%s\n",
(unsigned long) IGNORED_FEATURES, ul_sfx);
#endif
Fprintf(ofp,"#define VERSION_SANITY1 0x%08lx%s\n",
version.entity_count, ul_sfx);
Fprintf(ofp,"#define VERSION_SANITY2 0x%08lx%s\n",