[ECOS] builtin_new

J.RyosIII ryos@atom-tc.or.jp
Sun Nov 19 00:22:00 GMT 2000


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


More information about the Ecos-discuss mailing list