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:
@@ -23,6 +23,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "kernel_cpp.h"
|
||||||
|
|
||||||
#define DRIVER_NAME "usb_asix"
|
#define DRIVER_NAME "usb_asix"
|
||||||
#define MAX_DEVICES 8
|
#define MAX_DEVICES 8
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ void usb_asix_trace(bool force, const char* func, const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
va_list arg_list;
|
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];
|
static char buffer[1024];
|
||||||
char *buf_ptr = buffer;
|
char *buf_ptr = buffer;
|
||||||
if(gLogFilePath == NULL){
|
if(gLogFilePath == NULL){
|
||||||
|
|||||||
@@ -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_
|
||||||
Reference in New Issue
Block a user