docs/164939: [PATCH] add a standards section to err.3
Niclas Zeising
zeising at daemonic.se
Thu Feb 9 20:00:23 UTC 2012
>Number: 164939
>Category: docs
>Synopsis: [PATCH] add a standards section to err.3
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 09 20:00:23 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Niclas Zeising
>Release: FreeBSD 9.0-BETA2 amd64
>Organization:
>Environment:
System: FreeBSD vincent.daemonic.se 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225368: Sat Sep 3 22:13:26 CEST 2011 root at vincent.daemonic.se:/usr/obj/usr/src/sys/VINCENT amd64
>Description:
The err() and warn() family of functions are part of our libc, but not part of the ISO C99 standard.
>How-To-Repeat:
>Fix:
The attached patch adds a STANDARDS section to err.3 mentioning that these functions are not part of the ISO C99 standard, and truly portable code should avoid using them.
--- lib.libc.gen.err.3.diff begins here ---
Index: head/lib/libc/gen/err.3
===================================================================
--- head/lib/libc/gen/err.3 (revision 231033)
+++ head/lib/libc/gen/err.3 (working copy)
@@ -212,6 +212,17 @@
.Xr printf 3 ,
.Xr strerror 3 ,
.Xr sysexits 3
+.Sh STANDARDS
+The
+.Fn err
+and
+.Fn warn
+functions are extensions and not part of
+.St -isoC-99 .
+As such they should not be used in truly portable code.
+Use
+.Fn strerror
+or similar functions instead.
.Sh HISTORY
The
.Fn err
--- lib.libc.gen.err.3.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-doc
mailing list