Commit Graph

26 Commits

Author SHA1 Message Date
kleink 9e00e84f98 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.
1999-09-10 10:38:06 +00:00
kleink 5f3726439e Need "namespace.h". 1999-08-22 12:54:02 +00:00
thorpej 602452569d Make sure errno is set to ENOMEM if we return NULL. 1999-07-08 22:18:06 +00:00
thorpej 4d36288136 index -> ldx (and similar in some related variable names). Avoids a lint
warning.
1999-07-05 22:14:38 +00:00
thorpej 55fcfba6fe Oops, back out 1.21. Christos and I apparently stepped on each other. 1999-07-05 22:12:20 +00:00
christos 06b51a1a11 s/index/idx/
s/EXTRA_SANITY/MALLOC_EXTRA_SANITY/
const poisoning
use sysconf to get the pagesize
1999-07-05 21:55:46 +00:00
thorpej 3cedf1e346 Compute page size related parameters at run-time. 1999-07-05 21:49:05 +00:00
thorpej b2146da05a EXTRA_SANITY -> MALLOC_EXTRA_SANITY, consistently. 1999-07-05 21:08:38 +00:00
thorpej f759ceb8bf Only define MADV_FREE do MADV_DONTNEED if it's not already defined
by <sys/mman.h>.
1999-07-04 03:12:47 +00:00
tls e89d5d52c5 The 'new malloc' (phk's malloc, from FreeBSD) is now our only malloc. 1999-06-26 04:44:36 +00:00
kleink fd13be3c46 Protect access of state with a mutex. Miscellaneous notes:
* still needs an implementation-independent ("reentrant.h") method for
disabling cancellation,
* break a leg to leave realloc() `storage compaction' as was for non-reentrant
code,
* use of stdio in assertion code is unsafe.
1999-01-29 08:11:36 +00:00
christos 33edc15a8c delint 1998-11-15 17:13:51 +00:00
perry 69d1215a28 make memcpy into memmove in some cases 1998-08-26 00:29:29 +00:00
perry a843f0f8a5 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-10 02:43:08 +00:00
perry c8bafd6265 remove obsolete register declarations 1998-02-03 18:38:12 +00:00
perry 5f8a6c06f3 update to lite-2 1998-01-30 23:37:40 +00:00
jtc 43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
christos bd9067774f Add local.h for local prototypes.
Fix namespace issues for strtoq and strtouq
Fix gcc warnings.
Fix RCSID's
1997-07-13 20:16:31 +00:00
christos 0940e9d8bf PR/3448: Bill Sommerfeld: Change "p" to __STRING(p) 1997-04-07 03:12:14 +00:00
cgd 54c7614104 don't confuse long and int; pointed out by lint 1996-12-20 20:32:02 +00:00
jtc 03edaa24b7 The C standard says (about realloc) that "If size is zero and ptr is
not a null pointer, the object it points to is freed."  Reported by
Peter Seebach in PR #1806.
1996-01-17 02:45:25 +00:00
thorpej 6dda330ef6 New-style RCS ids. 1995-12-28 08:51:55 +00:00
cgd 5eca8fd521 casting types. 1994-10-19 03:06:34 +00:00
jtc 9c20f740a3 Declare rcsid strings so they are stored in text segment. 1993-08-26 00:43:03 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00