A bit of #ifdef'ing to make the stuff edible for userland compilation

with gcc 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16147 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2006-01-30 01:22:11 +00:00
parent 4b0e1b9bda
commit deeb2f399a
3 changed files with 22 additions and 4 deletions

View File

@ -12,13 +12,19 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <util/kernel_cpp.h> #ifndef _USER_MODE
# include <util/kernel_cpp.h>
#else
# include <new>
#endif
#ifndef _BOOT_MODE #ifndef _BOOT_MODE
# include <DiskDeviceTypes.h> # include <DiskDeviceTypes.h>
#else #else
# include <boot/partitions.h> # include <boot/partitions.h>
#endif #endif
#include <KernelExport.h> #ifndef _USER_MODE
# include <KernelExport.h>
#endif
#include "PartitionMap.h" #include "PartitionMap.h"
@ -26,6 +32,8 @@
//#define TRACE(x) dprintf x //#define TRACE(x) dprintf x
using std::nothrow;
// partition_type // partition_type
struct partition_type { struct partition_type {
uint8 type; uint8 type;

View File

@ -12,7 +12,12 @@
#define _INTEL_PARTITION_MAP_H #define _INTEL_PARTITION_MAP_H
#include <SupportDefs.h> #include <SupportDefs.h>
#include <util/kernel_cpp.h>
#ifndef _USER_MODE
# include <util/kernel_cpp.h>
#else
# include <new>
#endif
// These match those in DiskDeviceTypes.cpp and *must* be kept in sync. // These match those in DiskDeviceTypes.cpp and *must* be kept in sync.
#define INTEL_PARTITION_NAME "Intel Partition Map" #define INTEL_PARTITION_NAME "Intel Partition Map"

View File

@ -1,6 +1,8 @@
// PartitionMapParser.cpp // PartitionMapParser.cpp
#include <KernelExport.h> #ifndef _USER_MODE
# include <KernelExport.h>
#endif
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
@ -15,6 +17,9 @@
#define TRACE(x) ; #define TRACE(x) ;
//#define TRACE(x) dprintf x //#define TRACE(x) dprintf x
using std::nothrow;
// Maximal number of logical partitions per extended partition we allow. // Maximal number of logical partitions per extended partition we allow.
static const int32 kMaxLogicalPartitionCount = 128; static const int32 kMaxLogicalPartitionCount = 128;