ctime_r call in Solaris 10 SPARC
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
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |