* 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
* Re: build problem in tcl/compat/strstr.c
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
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-02-14 15:04 UTC (permalink / raw)
To: gdb
On Wed, Feb 14, 2007 at 01:35:58PM +0100, Baurzhan Ismagulov wrote:
> 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?
Please either ask the Insight list, who may care, or else use
--disable-gdbtk when cross compiling; GDB itself does not use TCL.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: build problem in tcl/compat/strstr.c
2007-02-14 15:04 ` Daniel Jacobowitz
@ 2007-02-14 15:14 ` Baurzhan Ismagulov
0 siblings, 0 replies; 3+ messages in thread
From: Baurzhan Ismagulov @ 2007-02-14 15:14 UTC (permalink / raw)
To: gdb
Hello Daniel,
On Wed, Feb 14, 2007 at 07:42:44AM -0500, Daniel Jacobowitz wrote:
> On Wed, Feb 14, 2007 at 01:35:58PM +0100, Baurzhan Ismagulov wrote:
> > 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?
>
> Please either ask the Insight list, who may care, or else use
> --disable-gdbtk when cross compiling; GDB itself does not use TCL.
This helps, thanks for the fast response!
With kind regards,
--
Baurzhan Ismagulov
http://www.kz-easy.com/
^ 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