diff options
Diffstat (limited to 'WWW/Library/Implementation/HTUtils.h')
-rw-r--r-- | WWW/Library/Implementation/HTUtils.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index 0bc6a66d..5cd1bef6 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTUtils.h,v 1.89 2008/09/24 00:20:35 tom Exp $ + * $LynxId: HTUtils.h,v 1.90 2008/12/14 19:34:34 tom Exp $ * * Utility macros for the W3 code library * MACROS FOR GENERAL USE @@ -547,17 +547,24 @@ extern int WWW_TraceMask; */ #if defined(HAVE_INTTYPES_H) && defined(SIZEOF_OFF_T) #if (SIZEOF_OFF_T == 8) && defined(PRId64) + #define PRI_off_t PRId64 #define SCN_off_t SCNd64 #define CAST_off_t(n) (int64_t)(n) + #elif (SIZEOF_OFF_T == 4) && defined(PRId32) + #define PRI_off_t PRId32 #define SCN_off_t SCNd32 -#if (SIZEOF_LONG == 4) + +#if (SIZEOF_INT == 4) +#define CAST_off_t(n) (int)(n) +#elif (SIZEOF_LONG == 4) #define CAST_off_t(n) (long)(n) #else #define CAST_off_t(n) (int32_t)(n) #endif + #endif #endif @@ -578,17 +585,24 @@ extern int WWW_TraceMask; */ #if defined(HAVE_INTTYPES_H) && defined(SIZEOF_TIME_T) #if (SIZEOF_TIME_T == 8) && defined(PRId64) + #define PRI_time_t PRId64 #define SCN_time_t SCNd64 #define CAST_time_t(n) (int64_t)(n) + #elif (SIZEOF_TIME_T == 4) && defined(PRId32) + #define PRI_time_t PRId32 #define SCN_time_t SCNd32 -#if (SIZEOF_LONG == 4) + +#if (SIZEOF_INT == 4) +#define CAST_time_t(n) (int)(n) +#elif (SIZEOF_LONG == 4) #define CAST_time_t(n) (long)(n) #else #define CAST_time_t(n) (int32_t)(n) #endif + #endif #endif |