X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsUtils.c;h=ef7cbb72e2d06329161e8e7da4f892aa9b593fc4;hb=3eacdc7faf0d0e87a7201253f9f12c1fb4db7249;hp=b54d3da6d2883fc620bc168f77325c8de6edc9bf;hpb=28cb5a23923dec35e463a6296171cb6f30f3dc1e;p=ghc-hetmet.git diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index b54d3da..ef7cbb7 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -189,9 +189,13 @@ time_str(void) if (now == 0) { time(&now); +#if HAVE_CTIME_R + ctime_r(&now, nowstr); +#else strcpy(nowstr, ctime(&now)); - strcpy(nowstr+16,nowstr+19); - nowstr[21] = '\0'; +#endif + memmove(nowstr+16,nowstr+19,7); + nowstr[21] = '\0'; // removes the \n } return nowstr; }