Opened 18 months ago
#345 new enhancement
Multics C: Create a "limits.h" and other standard include files.
| Reported by: | Owned by: | Eric Swenson | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Administration | Version: | |
| Keywords: | Cc: |
Description
Multics C is "C87", i.e. enhanced K&R C. This is a pre-standard pre-ANSI (pre-C89) superset of K&R C (C78), roughly compatible with circa-1987 PCC/SGS as distributed with AT&T System V.
Multics C includes a non-standard "values.h" which defines some pre-ANSI standard definitions such as BITSPERBYTE, etc.
We should create a standard "limits.h" file, the following would be a good start:
#include <values.h>
#define CHAR_BIT BITSPERBYTE
#define CHAR_WIDTH CHAR_BIT
#define CHAR_MIN -256
#define CHAR_MAX 255
#define SCHAR_MIN CHAR_MIN
#define SCHAR_MAX CHAR_MAX
#define UCHAR_MIN 0
#define UCHAR_MAX 511
This would take care of the char types.
https://en.cppreference.com/w/c/types/limits shows other things this file should include. This would not interfere with or modify the existing non-standard "values.h".
This issue is mostly a placeholder for now - I intend to complete the limits.h to be C89 compliant, and provide some additional C89 headers as well.
