diff options
Diffstat (limited to 'WWW/Library/Implementation/HTUtils.h')
-rw-r--r-- | WWW/Library/Implementation/HTUtils.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index cdc3442d..0bc6a66d 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTUtils.h,v 1.87 2008/09/17 16:31:34 tom Exp $ + * $LynxId: HTUtils.h,v 1.89 2008/09/24 00:20:35 tom Exp $ * * Utility macros for the W3 code library * MACROS FOR GENERAL USE @@ -550,15 +550,19 @@ extern int WWW_TraceMask; #define PRI_off_t PRId64 #define SCN_off_t SCNd64 #define CAST_off_t(n) (int64_t)(n) -#elif defined(PRId32) +#elif (SIZEOF_OFF_T == 4) && defined(PRId32) #define PRI_off_t PRId32 #define SCN_off_t SCNd32 +#if (SIZEOF_LONG == 4) +#define CAST_off_t(n) (long)(n) +#else #define CAST_off_t(n) (int32_t)(n) #endif #endif +#endif #ifndef PRI_off_t -#if (SIZEOF_OFF_T == 8) +#if (SIZEOF_OFF_T > SIZEOF_LONG) #define PRI_off_t "lld" #define SCN_off_t "lld" #define CAST_off_t(n) (long long)(n) @@ -577,15 +581,19 @@ extern int WWW_TraceMask; #define PRI_time_t PRId64 #define SCN_time_t SCNd64 #define CAST_time_t(n) (int64_t)(n) -#elif defined(PRId32) +#elif (SIZEOF_TIME_T == 4) && defined(PRId32) #define PRI_time_t PRId32 #define SCN_time_t SCNd32 +#if (SIZEOF_LONG == 4) +#define CAST_time_t(n) (long)(n) +#else #define CAST_time_t(n) (int32_t)(n) #endif #endif +#endif #ifndef PRI_time_t -#if (SIZEOF_TIME_T == 8) +#if (SIZEOF_TIME_T > SIZEOF_LONG) #define PRI_time_t "lld" #define SCN_time_t "lld" #define CAST_time_t(n) (long long)(n) |