Fix usb_asix build under gcc4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33297 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2009-09-25 17:03:14 +00:00
parent a0556a1df2
commit d0f3c92bb2
3 changed files with 48 additions and 1 deletions

View File

@ -23,6 +23,8 @@
#include <stdlib.h>
#include <stdio.h>
#include "kernel_cpp.h"
#define DRIVER_NAME "usb_asix"
#define MAX_DEVICES 8

View File

@ -71,7 +71,7 @@ void usb_asix_trace(bool force, const char* func, const char *fmt, ...)
}
va_list arg_list;
static char *prefix = "\33[33m"DRIVER_NAME":\33[0m";
static const char *prefix = "\33[33m"DRIVER_NAME":\33[0m";
static char buffer[1024];
char *buf_ptr = buffer;
if(gLogFilePath == NULL){

View File

@ -0,0 +1,45 @@
#ifndef _KERNEL_CPP_H_
#define _KERNEL_CPP_H_
#include <malloc.h>
inline void *
operator new(size_t size)
{
return malloc(size);
}
inline void *
operator new[](size_t size)
{
return malloc(size);
}
inline void
operator delete(void *pointer)
{
free(pointer);
}
inline void
operator delete[](void *pointer)
{
free(pointer);
}
inline void
terminate(void)
{
}
static inline void
__throw()
{
}
#endif // _KERNEL_CPP_H_