mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
AK: Don't bring in LibBareMetal's kstdio.h in userspace
This commit is contained in:
parent
7ec1b2e44b
commit
f27a646bf5
1 changed files with 19 additions and 5 deletions
24
AK/kstdio.h
24
AK/kstdio.h
|
@ -27,10 +27,24 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef __serenity__
|
#ifdef __serenity__
|
||||||
# include <LibBareMetal/Output/kstdio.h>
|
# if defined(KERNEL) || defined(BOOTSTRAPPER)
|
||||||
|
# include <LibBareMetal/Output/kstdio.h>
|
||||||
|
# else
|
||||||
|
# include <AK/Types.h>
|
||||||
|
extern "C" {
|
||||||
|
int dbgprintf(const char* fmt, ...);
|
||||||
|
int dbgputstr(const char*, int);
|
||||||
|
int sprintf(char* buf, const char* fmt, ...);
|
||||||
|
}
|
||||||
|
template<size_t N>
|
||||||
|
inline int dbgputstr(const char (&array)[N])
|
||||||
|
{
|
||||||
|
return ::dbgputstr(array, N);
|
||||||
|
}
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
# include <stdio.h>
|
||||||
#define kprintf printf
|
# define kprintf printf
|
||||||
#define dbgprintf printf
|
# define dbgprintf printf
|
||||||
#define dbgputstr(characters, length) fwrite(characters, 1, length, stdout)
|
# define dbgputstr(characters, length) fwrite(characters, 1, length, stdout)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue