mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
Build: Get rid of the USERLAND define
Let's simplify things. There is now only KERNEL. To see if you're on Serenity, check if __serenity__ is defined.
This commit is contained in:
parent
6c2c3d00a3
commit
44bc4008b7
4 changed files with 6 additions and 8 deletions
|
@ -36,7 +36,7 @@ const LogStream& operator<<(const LogStream& stream, const void* value)
|
|||
return stream << String::format("%p", value);
|
||||
}
|
||||
|
||||
#ifdef USERLAND
|
||||
#if defined (__serenity__) && !defined(KERNEL)
|
||||
static TriState got_process_name = TriState::Unknown;
|
||||
static char process_name_buffer[256];
|
||||
#endif
|
||||
|
@ -44,7 +44,7 @@ static char process_name_buffer[256];
|
|||
DebugLogStream dbg()
|
||||
{
|
||||
DebugLogStream stream;
|
||||
#ifdef USERLAND
|
||||
#if defined (__serenity__) && !defined(KERNEL)
|
||||
if (got_process_name == TriState::Unknown) {
|
||||
if (get_process_name(process_name_buffer, sizeof(process_name_buffer)) == 0)
|
||||
got_process_name = TriState::True;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <AK/Types.h>
|
||||
#include <AK/kstdio.h>
|
||||
|
||||
#ifdef USERLAND
|
||||
#ifndef KERNEL
|
||||
# include <AK/ScopedValueRollback.h>
|
||||
# include <AK/StringView.h>
|
||||
# include <errno.h>
|
||||
|
@ -18,7 +18,7 @@ class StringView;
|
|||
class LogStream {
|
||||
public:
|
||||
LogStream()
|
||||
#ifdef USERLAND
|
||||
#ifndef KERNEL
|
||||
: m_errno_restorer(errno)
|
||||
#endif
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ public:
|
|||
virtual void write(const char*, int) const = 0;
|
||||
|
||||
private:
|
||||
#ifdef USERLAND
|
||||
#ifndef KERNEL
|
||||
ScopedValueRollback<int> m_errno_restorer;
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@ void set_serial_debug(bool on_or_off);
|
|||
int get_serial_debug();
|
||||
}
|
||||
|
||||
#ifndef USERLAND
|
||||
#ifdef KERNEL
|
||||
# define printf dbgprintf
|
||||
#endif
|
||||
|
||||
|
|
|
@ -54,8 +54,6 @@ else
|
|||
|
||||
ifdef KERNEL
|
||||
DEFINES += -DKERNEL
|
||||
else
|
||||
DEFINES += -DUSERLAND
|
||||
endif
|
||||
|
||||
OBJ_SUFFIX ?=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue