mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
LibELF+Lagom: Work towards getting LibELF in Lagom
Mostly -Wformat fixes, some of which pointed out real (if benign) bugs.
This commit is contained in:
parent
872834320a
commit
0586924bbd
6 changed files with 33 additions and 32 deletions
15
AK/kstdio.h
15
AK/kstdio.h
|
@ -38,15 +38,18 @@ int dbgprintf(const char* fmt, ...);
|
|||
ssize_t dbgputstr(const char*, ssize_t);
|
||||
int sprintf(char* buf, const char* fmt, ...);
|
||||
}
|
||||
template<size_t N>
|
||||
inline int dbgputstr(const char (&array)[N])
|
||||
{
|
||||
return ::dbgputstr(array, N);
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
# include <stdio.h>
|
||||
# define kprintf printf
|
||||
# define dbgprintf(...) fprintf(stderr, __VA_ARGS__)
|
||||
# define dbgputstr(characters, length) fwrite(characters, 1, length, stderr)
|
||||
inline size_t dbgputstr(const char* characters, ssize_t length)
|
||||
{
|
||||
return fwrite(characters, 1, length, stderr);
|
||||
}
|
||||
#endif
|
||||
template<size_t N>
|
||||
inline int dbgputstr(const char (&array)[N])
|
||||
{
|
||||
return ::dbgputstr(array, N);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue