Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Baurzhan Ismagulov <ibr@radix50.net>
To: gdb@sourceware.org
Subject: build problem in tcl/compat/strstr.c
Date: Wed, 14 Feb 2007 13:25:00 -0000	[thread overview]
Message-ID: <20070214123558.GD10538@radix50.net> (raw)

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.


             reply	other threads:[~2007-02-14 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14 13:25 Baurzhan Ismagulov [this message]
2007-02-14 15:04 ` Daniel Jacobowitz
2007-02-14 15:14   ` Baurzhan Ismagulov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070214123558.GD10538@radix50.net \
    --to=ibr@radix50.net \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox