Mercurial > ecos
diff packages/compat/posix/current/src/mqueue.cxx @ 1413:1a7ba46a9ed9
* src/mqueue.cxx (new): define a placement new instead of using <new>
| author | jlarmour |
|---|---|
| date | Tue, 02 Dec 2003 05:48:46 +0000 |
| parents | 8a5eb4ab7bf5 |
| children | 96df14bb938f |
line wrap: on
line diff
--- a/packages/compat/posix/current/src/mqueue.cxx +++ b/packages/compat/posix/current/src/mqueue.cxx @@ -79,7 +79,6 @@ #include <stdarg.h> // varargs #include <pthread.h> // mutexes #include <string.h> // strncpy -#include <new> // C++ new #ifdef CYGFUN_POSIX_MQUEUE_NOTIFY # include <signal.h> # include "pprivate.h" // cyg_sigqueue() @@ -133,6 +132,13 @@ static pthread_mutex_t mqtab_mut = PTHRE //------------------------------------------------------------------------ +// placement new definition +inline void *operator new(size_t size, void *ptr) +{ + CYG_CHECK_DATA_PTR( ptr, "Bad pointer" ); + return ptr; +} + // Deallocation callback from Cyg_Mqueue static void my_free( void *ptr, size_t )
