diff --git a/ChangeLog b/ChangeLog index 571f762d7f..b81aa1d825 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Mar 27 12:02:45 2013 Tanaka Akira + + * internal.h (TIMET_MAX_PLUS_ONE): definition simplified. + Wed Mar 27 06:39:41 2013 Nobuyoshi Nakada * lib/mkmf.rb (MAIN_DOES_NOTHING): force to refer symbols for tests diff --git a/internal.h b/internal.h index 5211411a06..fccbeb64f7 100644 --- a/internal.h +++ b/internal.h @@ -22,14 +22,11 @@ extern "C" { #if SIGNEDNESS_OF_TIME_T < 0 /* signed */ # define TIMET_MAX (time_t)((~(unsigned_time_t)0) >> 1) # define TIMET_MIN (time_t)(((unsigned_time_t)1) << (sizeof(time_t) * CHAR_BIT - 1)) -# define TIMET_MAX_PLUS_ONE \ - (((time_t)1 << (sizeof(time_t) * CHAR_BIT / 2)) * (double)((time_t)1 << (sizeof(time_t) * CHAR_BIT / 2 - 1))) #elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */ # define TIMET_MAX (time_t)(~(unsigned_time_t)0) # define TIMET_MIN (time_t)0 -# define TIMET_MAX_PLUS_ONE \ - (((time_t)1 << (sizeof(time_t) * CHAR_BIT / 2)) * (double)((time_t)1 << (sizeof(time_t) * CHAR_BIT / 2)))) #endif +#define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1)) struct rb_deprecated_classext_struct { char conflict[sizeof(VALUE) * 3];