User Tools

Site Tools


pdclib:start

This is an old revision of the document!


PDCLib

The Public Domain C Library

What?

PDCLib is aiming at providing a fully conforming implementation of the C standard library (as defined by ISO/IEC 9899), under the licensing terms of CC0 -- "No rights reserved".

PDCLib is a project predicated on the belief that some building blocks are so fundamental that they should be available freely - free of restrictions, free of license boilerplate and free of politics.

Unfortunately, in the modern world this turns out to be difficult: the sum of rights that one must waive is large and complex, and in some countries (e.g. Germany) it is not even possible for an author to assign their work to the Public Domain.

As a result, we have done the closest thing possible: placed PDCLib under Creative Commons Zero. This means that we have waived as many applicable rights as possible under law, and whenever the law has prevented us from waiving said rights, we grant you a license to use PDCLib, in whole or in part, as you choose, with no restrictions.

Repository Access

Personally I prefer SVN. It is what I am most comfortable with, and I have direct access to the server hardware.

The GitHub repository is supported and kept in-sync as a user service.

Branches

Currently there are two branches: trunk / master on the one hand, and shepherd on the other.

From 2012 to 2018, ownership of PDCLib was in the hands of Erin Shepherd. She added significantly to the implemented features, including (but not limited to) wide character and thread support (both incomplete, though).

When I got involved into the project again a couple of years later, I quickly came to realize how different her and my ideas for PDCLib were; this included the build system, version control, source structure, and general approach to when to implement what.

It felt wrong to deconstruct (parts of) Erin's work just to fit it to my approach to things. So I branched the source at the point where Erin had taken over, and continued my development on that branch. This (my) branch was originally labelled retrace.

I also migrated the repository from Bitbucket / Mercurial back to Subversion (while making a git mirror available at GitHub), and re-labelled the branches in the process: My work became trunk / master, and Erin's work became the shepherd branch.

Only trunk / master will see future development.

Status

PDCLib is still very much a work in progress, and should be considered “alpha” quality.

The v1.0 development target is full C99 conformance.

Overview of features implemented

C99

<table> <tr><th /><th>trunk / master</th><th>shepherd</th><th>Notes</th></tr> <tr><th>assert.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>complex.h</th><td style="color:red">TODO</td><td style="color:red">NO</td><td /></tr> <tr><th>ctype.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>errno.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>fenv.h</th><td style="color:red">TODO</td><td style="color:red">NO</td><td /></tr> <tr><th>float.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>inttypes.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td>missing <tt>wcstoimax()</tt>, <tt>wcstoumax()</tt></td></tr> <tr><th>iso646.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>limits.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>locale.h</th><td style="color:orange">WORK IN PROGRESS</td><td style="color:orange">DRAFT</td><td>only "C" locale supported</td></tr> <tr><th>math.h</th><td style="color:red">TODO</td><td style="color:red">NO</td><td /></tr> <tr><th>setjmp.h</th><td style="color:red">TODO</td><td style="color:red">NO</td><td /></tr> <tr><th>signal.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td>dummy</td></tr> <tr><th>stdarg.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>stdbool.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>stddef.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>stdint.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td>assuming presence of exact-width 8/16/32/64 bit types</td></tr> <tr><th>stdio.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td>excluding wide character, locale & float support</td></tr> <tr><th>stdlib.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td>excluding wide character and float support {*1}</td></tr> <tr><th>string.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>tgmath.h</th><td style="color:red">TODO</td><td style="color:red">NO</td><td /></tr> <tr><th>time.h</th><td style="color:red">PARTIAL</td><td style="color:red">PARTIAL</td><td>Date functions (requiring locale info) not implemented yet.</td></tr> <tr><th>wchar.h</th><td style="color:red">TODO</td><td style="color:orange">DRAFT</td><td /></tr> <tr><th>wctype.h</th><td style="color:red">TODO</td><td style="color:green">DONE</td><td /></tr> </table>

{*1}: Missing MB_CUR_MAX, atof, strtod, strtof, strtold, mblen, mbtowc, wctomb, mbstowcs, wcstombs.

C11

<table> <tr><th /><th>trunk / master</th><th>shepherd</th><th>Notes</th></tr> <tr><th>stdalign.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>stdbool.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>stdnoreturn.h</th><td style="color:green">DONE</td><td style="color:green">DONE</td><td /></tr> <tr><th>threads.h</th><td style="color:green">DONE</td><td style="color:orange">DRAFT</td><td /></tr> <tr><th>uchar.h</th><td style="color:red">TODO</td><td style="color:orange">DRAFT</td><td /></tr> <tr><th>Annex K<br />Bounds-checking interfaces</th><td style="color:orange">WORK IN PROGRESS</td><td style="color:red">NO</td><td /></tr> </table>

Versioned Releases

You are strongly encouraged to use the lastest code from the respective branch. The pre-v1.0 tags are internal milestones only, and even the latest (v0.5) is several years behind trunk / master.

Issues & Feature Requests

You may use the GitHub issue tracker regarding any issues and feature requests.

Note that at this point feature requests which do not correspond to the roadmap for the next version of PDCLib are unlikely to be accepted, though patches and submissions likely will as long as they align with project goals.

Why?

PDCLib is aimed at

  • Providing a C runtime library for new compilers,
  • Providing a C runtime library for embedded systems & new OSes
  • Providing a small, compact, strictly standards conforming C library for established platforms as an alternative to the libraries commonly used

It provides a good counterpart to projects like LLVM's libc++ C++ standard library and Pathscale's libcxxrt C++ runtime library. Most C apps, many C++ apps, and both of the above libraries depend heavily upon the C standard library. It is the aim of the PDCLib project to provide the best implementation of that.

Who?

PDCLib was originally created by Martin “Solar” Baute in 2002. In 2012, after 10 years, he retired from the project, and Erin Shepherd took over.

In 2018, Martin Baute took PDCLib back under his wing again. (Thank you to Rink Springer for the motivation – again. ;-) )

pdclib/start.1569273127.txt.gz · Last modified: 2019/09/23 23:12 by solar