mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[libc] Bring libc in-tree
Moving libc from its separate repo into this one, minor resulting build fixes, and a hacky way to add -I for libc headers in builds.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -61,7 +60,7 @@ void console::put_hex(T x, int width, char pad)
|
||||
int len = 1;
|
||||
for (int i = chars - 1; i >= 0; --i) {
|
||||
uint8_t nibble = (x >> (i*4)) & 0xf;
|
||||
if (nibble) len = std::max(i + 1, len);
|
||||
if (nibble) len = len > i + 1 ? len : i + 1;
|
||||
message[chars - i - 1] = digits[nibble];
|
||||
}
|
||||
message[chars] = 0;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include "kernel_args.h"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "kutil/assert.h"
|
||||
#include "kutil/vm_space.h"
|
||||
#include "console.h"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "apic.h"
|
||||
#include "clock.h"
|
||||
#include "console.h"
|
||||
|
||||
Reference in New Issue
Block a user