RE: [PATCH 6/10] Fix header breakage with _XOPEN_SOURCE.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-08-04 at 1:20, Johannes Schindelin wrote:
> 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.
> 

Yes, I'm sure something like that could be done, but I really don't
think we need anything that intrusive to fix such a simple problem.
Indeed, I would rather Junio ignore the patch if it appears to cause
anyone else a problem. I can maintain it locally (it's only one line!).
After all, I'm pretty sure I'm the only idiot^H^H^H^H^H person using a
six year old dev system.

Ramsay


-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]