diff options
author | schwarze <> | 2019-01-18 07:32:17 +0000 |
---|---|---|
committer | schwarze <> | 2019-01-18 07:32:17 +0000 |
commit | f088490975411fdaef39d5aee455070b01b5440c (patch) | |
tree | 605e3717adf9d42d7e69449883b1199e84fdb429 /src/lib/libc/stdlib/labs.3 | |
parent | 0c5d69513c289e9ce0ad1d05ba2604b40af21910 (diff) | |
download | openbsd-f088490975411fdaef39d5aee455070b01b5440c.tar.gz openbsd-f088490975411fdaef39d5aee455070b01b5440c.tar.bz2 openbsd-f088490975411fdaef39d5aee455070b01b5440c.zip |
Replace the vague, incorrect, and confusing BUGS sections with CAVEATS
clearly stating which arguments have to be avoided, and mention the
header files defining the constants required for the checks.
Feedback and OK guenther@, OK bluhm@.
Diffstat (limited to 'src/lib/libc/stdlib/labs.3')
-rw-r--r-- | src/lib/libc/stdlib/labs.3 | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/labs.3 b/src/lib/libc/stdlib/labs.3 index 37a20b42f3..f3fd6fd528 100644 --- a/src/lib/libc/stdlib/labs.3 +++ b/src/lib/libc/stdlib/labs.3 | |||
@@ -29,9 +29,9 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: labs.3,v 1.16 2017/08/01 14:57:02 schwarze Exp $ | 32 | .\" $OpenBSD: labs.3,v 1.17 2019/01/18 07:32:17 schwarze Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: August 1 2017 $ | 34 | .Dd $Mdocdate: January 18 2019 $ |
35 | .Dt LABS 3 | 35 | .Dt LABS 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -40,6 +40,7 @@ | |||
40 | .Nm qabs | 40 | .Nm qabs |
41 | .Nd return the absolute value of a long integer | 41 | .Nd return the absolute value of a long integer |
42 | .Sh SYNOPSIS | 42 | .Sh SYNOPSIS |
43 | .In limits.h | ||
43 | .In stdlib.h | 44 | .In stdlib.h |
44 | .Ft long | 45 | .Ft long |
45 | .Fn labs "long i" | 46 | .Fn labs "long i" |
@@ -73,5 +74,15 @@ and | |||
73 | .Fn llabs | 74 | .Fn llabs |
74 | functions conform to | 75 | functions conform to |
75 | .St -isoC-99 . | 76 | .St -isoC-99 . |
76 | .Sh BUGS | 77 | .Sh CAVEATS |
77 | The absolute value of the most negative integer remains negative. | 78 | The results of applying |
79 | .Fn labs | ||
80 | to | ||
81 | .Dv LONG_MIN | ||
82 | and | ||
83 | .Fn llabs | ||
84 | to | ||
85 | .Dv LLONG_MIN | ||
86 | are undefined, and | ||
87 | .Fn qabs | ||
88 | is not portable in the first place. | ||