This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: A question about _impure_ptr
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: eCos at sunnorth dot com dot cn
- Cc: ecos-discuss at ecos dot sourceware dot org, Andrew Lunn <andrew at lunn dot ch>
- Date: Sat, 15 Sep 2007 19:39:34 +0100
- Subject: [ECOS] Re: A question about _impure_ptr
- References: <OFF5AF5691.2CF8C6AD-ON48257357.0010D9E0-48257357.0016D71D@sunnorth.com.cn>
eCos@sunnorth.com.cn wrote:
> Dear all:
> I have another question about _impure_ptr.
> In a gcc4.2 compiler from codesourcery, the cplusplus library libstdc++
> uses a void * _impure_ptr pointer which is implemented in newlib. Now as
> far as eCos concerned, because eCos provides its own newlib(c library) and
> _impure_ptr isn't implemented in its c library, linker will complain
> "undefined _impure_ptr".
> How to solve this problem?
You can either rebuild the codesourcery tools using eCos, or just define
your own:
void *_impure_ptr;
Be warned if you do the latter, theoretically it could cause problems, but
I don't think it applies to C code. Even in C++ code, last time I looked,
it was only used for displaying an assertion failure message before
termination, so crashing at that point wouldn't be such a big deal - you
just won't know why until you look closer.
BTW, please do not CC ecos-discuss-owner. That is for mailing list issues
only.
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------ Opinions==mine
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss