summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/labs.3
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2019-01-18 07:32:17 +0000
committerschwarze <schwarze@openbsd.org>2019-01-18 07:32:17 +0000
commit467be13057a9a2a9da30be6cabf7469933f614ea (patch)
tree19d47d0c71e2cec461f0ed03105dc092c29d6fe0 /lib/libc/stdlib/labs.3
parenttweak previous; (diff)
downloadwireguard-openbsd-467be13057a9a2a9da30be6cabf7469933f614ea.tar.xz
wireguard-openbsd-467be13057a9a2a9da30be6cabf7469933f614ea.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 'lib/libc/stdlib/labs.3')
-rw-r--r--lib/libc/stdlib/labs.319
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/libc/stdlib/labs.3 b/lib/libc/stdlib/labs.3
index 37a20b42f36..f3fd6fd528d 100644
--- a/lib/libc/stdlib/labs.3
+++ b/lib/libc/stdlib/labs.3
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: labs.3,v 1.16 2017/08/01 14:57:02 schwarze Exp $
+.\" $OpenBSD: labs.3,v 1.17 2019/01/18 07:32:17 schwarze Exp $
.\"
-.Dd $Mdocdate: August 1 2017 $
+.Dd $Mdocdate: January 18 2019 $
.Dt LABS 3
.Os
.Sh NAME
@@ -40,6 +40,7 @@
.Nm qabs
.Nd return the absolute value of a long integer
.Sh SYNOPSIS
+.In limits.h
.In stdlib.h
.Ft long
.Fn labs "long i"
@@ -73,5 +74,15 @@ and
.Fn llabs
functions conform to
.St -isoC-99 .
-.Sh BUGS
-The absolute value of the most negative integer remains negative.
+.Sh CAVEATS
+The results of applying
+.Fn labs
+to
+.Dv LONG_MIN
+and
+.Fn llabs
+to
+.Dv LLONG_MIN
+are undefined, and
+.Fn qabs
+is not portable in the first place.