While working on a canadian cross build I ran into a problem with the type of clock_t. If HAVE_CLOCK_T is not defined timevar.c defines it to be int. I think the type should be long. I am using the mingw compilers on linux in my canadian cross build and HAVE_CLOCK_T is not getting set but when building I get a conflict between the definition of clock_t in /usr/i586-mingw32msvc/include/time.h (long) and the definition in timevar.c.
Since mingw and linux and glibc and newlib all seem to agree on long I would like to change timevar.c to agree with them. Tested with my canadian cross build and a native x86 linux build. OK to checkin? Steve Ellcey sell...@mips.com 2013-11-01 Steve Ellcey <sell...@mips.com> * timevar.c: Fix type of clock_t. diff --git a/gcc/timevar.c b/gcc/timevar.c index 23b7118..b66f94a 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "timevar.h" #ifndef HAVE_CLOCK_T -typedef int clock_t; +typedef long clock_t; #endif #ifndef HAVE_STRUCT_TMS