summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc.3
diff options
context:
space:
mode:
authorkleink <kleink@NetBSD.org>1999-09-10 10:38:06 +0000
committerkleink <kleink@NetBSD.org>1999-09-10 10:38:06 +0000
commit9e00e84f9887c796a7b5ffdacf218151fee28512 (patch)
tree2598a1cb2e2c4646faa7cc51c126da9179292ff9 /lib/libc/stdlib/malloc.3
parent3e7102ecac14373c87cae51b6f764de409219f46 (diff)
Restore the behaviour of not setting errno to ENOMEM when allocating 0
units of storage and returning a null pointer in System V mode; this was broken by the `fix' in rev. 1.24. Also, as it is stated in ISO C that such operation does not constitute an allocation failure, do not abort() even if the `X' option is set. Amusingly enough the SVID, Fourth Edition, specifies the `unique pointer' return behaviour for this kind of allocation, so this is kind of mis-named.
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r--lib/libc/stdlib/malloc.35
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index e5abb3679b7..2986a1d7666 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: malloc.3,v 1.10 1999/08/02 03:18:47 lukem Exp $
+.\" $NetBSD: malloc.3,v 1.11 1999/09/10 10:38:06 kleink Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -207,9 +207,6 @@ a valid pointer.
(The default behavior is to make a minimal allocation and return a
pointer to it.)
This option is provided for System V compatibility.
-This option is incompatible with the
-.Dq X
-option.
.It X
Rather than return failure for any allocation function,
display a diagnostic message on stderr and cause the program to drop