feat: added cross compiler and moved headers to include dir

This commit is contained in:
2021-03-09 19:45:20 +01:00
parent cefdb8ed90
commit dc4bf71b5a
77 changed files with 180 additions and 45 deletions

View File

@@ -2,8 +2,8 @@
// Created by rick on 06-02-21.
//
#include "kprintf.h"
#include "libc.h"
#include <libc/kprintf.h>
#include <libc/libc.h>
#include <libc/string.h>
#include <stdarg.h>
#include <libk/kprint.h>

View File

@@ -1,12 +0,0 @@
//
// Created by rick on 06-02-21.
//
#ifndef NEW_KERNEL_KPRINTF_H
#define NEW_KERNEL_KPRINTF_H
int printf(const char *fmt, ...);
int sprintf(char *target, const char *fmt, ...);
#endif //NEW_KERNEL_KPRINTF_H

View File

@@ -6,7 +6,7 @@
*/
#include <types.h>
#include "libc.h"
#include <libc/libc.h>
int memcpy(uint8_t *dst, const uint8_t *src, int amount) {
for (int i = 0; i < amount; i++) {

View File

@@ -1,25 +0,0 @@
/*
* libc.h
*
* Created on: Oct 11, 2018
* Author: rick
*/
#ifndef KERNEL_LIBC_LIBC_H_
#define KERNEL_LIBC_LIBC_H_
#include <types.h>
int memcpy(uint8_t *dst, const uint8_t *src, int amount);
int memset(uint8_t *dst, char data, int amount);
char *itoa(int value, char *buffer, int base);
int abs(int val);
int maxi(int a, int b);
int mini(int a, int b);
#endif /* KERNEL_LIBC_LIBC_H_ */

View File

@@ -2,7 +2,7 @@
// Created by rick on 01-02-21.
//
#include "readline.h"
#include <libc/readline.h>
#include <libc/libc.h>
#include <types.h>
#include <libk/kprint.h>

View File

@@ -1,10 +0,0 @@
//
// Created by rick on 01-02-21.
//
#ifndef NEW_KERNEL_READLINE_H
#define NEW_KERNEL_READLINE_H
char *readline(const char *prompt);
#endif //NEW_KERNEL_READLINE_H

View File

@@ -2,7 +2,7 @@
// Created by rick on 30-01-21.
//
#include "ringqueue.h"
#include <libc/ringqueue.h>
#include <libc/libc.h>
#include <mem/malloc.h>

View File

@@ -1,19 +0,0 @@
//
// Created by rick on 30-01-21.
//
#ifndef NEW_KERNEL_RINGQUEUE_H
#define NEW_KERNEL_RINGQUEUE_H
#include <types.h>
#include <stdbool.h>
void *create_buffer(int count, int object_size);
void free_buffer(void *buffer);
void ring_buffer_put(void *buffer, void *item);
bool ring_buffer_get(void *buffer, void *target);
#endif //NEW_KERNEL_RINGQUEUE_H

View File

@@ -2,8 +2,8 @@
// Created by rick on 06-03-21.
//
#include "sort.h"
#include "libc.h"
#include <libc/sort.h>
#include <libc/libc.h>
#include <types.h>
// taken from https://github.com/DevSolar/pdclib/blob/master/functions/stdlib/qsort.c

View File

@@ -1,11 +0,0 @@
//
// Created by rick on 06-03-21.
//
#ifndef NEW_KERNEL_SORT_H
#define NEW_KERNEL_SORT_H
#include <types.h>
void qsort(void *base, size_t num, size_t size, int (*compar)(const void *, const void *));
#endif //NEW_KERNEL_SORT_H

View File

@@ -2,8 +2,8 @@
// Created by rick on 01-02-21.
//
#include "string.h"
#include "stdbool.h"
#include <libc/string.h>
#include <stdbool.h>
#include <libc/libc.h>
#include <types.h>

View File

@@ -1,18 +0,0 @@
//
// Created by rick on 01-02-21.
//
#ifndef NEW_KERNEL_STRING_H
#define NEW_KERNEL_STRING_H
int strcpy(char *dst, char *src);
int strlen(const char *str);
const char *strchr(const char *s, char c);
int strcmp(const char *s1, const char *s2);
int strncmp(const char *s1, const char *s2, int n);
#endif //NEW_KERNEL_STRING_H