C Assembly Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
arm arm: memrchr(), strrchr(), strncmp(), htonl(), htons() Apr 19, 2016
arpa inet.h: fix htonl()'s prototype Aug 15, 2014
linux linux/vt.h: added May 24, 2011
sys dirent.h: added Nov 8, 2013
x64 x64: fsync() and ftruncate() system calls May 6, 2015
x86 x86: sigaction and truncate syscalls Jul 14, 2016
Makefile Makefile: specify neatcc's ncc as the default compiler Apr 20, 2016
README README: a brief introduction Dec 2, 2014
atoi.c implement atoi() and atol() Jul 6, 2010
ctype.c ctype: make sure c < 127 in isprint(c) May 8, 2014
ctype.h ctype.h: declare ispunct() May 8, 2014
dirent.c unistd.h: include some missing declarations Dec 3, 2014
dirent.h dirent.h: added Nov 8, 2013
elf.h elf.h: fix 32-bit usage Oct 24, 2011
errno.c errno: add sys_errlist[] and perror() May 6, 2011
errno.h errno: add sys_errlist[] and perror() May 6, 2011
fcntl.h add fcntl.h, inttypes.h, sys/stat.h, sys/types.h Jul 7, 2010
inttypes.h stdint.h: added May 24, 2011
localtime.c localtime: partial mktime() Dec 31, 2015
malloc.c malloc: cast before bit operations on pointers Apr 2, 2016
memtst.c memtst: support calloc() Apr 2, 2016
mkstemp.c unistd.h: include some missing declarations Dec 3, 2014
poll.h poll.h: added May 24, 2011
qsort.c stdlib: add qsort.c May 31, 2011
rand.c stdlib.h: implement rand() and srand() Nov 15, 2011
regex.c regex: import changes from neatvi Oct 14, 2016
regex.h regex: partial regex.h implementation May 16, 2015
scanf.c stdio: fread() and fwrite Apr 15, 2018
setjmp.h setjmp.h: implement setjmp() and longjmp() Feb 27, 2013
signal.c signal.h: move SIG_* macros to signal.h Nov 10, 2011
signal.h signal.h: move SIG_* macros to signal.h Nov 10, 2011
stdarg.c stdarg: handle sizeof(long) != 4 Oct 21, 2011
stdarg.h stdarg: handle sizeof(long) != 4 Oct 21, 2011
stddef.h stddef.h: size_t should be unsigned long Apr 23, 2012
stdint.h elf.h: fix 32-bit usage Oct 24, 2011
stdio.c stdio: upper case hex numbers Jun 7, 2018
stdio.h stdio: fread() and fwrite Apr 15, 2018
stdlib.c unistd.h: include some missing declarations Dec 3, 2014
stdlib.h memtst: support calloc() Apr 2, 2016
strftime.c time.h: strftime() should return size_t Apr 23, 2014
string.h string.h: strlen() should return size_t Apr 23, 2014
stringc.c change memory functions to use long for len Oct 24, 2011
termios.c termios: add cfmakeraw() May 20, 2011
termios.h termios.h: remove the unneeded sys/cdefs.h import May 24, 2011
time.h time.h: strftime() should return size_t Apr 23, 2014
unistd.c unistd: add execv() Jul 25, 2013
unistd.h unistd.h: declare pipe() and dup() Dec 26, 2014
utime.h utime.h: add utime() syscall May 24, 2011

README

NEATLIBC
========

Neatlibc is a small C standard library, supporting x86, x86_64, and
32-bit ARM architectures.  Written mainly for bootstrapping neatcc,
neatlibc does not implement many of the C standard library functions.
Nonetheless, most of the programs available in its homepage
(http://litcave.rudi.ir/) can be compiled with neatcc and neatlibc.

To examine dynamic memory allocation in a program, you can define
MEMTST macro before including stdlib.h header (only implemented for
x86_64).  It should report failed allocations, bad free() calls, and
memory leaks.