From 446b0e69d53840e8366e5d328e06fd61bd577b63 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 30 Jan 2019 08:30:02 -0500 Subject: [PATCH] add a descriptive comment to integer.h --- include/integer.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/include/integer.h b/include/integer.h index b420a708f..e5ee19c75 100644 --- a/include/integer.h +++ b/include/integer.h @@ -2,7 +2,32 @@ /* Copyright (c) 2016 by Michael Allison */ /* NetHack may be freely redistributed. See license for details. */ -/* integer.h -- provide sized integer types */ +/* integer.h -- provide sized integer types + * + * We try to sort out a way to provide sized integer types + * in here. The strong preference is to try and let a + * compiler-supplied header file set up the types. + * + * If your compiler is C99 conforming and sets a value of + * __STDC_VERSION__ >= 199901L, then is supposed + * to be available for inclusion. + * + * If your compiler doesn't set __STDC_VERSION__ to indicate + * full conformance to C99, but does actually supply a suitable + * , you can pass a compiler flag -DHAS_STDINT_H + * during build to cause the inclusion of anyway. + * + * If doesn't get included, then the code in the + * STDINT_WORKAROUND section of code is not skipped and will + * be used to set up the types. + * + * We acknowledge that some ongoing maintenance may be needed + * over time if people send us code updates for making the + * determination of whether is available, or + * require adjustments to the base type used for some + * compiler/platform combinations. + * + */ #ifndef INTEGER_H #define INTEGER_H @@ -24,6 +49,9 @@ #endif #ifndef SKIP_STDINT_WORKAROUND /* !C99 */ +/* + * STDINT_WORKAROUND section begins here + */ typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; -- 2.40.0