]> granicus.if.org Git - nethack/commitdiff
more UCHAR_P
authorPatR <rankin@nethack.org>
Fri, 8 Mar 2019 19:48:31 +0000 (11:48 -0800)
committerPatR <rankin@nethack.org>
Fri, 8 Mar 2019 19:48:31 +0000 (11:48 -0800)
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
include/vmsconf.h

index 63dbddcaed2314eb798988b5729679a05683b444..b7c5cabe005eb22de269e56e03486952c1bd6614 100644 (file)
@@ -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. */
 /* 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
 
 /*
index da77be35a6d139a0c65b07df8ad3bd5715c7618b..bebe6b468f670258817f427791027bf263a5c3eb 100644 (file)
@@ -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