my development branch of libposix
C Perl Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


May 23rd, 2009
Henrique Dante de Almeida

libposix is a bold attempt to unify the impementation of the core functionality
of all Unix systems. libposix is:
- A full implementation of the POSIX 2008 standard
- A cross platform implementation, that should replace existing implementations
of the system core libraries and unify the core Unix implementation for all
- An exact implementation of POSIX 2008 and nothing else (no extensions, no
previous POSIX versions)
- An implementation that works well with possible extensions to the core system
functionallity (ex: GNU, BSD)
- An implementation of POSIX written from scratch
- Free and open source software

What's the point of that ?
I've decided to create this project after I got upset spending one week
unsuccessfully trying to cross compile a toolchain with gcc, binutils and glibc
(the latest versions of them). I believe those tools are too clumsy, requires
tons of patches to be usable and they all should be replaced by clean, easy to
use, easy to install, easy to mantain software. There's already a nice
successful attempt to create a compiler from scratch, which is the clang
subproject of llvm. Also, binutils is the easiest project to cope with, so we
are left with the libc implementation.

How do you expect to do this ?
I need a lot of people. They should be willing to strictly adhere to the
standard and test the implementation in a lot of different systems.

What about the compatibility with Unix systems ?
Emphasis will be made to support popular free Unix implementations (GNU and BSD
based systems). The main development environment is, as of 2009, Ubuntu Linux.
In general, commercial Unix vendors should be able to easily include the
library in their systems themselves. The library:

- MUST run in GNU based systems
- MUST run in free BSD based systems
- SHOULD run in other free Unix systems
- SHOULD run in commercial Unix systems
- MAY run or be adapted to non Unix systems

First, that means the implementation license may be acceptable to all possible
systems, which leaves us few options. Probably the license will be the BSD
license. Second, all the extensions that exist in GNU and BSD systems must
coexist with libposix, except where they could conflict with the posix
implementation, but in that case those extensions must be removed. A similar
rule is applied to commercial systems. Commercial Unix vendors should easily
include their own extensions to the core system functionallity and remove
conflicting extensions. There may be an attempt, later, to implement libraries
to systems that do not claim to be Unix compatible.

What about system requirements, development environment and all that technical
stuff ?
The library is expected to run in general purpose computers, which means that
the full standard, with all optional parts should be included. However, the
library is expected to be modular enough so that it can be built with only the
mandatory parts, so that it might be useful in embedded systems that require
POSIX conformance. Obviously, in the beginning, only the mandatory part will be

Given a cross toolchain (with exception of the library), libposix MUST be
easily compiled to any platform it supports, just like llvm is able to be
compiled with two script commands.

The library must be minimal and fast, but I don't know yet how this translates
to compatibility with old or restricted hardware.

No documentation of the system interface should be necessary. Since it will
strictly adhere to POSIX, POSIX itself is the library documentation (somebody
may still write a more didactic version of the standard, however).
Implementation details, the conformance report and installation procedure will
be documented, as usual.

The POSIX standard defines more than just the system library. For now, this
project will assume that standards compliant tools and rules already exist in
the system and are ready to use.

Being a free software project, libposix may use any free tool for the
development. However, since it's a core library, it must not depend on any
other software while in use (except the kernel or equivalent hardware/resource

The project will be written in assembly and C, so it's code doesn't strictly
adhere to any standard. However, the C part should allow a high degree of
compatibility and support standards currently in use. That means it must
strictly adhere ISO C99 (since it's a standalone library, it need not adhere to
any POSIX standard). That also means that porting libposix to a new
architecture should be a simple matter of implementing the assembly code. Note
that libposix can't adhere to ISO C90 because POSIX 2008 requires ISO C99.

How you can help ?
- Spread the word
- Understand the unification of all Unix core libraries and its implications
- Convince other system developers that this is a Good Thing
- Convince other system developers to migrate
- Code
- Test
- Document
- Read the standard
- Contact me
- Donate