Initial commit, blink working
This commit is contained in:
commit
b9535e1b08
10 changed files with 1293 additions and 0 deletions
20
base.c
Normal file
20
base.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
int __errno = 0;
|
||||
void *_impure_ptr = NULL;
|
||||
|
||||
void __sinit(void) {
|
||||
}
|
||||
|
||||
void memset(void *s, int c, size_t n) {
|
||||
char *end = (char *)s + n;
|
||||
for (char *p = (char *)s; p < end; p++)
|
||||
*p = (char)c;
|
||||
}
|
||||
|
||||
size_t strlen(const char *s) {
|
||||
const char *start = s;
|
||||
while (*s++);
|
||||
return s - start - 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue