1
0
Fork
You've already forked pdlibc
0
Public Domain Example Libc
  • C 87.3%
  • Shell 8.7%
  • Makefile 2.1%
  • Assembly 1.9%
2024年09月30日 22:23:38 -05:00
include Lots of work on printf(); 2024年08月30日 10:33:52 -05:00
lib Better README, atoi(), atol(), getenv(), untested realloc() 2024年08月23日 23:44:16 -05:00
obj Better README, atoi(), atol(), getenv(), untested realloc() 2024年08月23日 23:44:16 -05:00
src fix typo, no PROT_EXEC 2024年09月30日 22:23:38 -05:00
test Generalized printf, added notes to signal subsystem, revised printf 2024年09月16日 16:35:15 -05:00
.gitignore Basic Setup For a Libc, puts(), putchar(), buffered I/O 2024年08月11日 02:40:56 -05:00
checklist Generalized printf, added notes to signal subsystem, revised printf 2024年09月16日 16:35:15 -05:00
gcc-exlibc gcc -> c99, locale wrappers, atan() and fixed math functions, KISS rand() 2024年08月29日 20:00:14 -05:00
LICENSE Basic Setup For a Libc, puts(), putchar(), buffered I/O 2024年08月11日 02:40:56 -05:00
Makefile gcc -> c99, locale wrappers, atan() and fixed math functions, KISS rand() 2024年08月29日 20:00:14 -05:00
README.md Generalized printf, added notes to signal subsystem, revised printf 2024年09月16日 16:35:15 -05:00
test.sh Lots of work on printf(); 2024年08月30日 10:33:52 -05:00

pdlibc - A demonstration libc that aims to be C89 compatible


pdlibc (Public Domain Libc) is a example implementation of the standard C library designed to be as simple as posible.

It currently provides most of the subset of functions from C89 and the linux kernels nolibc

The functions that have had full tests for them (make test):

  • abort()
  • assert()
  • atexit(), exit()
  • atoi(), atol(), strtod()
  • bsearch()
  • calloc()
  • cos()
  • fabs()
  • fopen()
  • free()
  • fwrite()
  • getenv()
  • atan() and atan2()
  • setlocale(), localeconv()
  • rand(), srand()
  • IO buffering (setvbuf, fflush)
  • labs(), abs()
  • malloc()
  • memcpy()
  • memmove()
  • memset()
  • putchar()
  • puts()
  • qsort()
  • raise()
  • sin()
  • Most of printf(), vfprintf(), vprintf(), and fprintf();
  • sqrt()
  • strcat()
  • strchr(), memchr()
  • strcmp(), strncmp()
  • strcpy(), strncpy(), memcpy()
  • strerror()
  • strlen()
  • The entirity of ctype.h
  • The entirity of varargs.h

See: https://port70.net/%7Ensz/c/c89/c89-draft.html#4.