From fb9a290b72cf3d3cdbafc91de2ba3249fb52d71e Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Thu, 21 Apr 2022 20:43:14 -0400 Subject: cleanup and update --- inttypes.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'inttypes.h') diff --git a/inttypes.h b/inttypes.h index 7c24164..eb52fd6 100644 --- a/inttypes.h +++ b/inttypes.h @@ -27,10 +27,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !(defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__) -# error requires C99 or higher -#endif +/* TODO: replace WORD_BIT with __LP32__, __ILP32__, __ILP64__, __LLP64__ */ +#if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__) #include #define PRIX16 "hX" @@ -277,8 +276,6 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; -typedef long long int intmax_t; -typedef unsigned long long int uintmax_t; intmax_t imaxabs(intmax_t); imaxdiv_t imaxdiv(intmax_t, intmax_t); @@ -286,5 +283,10 @@ intmax_t strtoimax(const char * restrict, char ** restrict, int); uintmax_t strtoumax(const char *restrict, char ** restrict, int); intmax_t wcstoimax(const wchar_t * restrict, wchar_t ** restrict, int); uintmax_t wcstoumax(const wchar_t * restrict, wchar_t ** restrict, int); +#endif + +#if (defined _XOPEN_SOURCE && 500 <= _XOPEN_SOURCE && _XOPEN_SOURCE < 600) +/* TODO: {u,}int{8,16,32,64}_t, {u,}intptr_t */ +#endif #endif -- cgit v1.2.1