{"thread":{"id":"3790","subject":"[PATCH] Solaris needs strings.h when using index().","startedAt":"2006-04-04T12:36:03Z","lastAt":"2006-04-04T18:44:29Z","messageCount":3,"participants":["Peter Eriksen","Junio C Hamano","H. Peter Anvin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"18342","messageId":"20060404123603.GA14071@bohr.gbar.dtu.dk","threadId":"3790","inReplyTo":null,"subject":"[PATCH] Solaris needs strings.h when using index().","fromName":"Peter Eriksen","fromEmail":"s022018@student.dtu.dk","sentAt":"2006-04-04T12:36:03Z","receivedAt":"2006-04-04T12:36:03Z","isPatch":true,"sender":{"key":"s022018@student.dtu.dk","avatar":null},"body":"From: Peter Eriksen <s022018@student.dtu.dk>\nDate: Tue Apr 4 14:33:14 2006 +0200\nSubject: [PATCH] Solaris needs strings.h when using index().\n\nSigned-off-by: Peter Eriksen <s022018@student.dtu.dk>\n\n\n---\n\n\n blame.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n832067e6e16ae6c1ac3bd043ddeb56daa993e682\ndiff --git a/blame.c b/blame.c\nindex 396defc..1a08434 100644\n--- a/blame.c\n+++ b/blame.c\n@@ -6,6 +6,7 @@ #include <assert.h>\n #include <time.h>\n #include <sys/time.h>\n #include <math.h>\n+#include <strings.h>\n \n #include \"cache.h\"\n #include \"refs.h\"\n-- \n1.3.0.rc1.gfc99-dirty\n"},{"id":"18351","messageId":"7vwte56w7n.fsf@assigned-by-dhcp.cox.net","threadId":"3790","inReplyTo":"20060404123603.GA14071@bohr.gbar.dtu.dk","subject":"Re: [PATCH] Solaris needs strings.h when using index().","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-04-04T18:18:20Z","receivedAt":"2006-04-04T18:18:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Peter Eriksen\" <s022018@student.dtu.dk> writes:\n\n> From: Peter Eriksen <s022018@student.dtu.dk>\n> Date: Tue Apr 4 14:33:14 2006 +0200\n> Subject: [PATCH] Solaris needs strings.h when using index().\n>\n> Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>\n\nI think somebody else noticed this the other day but I'm\nundecided if it is easier to replace use of index with strchr,\nsince we include <string.h> and use strchr() everywhere.\n"},{"id":"18353","messageId":"4432BE8D.3030504@zytor.com","threadId":"3790","inReplyTo":"7vwte56w7n.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Solaris needs strings.h when using index().","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-04-04T18:44:29Z","receivedAt":"2006-04-04T18:44:29Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Junio C Hamano wrote:\n> \"Peter Eriksen\" <s022018@student.dtu.dk> writes:\n> \n>> From: Peter Eriksen <s022018@student.dtu.dk>\n>> Date: Tue Apr 4 14:33:14 2006 +0200\n>> Subject: [PATCH] Solaris needs strings.h when using index().\n>>\n>> Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>\n> \n> I think somebody else noticed this the other day but I'm\n> undecided if it is easier to replace use of index with strchr,\n> since we include <string.h> and use strchr() everywhere.\n> \n\nstrchr() is definitely more portable.  The further away you get from BSD \nheritage, the less likely it is that you're going to see bzero, index, \net al whereas anything even remotely modern has memset, strchr, etc.\n\n\t-hpa\n"}]}