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

Re: [PATCH] Solaris needs strings.h when using index().

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Apr 4, 2006, 18:44 UTC
Message-ID
<4432BE8D.3030504@zytor.com>
In-Reply-To
<7vwte56w7n.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
> "Peter Eriksen" <s022018@student.dtu.dk> writes:
> 
>> From: Peter Eriksen <s022018@student.dtu.dk>
>> Date: Tue Apr 4 14:33:14 2006 +0200
>> Subject: [PATCH] Solaris needs strings.h when using index().
>>
>> Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
> 
> I think somebody else noticed this the other day but I'm
> undecided if it is easier to replace use of index with strchr,
> since we include <string.h> and use strchr() everywhere.
> 

strchr() is definitely more portable. The further away you get from BSD heritage, the less likely it is that you're going to see bzero, index, et al whereas anything even remotely modern has memset, strchr, etc.

	-hpa
Previous: Junio C Hamano
Message 3 of 3 in “Solaris needs strings.h when using index().”
  1. Solaris needs strings.h when using index().Peter Eriksen, Apr 4, 2006
  2. Junio C HamanoApr 4, 2006
  3. H. Peter AnvinApr 4, 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.