mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-20 11:41:42 +00:00
Update userspace
This commit is contained in:
@@ -27,10 +27,11 @@ else ifeq ($(OSARCH), i386)
|
||||
ASM_ARCH := elf32
|
||||
endif
|
||||
|
||||
CFLAGS := -fvisibility=hidden -fPIC -fPIE -I../include -I../../libc/include
|
||||
CFLAGS := -fvisibility=hidden -fPIC -fPIE -I../include -I../../out/include
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -DDEBUG -ggdb3 -O0 -fdiagnostics-color=always -fverbose-asm
|
||||
LDFLAGS += -ggdb3 -O0
|
||||
endif
|
||||
|
||||
build: $(OBJECT_NAME)
|
||||
|
@@ -1,7 +1,16 @@
|
||||
#include <libinit/init.h>
|
||||
#include <unistd.h>
|
||||
#include <features.h>
|
||||
#include "printf.h"
|
||||
|
||||
#ifdef __FENNIX_LIBC__
|
||||
#define cprintf printf_libinit
|
||||
#define cvprintf vprintf_libinit
|
||||
#else
|
||||
#define cprintf printf
|
||||
#define cvprintf vprintf
|
||||
#endif
|
||||
|
||||
void init_log(const char *fmt, ...)
|
||||
{
|
||||
static short log_lock = 0;
|
||||
@@ -10,12 +19,12 @@ void init_log(const char *fmt, ...)
|
||||
__sync_synchronize();
|
||||
log_lock = 1;
|
||||
|
||||
printf_libinit("\eCCCCCC[\e0088FFinit\eCCCCCC] \eAAAAAA");
|
||||
cprintf("\eCCCCCC[\e0088FFinit\eCCCCCC] \eAAAAAA");
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vprintf_libinit(fmt, args);
|
||||
cvprintf(fmt, args);
|
||||
va_end(args);
|
||||
printf_libinit("\eCCCCCC");
|
||||
cprintf("\eCCCCCC");
|
||||
|
||||
log_lock = 0;
|
||||
__sync_synchronize();
|
||||
|
@@ -49,8 +49,9 @@
|
||||
#include <cstdint>
|
||||
#include <climits>
|
||||
#else
|
||||
#include <types.h>
|
||||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#endif // __cplusplus
|
||||
|
||||
#if PRINTF_ALIAS_STANDARD_FUNCTION_NAMES
|
||||
|
@@ -39,11 +39,14 @@
|
||||
#ifndef PRINTF_H_
|
||||
#define PRINTF_H_
|
||||
|
||||
#include <types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
Reference in New Issue
Block a user