[GHC] #775: ctime_r call in Solaris 10 SPARC
GHC
trac at galois.com
Tue May 23 04:50:17 EDT 2006
#775: ctime_r call in Solaris 10 SPARC
--------------------------------------+-------------------------------------
Reporter: florenz at cs.tu-berlin.de | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 6.4.2
Severity: normal | Keywords:
Difficulty: Unknown | Architecture: sparc
Os: Solaris |
--------------------------------------+-------------------------------------
GHC 6.4.2 does not build on Solaris 10 because ctime_r takes three instead
of two arguments.
The error is in file ghc/rts/RtsUtils.c. I did a quickfix to continue
building but it is not very nice:
{{{
$ diff patched/ghc/rts/RtsUtils.c orig/ghc/rts/RtsUtils.c
190c190
< ctime_r(&now, nowstr, 26);
---
> ctime_r(&now, nowstr);
}}}
An extract of
$ man ctime
shows
{{{
SYNOPSIS
#include <time.h>
char *ctime(const time_t *clock);
struct tm *localtime(const time_t *clock);
struct tm *gmtime(const time_t *clock);
char *asctime(const struct tm *tm);
extern time_t timezone, altzone;
extern int daylight;
extern char *tzname[2];
void tzset(void);
char *ctime_r(const time_t *clock, char *buf, int buflen);
struct tm *localtime_r(const time_t *restrict clock, struct
tm *restrict res);
struct tm *gmtime_r(const time_t *restrict clock, struct tm
*restrict res);
char *asctime_r(const struct tm *restrict tm, char *restrict
buf, int buflen);
}}}
The exact OS version is
$ uname -a
SunOS bruja 5.10 Generic_118833-03 sun4u sparc SUNW,Sun-Fire
My suspect is that something in the autoconf spec is not correct for
Solaris 10.
Regards,
Florian
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/775>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list