This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

builtin_new


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]