From 02b21865fd288626db6984d963078afd0ec34716 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 8 Mar 2019 11:48:31 -0800 Subject: [PATCH] more UCHAR_P When setting up an alternate definition for UCHAR_P to accommodate DEC C's non-ANSI mode(s), leave the default definition to tradstdc.h. DEC C's VAXC mode will end up expecting 'unsigned char' rather than either 'int' or 'unsigned int'. Not applicable for Unix but this makes similar change there as is being made for VMS. --- include/unixconf.h | 4 +--- include/vmsconf.h | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/unixconf.h b/include/unixconf.h index 63dbddcae..b7c5cabe0 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 unixconf.h $NHDT-Date: 1552007506 2019/03/08 01:11:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.40 $ */ +/* NetHack 3.6 unixconf.h $NHDT-Date: 1552074505 2019/03/08 19:48:25 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.41 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -274,8 +274,6 @@ /* Digital Unix/HP Tru64 -- see vmsconf.h for explanation */ #if defined(__DECC) && (!defined(__STDC__) || !__STDC__) #define UCHAR_P unsigned int -#else -#define UCHAR_P int #endif /* diff --git a/include/vmsconf.h b/include/vmsconf.h index da77be35a..bebe6b468 100644 --- a/include/vmsconf.h +++ b/include/vmsconf.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 vmsconf.h $NHDT-Date: 1552007507 2019/03/08 01:11:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.28 $ */ +/* NetHack 3.6 vmsconf.h $NHDT-Date: 1552074506 2019/03/08 19:48:26 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.29 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -192,6 +192,8 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then #endif #endif +/* tradstdc.h has't set this up yet, but config1.h might have */ +#ifndef UNWIDENED_PROTOTYPES /* ANSI C uses "value preserving rules", where 'unsigned char' and 'unsigned short' promote to 'int' if signed int is big enough to hold all possible values, rather than traditional "sign preserving rules" @@ -203,8 +205,7 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then default 'relaxed' mode, __STDC__ is 1 and uchar widens to 'int'.) */ #if defined(__DECC) && (!defined(__STDC__) || !__STDC__) #define UCHAR_P unsigned int -#else -#define UCHAR_P int +#endif #endif #ifdef __DECC -- 2.40.0