vms update
Suppress Isaac64 on VAX were there isn't an easy way to do 64-bit arithmetic. (Hard way isn't worth it for just an alternate RNG.) Eliminate or suppress some diagnostics: 1) In strict ANSI mode, DEC C was reporting that '$' in identifier is an extension (one time for each file in sys/vms/*.c). (It doesn't do that for the default 'relaxed ANSI' mode.) 2) DEC C uses WIDENED_PROTOTYPES but widens uchar (unsigned char) differently depending upon the mode it is operating in. (Applies to Unix as well as VMS; based on documentation rather than testing.) Update the comment in tradstdc.h about WIDENED vs UNWIDENED_PROTOTYPES. An old comment in config1.h about a problem with the earliest version of DEC C was probably based on an incorrect assumption of what was really going, but I have no way to go back in time to verify that....
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1545270756 2018/12/20 01:52:36 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.34 $ */
|
||||
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1552007504 2019/03/08 01:11:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.35 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -278,12 +278,16 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* According to ANSI, prototypes for old-style declarations must widen the
|
||||
* arguments to int. However, the MSDOS compilers accept shorter arguments
|
||||
* (char, short, etc.) in prototypes and do typechecking with them. Therefore
|
||||
* this mess to allow the better typechecking while also allowing some
|
||||
* prototypes for the ANSI compilers so people quit trying to fix the
|
||||
* prototypes to match the standard and thus lose the typechecking.
|
||||
* According to ANSI C, prototypes for old-style function definitions like
|
||||
* int func(arg) short arg; { ... }
|
||||
* must specify widened arguments (char and short to int, float to double),
|
||||
* int func(int);
|
||||
* same as how narrow arguments get passed when there is no prototype info.
|
||||
* However, various compilers accept shorter arguments (char, short, etc.)
|
||||
* in prototypes and do typechecking with them. Therefore this mess to
|
||||
* allow the better typechecking while also allowing some prototypes for
|
||||
* the ANSI compilers so people quit trying to fix the prototypes to match
|
||||
* the standard and thus lose the typechecking.
|
||||
*/
|
||||
#if defined(MSDOS) && !defined(__GO32__)
|
||||
#define UNWIDENED_PROTOTYPES
|
||||
@@ -332,7 +336,9 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
||||
#ifdef WIDENED_PROTOTYPES
|
||||
#define CHAR_P int
|
||||
#define SCHAR_P int
|
||||
#ifndef UCHAR_P
|
||||
#define UCHAR_P int
|
||||
#endif
|
||||
#define XCHAR_P int
|
||||
#define SHORT_P int
|
||||
#define BOOLEAN_P int
|
||||
|
||||
Reference in New Issue
Block a user