Improved porting with libbsd


The libbsd project was begun originally by the developers of the Debian K-FreeBSD project as a means of addressing differences in the available functions, headers and c macros between BSD libc and GNU libc. I have imported the source directly into HitchHiker and "hitchhikerized" the build process. Only the static library archives are built at this time. With a few tweaks and an additional "compat.h" header to address a few omissions, this has led to an improvement in my process of porting BSD utilities, and the vast majority of the imported utilities now link with libbsd functions. There is little measurable overhead in the resulting binaries.

For those utilities that are more difficult to port I have begun porting the work already done to create lobase, a portable package of OpenBSD userland, to the hitchhiker build system. I am also pulling in sources from FreeBSD now. The first program ported from FreeBSD to HHL is the ed editor, which in this case was easier to get going than the version from the NetBSD sources.

I have always enjoyed the venerable Unix fortune program, and always include a call to it in my shell profile. While I did consider the idea of including it by default in the HitchHiker base system, I decided to go another route and just implement something simpler from scratch. Hence, the small C program 42, which by just prints a random quote from the HitchHiker's guide universe. It accepts no options and can only be extended by editing the source. Just a bit of fun. screenshot_42.png

Tags for this post:

Porting Roadmap Libraries NonGNU C programming