git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Aug 5, 2006, 17:11 UTC
Message-ID
<000101c6b8b2$30c76060$c47eedc1@ramsay1.demon.co.uk>
In-Reply-To
<Pine.LNX.4.63.0608040211160.1800@wbgn013.biozentrum.uni-wuerzburg.de>
On Fri, 2006-08-04 at 1:20, Johannes Schindelin wrote:
Show 28 quoted lines
> 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
Previous: Johannes Schindelin
Message 5 of 5 in “Fix header breakage with _XOPEN_SOURCE.”
  1. 6/10 Fix header breakage with _XOPEN_SOURCE.Ramsay Jones, Aug 2, 2006
  2. Junio C HamanoAug 2, 2006
  3. Ramsay JonesAug 2, 2006
  4. Johannes SchindelinAug 4, 2006
  5. Ramsay JonesAug 5, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.