This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
builtin_new
- To: ecos-discuss at sources dot redhat dot com
- Subject: [ECOS] builtin_new
- From: "J.RyosIII" <ryos at atom-tc dot or dot jp>
- Date: Sun, 19 Nov 2000 17:22:54 +0900
Hello all,
I have a problem.
by using gcc-20001113 snapshot, the compiler create a undefine simbol,
it is __builtin_new in fopen.cxx.
I checked fopen.cxx and found new operator is used in fopen.cxx,
but I could not find a declaration of new operator.
in kapi.cxx, I find a declaration of new operator.
so I applied a following patch to fopen.cxx to add a new operator.
66a67,72
> inline void *operator new(size_t size, void *ptr)
> {
> CYG_CHECK_DATA_PTR( ptr, "Bad pointer" );
> return ptr;
> }
>
152a159,161
> curr_stream = (Cyg_StdioStream *)malloc(sizeof(Cyg_StdioStream));
>
> /*
154a164
> */
160a171,172
>
> curr_stream = new((void *)curr_stream) Cyg_StdioStream( dev, open_mode,
append, binary, bufmode, bufsize );
Have I overlooked something?
thank you.
-----------
Suzuki,Ryouzaburou
ryos@atom-tc.or.jp