RE: [PATCH 6/10] Fix header breakage with _XOPEN_SOURCE.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 4, 2006, 00:19 UTC
- Message-ID
- <Pine.LNX.4.63.0608040211160.1800@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <001d01c6b664$285ff540$c47eedc1@ramsay1.demon.co.uk>
Hi,
On Wed, 2 Aug 2006, Ramsay Jones wrote:
> [...] but strptime() remains undeclared.
Note that there is just one call to strptime() in the C sources: convert-objects.
Also, we have something more portable in git now: you might be able to substitute
const char *next = strptime(buf, *fmt, &tm);
if (next) {by something like
char buffer[50]; int len = parse_date(buf, buffer, sizeof(buffer)); const char *next = buf + len;
if (len) {
const char *tzstring = strchr(buffer, ' ') + 1;
int tz = (int)strtol(tzstring, NULL, 10);
tm = *time_to_tm(strtoul(buffer, NULL, 10), tz);However, I did not test it, and this might be completely bogus.
Ciao, Dscho