aboutsummaryrefslogtreecommitdiffstats
path: root/src/stdlib.c
blob: fa2806b3ed567602cfb1387b73f006a033b23fda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdint.h>

void _exit(int code)
{
	(void)code;
	for (;;);
}

int _getpid(int pid)
{
	(void)pid;
	return 0;
}

void _kill(int pid)
{
	(void)pid;
}

void _sbrk(void)
{

}

char *itoa(int n, int base)
{
	static char buf[16];
	char *p = buf + 15;
	*p = '\0';
	do *--p = "0123456789ABCDEF"[n % base];
	while (n /= base);
	return p;
}