Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
C standard library
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== BSD libc === '''BSD libc''' is a superset of the POSIX standard library supported by the C libraries included with [[BSD]] [[operating system]]s such as [[FreeBSD]], [[NetBSD]], [[OpenBSD]] and [[macOS]]. BSD libc has some extensions that are not defined in the original standard, many of which first appeared in 1994's [[BSD#4.4BSD and descendants|4.4BSD]] release (the first to be largely developed after the first standard was issued in 1989). Some of the extensions of BSD libc are: * <code>sys/tree.h</code>{{snd}} contains an implementation of [[redโblack tree]] and [[splay tree]]<ref>{{cite web |url=http://man.freebsd.org/tree |title=tree |website=Man.freebsd.org |date=27 December 2007 |access-date=25 August 2013}}</ref><ref>{{cite web |url=http://bxr.su/o/sys/sys/tree.h |title=Super User's BSD Cross Reference: /OpenBSD/sys/sys/tree.h |website=bxr.su}}</ref> * <code>sys/queue.h</code>{{snd}} implementations of [[Linked list]], [[queue (data structure)|queues]], [[tail queue]], etc.<ref>{{cite web |url=http://man.freebsd.org/queue |title=queue |website=Man.freebsd.org |date=13 May 2011 |access-date=25 August 2013}}</ref><ref>{{cite web |url=http://bxr.su/o/sys/sys/queue.h |title=Super User's BSD Cross Reference: /OpenBSD/sys/sys/queue.h |website=bxr.su}}</ref> * <code>fgetln()</code>{{snd}} defined in <code>stdio.h</code>. This can be used to read a file line by line.<ref>{{cite web |url=http://man.freebsd.org/fgetln |title=fgetln |website=Man.freebsd.org |date=19 April 1994 |access-date=25 August 2013}}</ref><ref>{{cite web |url=http://bxr.su/o/lib/libc/stdio/fgetln.c#fgetln |title=Super User's BSD Cross Reference: /OpenBSD/lib/libc/stdio/fgetln.c |website=bxr.su}}</ref><ref>{{cite web |url=http://bxr.su/o/include/stdio.h |title=Super User's BSD Cross Reference: /OpenBSD/include/stdio.h |website=bxr.su}}</ref> * <code>fts.h</code>{{snd}} contains some functions to traverse a file hierarchy<ref>{{cite web |url=http://man.freebsd.org/fts |title=fts|website=Man.freebsd.org |date=18 March 2012 |access-date=25 August 2013}}</ref><ref>{{cite web |url=http://bxr.su/o/include/fts.h |title=Super User's BSD Cross Reference: /OpenBSD/include/fts.h |website=bxr.su}}</ref> * <code>db.h</code>{{snd}} some functions to connect to the [[Berkeley DB]]<ref>{{cite web |url=http://man.freebsd.org/db |title=db |website=Man.freebsd.org |date=10 September 2010 |access-date=25 August 2013}}</ref><ref>{{cite web |url=http://bxr.su/o/include/db.h |title=Super User's BSD Cross Reference: /OpenBSD/include/db.h |website=bxr.su}}</ref> * <code>strlcat()</code> and <code>strlcpy()</code>{{snd}} secure alternatives for <code>strncat()</code> and <code>strncpy()</code><ref>Miller, Todd C. and Theo de Raadt. [http://www.usenix.org/events/usenix99/millert.html strlcpy and strlcat - consistent, safe, string copy and concatenation]. Proceedings of the 1999 USENIX Annual Technical Conference, June 6โ11, 1999, pp. 175โ178.</ref><ref>{{cite web |url=http://bxr.su/o/lib/libc/string/strlcat.c |title=Super User's BSD Cross Reference: /OpenBSD/lib/libc/string/strlcat.c |website=bxr.su}}</ref><ref>{{cite web |url=http://bxr.su/o/lib/libc/string/strlcpy.c |title=Super User's BSD Cross Reference: /OpenBSD/lib/libc/string/strlcpy.c |website=bxr.su}}</ref><ref>{{cite web |url=http://bxr.su/o/lib/libc/string/strncat.c |title=Super User's BSD Cross Reference: /OpenBSD/lib/libc/string/strncat.c |website=bxr.su}}</ref><ref>{{cite web |url=http://bxr.su/o/lib/libc/string/strncpy.c |title=Super User's BSD Cross Reference: /OpenBSD/lib/libc/string/strncpy.c |website=bxr.su}}</ref> * <code>err.h</code>{{snd}} contains some functions to print formatted error messages<ref>{{cite web |url=http://man.freebsd.org/err |title=err|website=Man.freebsd.org |date=29 March 2012 |access-date=25 August 2013}}</ref><ref>{{cite web |url=http://bxr.su/o/include/err.h |title=Super User's BSD Cross Reference: /OpenBSD/include/err.h |website=bxr.su}}</ref> * <code>vis.h</code>{{snd}} contains the <code>vis()</code> function. This function is used to display non-printable characters in a visual format.<ref>{{cite web |title=vis(3) |url=http://www.freebsd.org/cgi/man.cgi?query=vis&sektion=3&apropos=0&manpath=FreeBSD+9.1-RELEASE |website=Man.FreeBSD.org |access-date=14 September 2013}}</ref><ref>{{cite web |url=http://bxr.su/o/lib/libc/gen/vis.c#vis |title=Super User's BSD Cross Reference: /OpenBSD/lib/libc/gen/vis.c |website=bxr.su}}</ref><ref>{{cite web |url=http://bxr.su/o/include/vis.h |title=Super User's BSD Cross Reference: /OpenBSD/include/vis.h |website=bxr.su}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)