Category:BSD libc

From Rosetta Code
Revision as of 02:22, 19 April 2011 by rosettacode>Kernigh (Create category for BSD libc (<sys/queue.h>, <err.h> and such).)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Library
This is an example of a library. You may see a list of other libraries used on Rosetta Code at Category:Solutions by Library.

BSD libc is the core library for the C language with the BSD operating systems. This category collects examples that use functions or macros which are part of BSD libc, but not part of POSIX.

These examples require a BSD system, or another system with the same extension. (For example, <err.h> originates from 4.4BSD but also appears in GNU libc.) Some of these examples will also work with Mac OS X.

  • What with BSD sockets? Rosetta Code has some examples using BSD sockets, but we have not moved them into this category, because BSD sockets might later obtain their own category.

Partial list of BSD extensions

  • <sys/queue.h>: macros for linked lists.
  • <sys/tree.h>: macros for splay trees and red-black trees.
  • <db.h>: Berkeley DB 1.85.
  • <err.h>: functions like err() for error messages.
  • <stdio.h>: fgetln().
  • <stdlib.h>: arc4random(), daemon(), radixsort().
  • <string.h>: strlcat() and strlcpy().
  • <vis.h>: vis().