From d68a064819deaaa8e01eca3c7809050b25cedfbd Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Mon, 26 Oct 2009 14:42:00 +0100 Subject: Made some minor changes, for compatibility --- Source/Applications/SampleApps/asmdemo.asm | 4 ++-- Source/Kernel/Core/Log.ns.cpp | 2 +- Source/Kernel/SyscallManager/Ressource.class.h | 2 +- Source/Kernel/VFS/FileSystem.proto.h | 1 + Source/Kernel/common.h | 8 ++++---- Source/Library/Common/types.h | 1 + Source/Library/Userland/common.h | 8 ++++---- 7 files changed, 14 insertions(+), 12 deletions(-) (limited to 'Source') diff --git a/Source/Applications/SampleApps/asmdemo.asm b/Source/Applications/SampleApps/asmdemo.asm index 3037897..d57cc9b 100644 --- a/Source/Applications/SampleApps/asmdemo.asm +++ b/Source/Applications/SampleApps/asmdemo.asm @@ -8,7 +8,7 @@ start: ; label used for calculating app size mov eax, SC_PUTCH mov ebx, 10 int 64 - loop: +lblloop: inc ecx mov eax, SC_PUTCH ;temporarily defined for writing one char to screen mov ebx, ecx @@ -17,7 +17,7 @@ start: ; label used for calculating app size mov ebx, 30 ;20ms int 64 cmp ecx, 127 - jnz loop + jnz lblloop mov eax, 0 mov eax, SC_PUTCH mov ebx, 10 ;newline diff --git a/Source/Kernel/Core/Log.ns.cpp b/Source/Kernel/Core/Log.ns.cpp index fbdb7f2..1727024 100644 --- a/Source/Kernel/Core/Log.ns.cpp +++ b/Source/Kernel/Core/Log.ns.cpp @@ -10,7 +10,7 @@ void init(u8int loglevel) { if (VFS::find("/System") == 0) VFS::createDirectory("/System"); if (VFS::find("/System/Logs") == 0) VFS::createDirectory("/System/Logs"); - if (KL_PANIC <= loglevel) logs[KL_PANIC] = new TextFile("/System/Logs/Panic.log", FM_APPEND); + logs[KL_PANIC] = new TextFile("/System/Logs/Panic.log", FM_APPEND); if (KL_CRITICAL <= loglevel) logs[KL_CRITICAL] = new TextFile("/System/Logs/Critical.log", FM_APPEND); if (KL_ERROR <= loglevel) logs[KL_ERROR] = new TextFile("/System/Logs/Error.log", FM_APPEND); if (KL_WARNING <= loglevel) logs[KL_WARNING] = new TextFile("/System/Logs/Warning.log", FM_APPEND); diff --git a/Source/Kernel/SyscallManager/Ressource.class.h b/Source/Kernel/SyscallManager/Ressource.class.h index 2ccdcc1..ecd640b 100644 --- a/Source/Kernel/SyscallManager/Ressource.class.h +++ b/Source/Kernel/SyscallManager/Ressource.class.h @@ -48,7 +48,7 @@ class Ressource { protected: Ressource(u8int type, call_t* callTable = 0); - ~Ressource(); + virtual ~Ressource(); //This function's role is to tell the Ressource if it is supposed to be accesible from current user or not virtual bool accessible() = 0; //This function should be overloaded by all derivated classes diff --git a/Source/Kernel/VFS/FileSystem.proto.h b/Source/Kernel/VFS/FileSystem.proto.h index 5aec434..a614c13 100644 --- a/Source/Kernel/VFS/FileSystem.proto.h +++ b/Source/Kernel/VFS/FileSystem.proto.h @@ -9,6 +9,7 @@ class DirectoryNode; //This abstract class describes a filesystem class FileSystem { protected: + virtual ~FileSystem() {} bool m_isWritable; //false = read only DirectoryNode* m_rootNode; diff --git a/Source/Kernel/common.h b/Source/Kernel/common.h index 86d76cd..d35ba84 100644 --- a/Source/Kernel/common.h +++ b/Source/Kernel/common.h @@ -15,13 +15,13 @@ #include //Standard implemenations of operator new/delete -inline void* operator new(u32int, void *p) { return p; } -inline void* operator new[](u32int, void *p) { return p; } +inline void* operator new(size_t, void *p) { return p; } +inline void* operator new[](size_t, void *p) { return p; } inline void operator delete(void*, void*) { } inline void operator delete[](void*, void*) { } -inline void* operator new(u32int sz) { return Mem::alloc(sz); } -inline void* operator new[](u32int sz) { return Mem::alloc(sz); } +inline void* operator new(size_t sz) { return Mem::alloc(sz); } +inline void* operator new[](size_t sz) { return Mem::alloc(sz); } inline void operator delete(void *ptr) { Mem::free(ptr); } inline void operator delete[](void *ptr) { Mem::free(ptr); } diff --git a/Source/Library/Common/types.h b/Source/Library/Common/types.h index ca6f73d..de3be24 100644 --- a/Source/Library/Common/types.h +++ b/Source/Library/Common/types.h @@ -12,6 +12,7 @@ typedef long long s64int; typedef int s32int; typedef short s16int; typedef char s8int; +typedef unsigned long size_t; #define U64 unsigned long long #define S64 long long diff --git a/Source/Library/Userland/common.h b/Source/Library/Userland/common.h index 6257841..679afd0 100644 --- a/Source/Library/Userland/common.h +++ b/Source/Library/Userland/common.h @@ -14,13 +14,13 @@ namespace Mem { } //Standard implemenations of operator new/delete -inline void* operator new(u32int, void *p) { return p; } -inline void* operator new[](u32int, void *p) { return p; } +inline void* operator new(size_t, void *p) { return p; } +inline void* operator new[](size_t, void *p) { return p; } inline void operator delete(void*, void*) { } inline void operator delete[](void*, void*) { } -inline void* operator new(u32int sz) { return Mem::alloc(sz); } -inline void* operator new[](u32int sz) { return Mem::alloc(sz); } +inline void* operator new(size_t sz) { return Mem::alloc(sz); } +inline void* operator new[](size_t sz) { return Mem::alloc(sz); } inline void operator delete(void *ptr) { Mem::free(ptr); } inline void operator delete[](void *ptr) { Mem::free(ptr); } -- cgit v1.2.3