This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
new operator in fopen.cxx
- From: Broeske Marty-FMB223 <fmb223 at motorola dot com>
- To: "'ecos-discuss at sources dot redhat dot com'" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 6 Feb 2002 10:37:22 -0600
- Subject: [ECOS] new operator in fopen.cxx
Hey,
I have had errors when linking with fopen() that the new operator is not defined. Seaching through the source I found that in all other instances where new is used the operator is defined within the module (see mutex.cxx). I solved my problem by including the following definition in fopen.cxx.
inline void *operator new(size_t size) { return calloc(1,size); };
I really don't feel good about this. I'm not a C++ expert but shouldn't there be a global definition for new somewhere?
So it goes...
Marty Broeske
mbroeske@oddparity.com