Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Feb 2012 20:57:03 +0100 (CET)
From:      Niclas Zeising <zeising@daemonic.se>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/164939: [PATCH] add a standards section to err.3
Message-ID:  <201202091957.q19Jv3DI064093@vincent.daemonic.se>
Resent-Message-ID: <201202092000.q19K0N48031186@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202091957.q19Jv3DI064093>