From ad89d029ed1910da284cd50eb05b8497eb531825 Mon Sep 17 00:00:00 2001 From: Orson Peters Date: Mon, 21 Jan 2013 22:29:24 +0100 Subject: [PATCH] more work --- src/fixedint.h | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/fixedint.h b/src/fixedint.h index 36ed50f..d03e4bd 100644 --- a/src/fixedint.h +++ b/src/fixedint.h @@ -4,9 +4,9 @@ Not a compatible replacement for , do not blindly use it as such. */ -#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__WATCOMC__) && (defined(_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_) || defined(__UINT_FAST64_TYPE__)) )) && !defined(PSTDINT_H_INCLUDED) +#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__WATCOMC__) && (defined(_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_) || defined(__UINT_FAST64_TYPE__)) )) && !defined(FIXEDINT_H_INCLUDED) #include - #define PSTDINT_H_INCLUDED + #define FIXEDINT_H_INCLUDED #if defined(__WATCOMC__) && __WATCOMC__ >= 1250 && !defined(UINT64_C) #include @@ -15,19 +15,8 @@ #endif -#ifndef PSTDINT_H_INCLUDED - #define PSTDINT_H_INCLUDED - - #if (defined(__STDC__) && defined(__STDC_VERSION__)) && (__STDC__ && __STDC_VERSION__ >= 199901L) - #if - typedef long long int64_t; - typedef unsigned long long uint64_t; - - #define UINT64_C(v) v ##ULL - #define INT64_C(v) v ##LL - #endif - #endif - +#ifndef FIXEDINT_H_INCLUDED + #define FIXEDINT_H_INCLUDED /* (u)int32_t */ #ifndef uint32_t @@ -52,15 +41,20 @@ #endif + /* (u)int64_t */ + #if (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC__ && __STDC_VERSION__ >= 199901L) + typedef long long int64_t; + typedef unsigned long long uint64_t; - - #if defined(__GNUC__) + #define UINT64_C(v) v ##ULL + #define INT64_C(v) v ##LL + #elif defined(__GNUC__) __extension__ typedef long long int64_t; __extension__ typedef unsigned long long uint64_t; #define UINT64_C(v) v ##ULL #define INT64_C(v) v ##LL - #elif defined(__MWERKS__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__APPLE_CC__) || defined(_LONG_LONG) || defined(_CRAYC) || defined(S_SPLINT_S) + #elif defined(__MWERKS__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__APPLE_CC__) || defined(_LONG_LONG) || defined(_CRAYC) typedef long long int64_t; typedef unsigned long long uint64_t;