Mercurial > flash_v2
changeset 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 | 7423c71e5c19 |
| children | 9a2e186be457 |
| files | packages/compat/posix/current/ChangeLog packages/compat/posix/current/src/mqueue.cxx |
| diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/compat/posix/current/ChangeLog +++ b/packages/compat/posix/current/ChangeLog @@ -1,3 +1,7 @@ +2003-12-02 Sandeep <sandeep@codito.com> + + * src/mqueue.cxx (new): define a placement new instead of using <new> + 2003-11-19 Rickard Westman <rickard.westman@27m.se> * src/mqueue.cxx: Fix problem with mq_timedsend() and
--- 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 )
