lib: add libc and micro libc
This commit is contained in:
22
lib/libc/include/stdio.h
Normal file
22
lib/libc/include/stdio.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef STDIO_H_
|
||||
#define STDIO_H_
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int snprintf(char *buffer, size_t count, const char *format, ...);
|
||||
extern int vsnprintf(
|
||||
char *buffer,
|
||||
size_t count,
|
||||
const char *format,
|
||||
va_list va);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
14
lib/libc/include/string.h
Normal file
14
lib/libc/include/string.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef STRING_H_
|
||||
#define STRING_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern size_t strlen(const char *s);
|
||||
|
||||
extern int strcmp(const char *s1, const char *s2);
|
||||
extern int strncmp(const char *s1, const char *s2, unsigned long n);
|
||||
|
||||
extern void *memset(void *str, int c, size_t n);
|
||||
extern void *memcpy(void *dst, const void *src, size_t len);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user