git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Solaris needs strings.h when using index().
@ 2006-04-04 12:36 Peter Eriksen
  2006-04-04 18:18 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Eriksen @ 2006-04-04 12:36 UTC (permalink / raw)
  To: git

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>


---


 blame.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

832067e6e16ae6c1ac3bd043ddeb56daa993e682
diff --git a/blame.c b/blame.c
index 396defc..1a08434 100644
--- a/blame.c
+++ b/blame.c
@@ -6,6 +6,7 @@ #include <assert.h>
 #include <time.h>
 #include <sys/time.h>
 #include <math.h>
+#include <strings.h>
 
 #include "cache.h"
 #include "refs.h"
-- 
1.3.0.rc1.gfc99-dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Solaris needs strings.h when using index().
  2006-04-04 12:36 [PATCH] Solaris needs strings.h when using index() Peter Eriksen
@ 2006-04-04 18:18 ` Junio C Hamano
  2006-04-04 18:44   ` H. Peter Anvin
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2006-04-04 18:18 UTC (permalink / raw)
  To: Peter Eriksen; +Cc: git

"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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Solaris needs strings.h when using index().
  2006-04-04 18:18 ` Junio C Hamano
@ 2006-04-04 18:44   ` H. Peter Anvin
  0 siblings, 0 replies; 3+ messages in thread
From: H. Peter Anvin @ 2006-04-04 18:44 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Peter Eriksen, git

Junio C Hamano wrote:
> "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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-04 18:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-04 12:36 [PATCH] Solaris needs strings.h when using index() Peter Eriksen
2006-04-04 18:18 ` Junio C Hamano
2006-04-04 18:44   ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).