Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* build problem in tcl/compat/strstr.c
@ 2007-02-14 13:25 Baurzhan Ismagulov
  2007-02-14 15:04 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Baurzhan Ismagulov @ 2007-02-14 13:25 UTC (permalink / raw)
  To: gdb

Hello all,

I'm building the current HEAD for --host arm-linux --target arm-linux on
an i686-linux build. tcl/compat/strstr.c references NULL, but doesn't
include anything. So the compilation fails for me.

The file gets included in the compilation since tcl/unix/configure
apparently tries to run a test, which fails since I cross-build, and
concludes that strstr is broken.

I've seen other packages recommending hard-coding stuff in cache files
for cross-compilation; I don't know whether we do this for gdb.

I don't mind having gdb's own strstr implementation compiled in, so I
did the hack below. An alternative were to check for stddef.h and
include it, otherwise defining NULL ourselves (I guess we shouldn't
include string.h since it could have a different prototype, which would
produce a warning).

How should we proceed?


With kind regards,
-- 
Baurzhan Ismagulov
http://www.kz-easy.com/


--- src.orig/tcl/compat/strstr.c	2003-01-21 20:39:57.000000000 +0100
+++ src/tcl/compat/strstr.c	2007-02-14 13:09:23.000000000 +0100
@@ -64,5 +64,5 @@ strstr(string, substring)
 	}
 	b = substring;
     }
-    return NULL;
+    return (void *)0;
 }


2007-02-14  Baurzhan Ismagulov  <ibr@radix50.net>

	* tcl/compat/strstr.c (strstr): Return (void *)0 instead of
	NULL.


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

end of thread, other threads:[~2007-02-14 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14 13:25 build problem in tcl/compat/strstr.c Baurzhan Ismagulov
2007-02-14 15:04 ` Daniel Jacobowitz
2007-02-14 15:14   ` Baurzhan Ismagulov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox