Switched from local cpp.h/cpp.cpp to global kernel_cpp.h/kernel_cpp.cpp
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4642 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
184dd21b87
commit
c52519cfcd
@ -10,7 +10,7 @@
|
||||
/*! \file AllocationDescriptorList.h
|
||||
*/
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "DiskStructures.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
|
||||
#include "SupportDefs.h"
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
|
||||
#include "Array.h"
|
||||
#include "UdfDebug.h"
|
||||
|
@ -25,7 +25,7 @@ extern "C" {
|
||||
#include "cache.h"
|
||||
}
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "DiskStructures.h"
|
||||
|
@ -18,7 +18,7 @@ extern "C" {
|
||||
#include <fsproto.h>
|
||||
}
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
namespace Udf {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <ByteOrder.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "Array.h"
|
||||
|
@ -18,7 +18,7 @@ extern "C" {
|
||||
#include <fsproto.h>
|
||||
}
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "CachedBlock.h"
|
||||
|
@ -23,10 +23,11 @@ oldOPTIM = $(OPTIM) ;
|
||||
SubDirC++Flags $(defines) -Wall -Wno-multichar ;
|
||||
}
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel util ] ;
|
||||
UsePrivateHeaders [ FDirName kernel ] ; # For kernel_cpp.cpp
|
||||
UsePrivateHeaders [ FDirName kernel util ] ; # For all the UDF source files
|
||||
|
||||
R5KernelAddon udf : [ FDirName kernel file_systems udf ] :
|
||||
cpp.cpp
|
||||
kernel_cpp.cpp
|
||||
udf.cpp
|
||||
|
||||
CS0String.cpp
|
||||
@ -39,6 +40,11 @@ R5KernelAddon udf : [ FDirName kernel file_systems udf ] :
|
||||
Volume.cpp
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles
|
||||
kernel_cpp.cpp
|
||||
] = [ FDirName $(OBOS_TOP) src kernel core util ] ;
|
||||
|
||||
|
||||
rule InstallUDF
|
||||
{
|
||||
Depends $(<) : $(>) ;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
|
||||
namespace Udf {
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
/*! \file PartitionMap.h
|
||||
*/
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
#include "DiskStructures.h"
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
|
||||
class DebugHelper;
|
||||
|
||||
|
@ -21,7 +21,7 @@ extern "C" {
|
||||
#include <fsproto.h>
|
||||
}
|
||||
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "CS0String.h"
|
||||
|
@ -1,17 +0,0 @@
|
||||
/* cpp - C++ in the kernel
|
||||
**
|
||||
** Initial version by Axel Dörfler, axeld@pinc-software.de
|
||||
** This file may be used under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include "cpp.h"
|
||||
|
||||
|
||||
extern "C" void
|
||||
__pure_virtual()
|
||||
{
|
||||
//printf("pure virtual function call");
|
||||
}
|
||||
|
||||
const nothrow_t nothrow = {};
|
@ -1,85 +0,0 @@
|
||||
#ifndef CPP_H
|
||||
#define CPP_H
|
||||
/* cpp - C++ in the kernel
|
||||
**
|
||||
** Initial version by Axel Dörfler, axeld@pinc-software.de
|
||||
** This file may be used under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <new>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef USER
|
||||
#else
|
||||
/*! Looking through the \c <new> header on my Linux distro
|
||||
(can't seem to find it in the R5 headers...), it looks like
|
||||
the type of \c nothrow_t is just:
|
||||
|
||||
<code>struct nothrow_t {};</code>
|
||||
|
||||
Thus, here I'm just declaring an externed \c nothrow_t var called
|
||||
\c nothrow, and defining it in cpp.cpp to be initialized to \c {}.
|
||||
So far, this seems to work okay.
|
||||
*/
|
||||
extern const nothrow_t nothrow;
|
||||
|
||||
|
||||
// Oh no! C++ in the kernel! Are you nuts?
|
||||
//
|
||||
// - no exceptions
|
||||
// - (almost) no virtuals (well, the Query code now uses them)
|
||||
// - it's basically only the C++ syntax, and type checking
|
||||
// - since one tend to encapsulate everything in classes, it has a slightly
|
||||
// higher memory overhead
|
||||
// - nicer code
|
||||
// - easier to maintain
|
||||
|
||||
|
||||
inline void *
|
||||
operator new(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
|
||||
inline void *
|
||||
operator new(size_t size, const nothrow_t&)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
|
||||
inline void *
|
||||
operator new[](size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
|
||||
inline void *
|
||||
operator new[](size_t size, const nothrow_t&)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
|
||||
inline void
|
||||
operator delete(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
||||
inline void
|
||||
operator delete[](void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
// we're using virtuals
|
||||
extern "C" void __pure_virtual();
|
||||
|
||||
#endif // USER
|
||||
|
||||
#endif /* CPP_H */
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "UdfDebug.h"
|
||||
#include "cpp.h"
|
||||
#include "kernel_cpp.h"
|
||||
|
||||
#include <Drivers.h>
|
||||
#include <ctype.h>
|
||||
|
@ -16,7 +16,7 @@ SimpleTest udf_shell
|
||||
fsh.c rootfs.c initfs.c kernel.c cache.c sl.c stub.c
|
||||
sysdep.c hexdump.c argv.c
|
||||
|
||||
cpp.cpp udf.cpp
|
||||
udf.cpp
|
||||
CS0String.cpp DirectoryIterator.cpp DiskStructures.cpp Icb.cpp
|
||||
PartitionMap.cpp UdfDebug.cpp Utils.cpp Volume.cpp
|
||||
:
|
||||
@ -24,7 +24,7 @@ SimpleTest udf_shell
|
||||
|
||||
# Tell Jam where to find these sources
|
||||
SEARCH on [ FGristFiles
|
||||
cpp.cpp udf.cpp
|
||||
udf.cpp
|
||||
CS0String.cpp DirectoryIterator.cpp DiskStructures.cpp Icb.cpp
|
||||
PartitionMap.cpp UdfDebug.cpp Utils.cpp Volume.cpp
|
||||
] = [ FDirName $(OBOS_TOP) src add-ons kernel file_systems udf ] ;
|
||||
|
Loading…
Reference in New Issue
Block a user