bjh21
6c97e2bd78
Initial commit of arm26 port
2000-05-09 21:55:44 +00:00
is
2ced82ab8e
Add the (void)&acc; hack from strtouq.c to strtoull.c. This works around
...
an arm32 compiler bug. Change the comment in strtouq.c to reflect the current
usage of the hack.
2000-05-02 12:39:03 +00:00
enami
d76da5f70c
Fix the bug introduced in rev 1.28 and actually caused failure on alpha;
...
In the function malloc_make_chunks, don't define the local variable ``l'',
which is used to hold the actual size of pginfo, as size_t. Define it as
a signed integer as before. We expect it to become zero or negative value,
and we know that it is much smaller than pagesize and it is small enough to
fit in signed interger.
2000-04-07 15:15:08 +00:00
enami
07fd543922
Backout the previous backing out.
2000-04-07 14:56:13 +00:00
wiz
3492cfdd4b
small fixes; not yet complete
2000-04-07 00:02:32 +00:00
christos
6d34da153c
Add "namespace.h" and include <getopt.h> since we moved the stuff out
...
of <unistd.h>
2000-04-02 22:04:06 +00:00
christos
bfb2439e73
Remove sections relevant to getopt, and add implementation differences.
2000-04-02 20:30:07 +00:00
christos
6dfafca13a
New getopt_long from Thomas Klausner and Dieter Baron
2000-04-02 20:27:58 +00:00
erh
5aef3fa29b
Make mbstowcs and wcstombs work correctly when handed NULL pointers.
2000-04-01 19:42:57 +00:00
enami
c09a75571b
Add missing comma.
2000-03-16 04:57:11 +00:00
kleink
c2ee7198c1
Need to quote excessively long Nd argument.
2000-03-15 20:53:57 +00:00
kleink
31f60ab101
No longer need internal names for strtoq() and strtouq().
2000-03-08 20:17:19 +00:00
kleink
4c3c49ae8b
Make lint happy about long long integers. (C99 mode for lint, anyone?)
2000-03-07 20:02:00 +00:00
kleink
e4d7c2e329
Add ISO C99 long long integer general utility interfaces; partially addresses
...
PR standards/9482.
2000-03-06 18:32:22 +00:00
thorpej
62c7591543
Back out the previous 2 revs. The delint'ing of this file caused
...
something to break horribly on the Alpha.
2000-01-31 22:56:14 +00:00
elric
e0b171cf6d
Added a tab before a '}' to put the brace in the right place.
2000-01-25 23:22:49 +00:00
mycroft
8102096d08
Delint.
2000-01-23 00:49:41 +00:00
mycroft
03ec2c38fe
Partially delint, and a few microoptimizations.
2000-01-23 00:38:43 +00:00
mycroft
605490369c
Delint.
...
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
hubertf
959b8807ca
Document that errno is set to ENOMEM if no memory can be allocated.
2000-01-09 16:14:04 +00:00
kleink
087b539e0f
Change the declaration of the argv argument to getopt(3) from "char * const *"
...
(as originally declared in System V) to "char * const []", as was done in
1003.2 and subsequently propagated into XPG4.
From Andrew Cagney in PR lib/8930.
1999-12-02 13:15:55 +00:00
msaitoh
4e87e41c66
check __sh3__
1999-11-26 07:39:45 +00:00
kristerw
1276709f38
Typos (from OpenBSD)
1999-11-19 23:29:45 +00:00
enami
82d7115cf2
Don't pass so many args to .Nd macro. It just overflows.
1999-11-19 01:12:39 +00:00
lukem
d896261208
back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
...
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem
b48252f365
* use _DIAGASSERT() to check pointer arguments against NULL and file
...
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.
the first two items result in the addition of code similar to the
following in various functions:
_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
1999-09-16 11:44:54 +00:00
lukem
bd926931f5
whitespace knf
1999-09-16 09:43:42 +00:00
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
mycroft
9f5f4ac699
Make some needed weak aliases.
1999-08-17 03:58:39 +00:00
lukem
c2601fffee
replace malloc(3) with one from freebsd which documents our new malloc.c
...
(also from freebsd). comment out references to reallocf with .\"XXX"
for now. i also fixed some roff misuse as well.
replace calloc(3), free(3) and realloc(3) with links to malloc(3)
1999-08-02 03:18:46 +00:00
mcr
62da59d7b4
getopt long functionality
1999-07-23 03:55:27 +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
tls
3e2a95b2e4
add FreeBSD's malloc, compiled in only if MALLOC_NEW is set in mk.conf
1999-06-17 19:33:36 +00:00
christos
4a522f3501
add a const castaway lint comment.
1999-05-03 15:34:05 +00:00
tron
beee4cf82e
Fix typo noted by NAKAJIMA Yoshihiro in PR lib/7328.
1999-04-06 19:44:42 +00:00
garbled
38c96853cf
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
...
so we shouldn't override it with versions in the manpages. Wheee!
1999-03-22 19:44:33 +00:00
kleink
10ec438820
Add 3 additional slots to the statically allocated exit handler array to
...
guarantee the ANSI-defined 32 registrations being possible despite those exit
handler registrations made by the startup code (a.out: 2, ELF: 3).
1999-03-22 19:09:10 +00:00
erh
bdfd2b2770
Add missing .El lines.
1999-03-09 19:45:09 +00:00
drochner
a34eb7c1b7
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
...
libc builds on pmax again
1999-02-24 15:05:20 +00:00
christos
7975455d45
t{search,find,walk,delete} from OpenBSD via Neil A. Carson
1999-02-22 10:33:15 +00:00
bad
855e0d3934
getopt() does not return -1 when encountering an unknown option.
...
Also, minor KNF nit in an example.
1999-02-07 16:52:56 +00:00
kleink
4ba3ee1071
Serialize freelist access with a mutex.
1999-02-06 16:01:22 +00:00
kleink
e2b924d2ae
Add l64a_r(), a reentrant version of l64a(); found in the Multithreading
...
Extension of SVID4.
1999-02-06 15:04:05 +00:00
simonb
bf0aa4630d
Changes from Niklas Hallqvist from OpenBSD. Commit message there was:
...
Make code ANSI/ISO C conformant. Formerly undefined constructs were used
making load/store architectures (like mips&alpha) fail whn compiled with
gcc -O2.
Tested on mips and i386 ok. Can someone with an alpha test this please?
1999-02-06 02:05:01 +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
kleink
2125814fb5
1003.2-92 specifies the string "--" to be recognized as the option list
...
delimiter as opposed to any string merely beginning with '-''-'; change to
match the standard. From Simon J. Gerraty <sjg@quick.com.au> in PR lib/6762.
1999-01-09 20:31:07 +00:00
christos
eeb9152be3
Since we are forcing unsigned shifts for portability, define Unsigned_shifts
1998-11-16 17:43:32 +00:00
christos
33edc15a8c
delint
1998-11-15 17:13:51 +00:00
kleink
2cf006181e
Slight formatting glitch.
1998-10-19 15:52:37 +00:00
matt
3a1b5096a9
More vax -> __vax__ cruft.
1998-10-19 03:32:27 +00:00
kleink
cd85b5e5ac
Protect __atexit manipulation and traversal with a mutex.
1998-10-18 14:36:30 +00:00
kleink
5e62d8161d
Exit via _exit() rather than exit(), as the latter would cause exit handlers
...
installed using atexit() to be executed which is supposed to happen on
`normal termination' of the process only, whereas abort() is specifically
defined to cause `abnormal termination'.
1998-10-12 15:56:16 +00:00
christos
50157f6e5e
Adapt to posix signal system calls.
1998-09-26 23:54:25 +00:00
kleink
4bbb5fd353
Add a multiple-reader/single-writer lock to protect environ.
1998-09-11 21:03:18 +00:00
kleink
c9f14e5e97
Addendum to previous commit: remove stdio usage from sections during which
...
random_mutex is locked, because
* a cancellation point may occur during fprintf(), and no cancellation handler
had been installed, and
* the XSH5 specifcation of these functions does not permit output to stderr.
Therefore, in initstate() and setstate(), return a null pointer if the supplied
state is not valid. This also fixes a bug in setstate() which caused corrupt
state information being used despite printing an error message.
1998-09-09 19:34:00 +00:00
kleink
7c5f290f7e
Add a mutex to protect the state.
1998-09-09 12:27:32 +00:00
lukem
ce83c69e00
first pass at fixing up capitalization of function names and
...
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
1998-08-29 08:32:32 +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
ross
871fe159d1
English.
1998-07-29 03:38:30 +00:00
mycroft
982e920022
const poisoning.
1998-07-26 14:13:00 +00:00
mycroft
9ad899cc18
constify some tables.
1998-07-26 11:24:14 +00:00
kleink
e4baf78ef2
It's 1998, actually.
1998-06-14 17:54:59 +00:00
kleink
d393974f10
Add a manual page for a64l() and l64a().
1998-06-14 17:47:15 +00:00
kleink
d4cc868265
Per XPG4.2, if the `value' argument evaluates to 0L, don't return a NULL
...
pointer but a pointer to an empty string.
1998-06-14 17:28:15 +00:00
fair
aba63e6a51
fix mdoc references and mistakes
1998-04-28 21:19:49 +00:00
fair
c46ab392dc
Principally, change foo(N) to .Xr foo N
...
Also, do some other mdoc tagging.
1998-04-28 04:07:04 +00:00
perry
ebc2166ef6
changes to (partially) quiet lint.
1998-02-28 00:09:45 +00:00
kleink
5f311d2174
Cast size_t to long for printing.
1998-02-06 14:35:46 +00:00
kleink
ee3e47997f
Update standards section for putenv().
1998-02-06 13:53:17 +00:00
perry
312aca536f
add LIBRARY section to man page
1998-02-05 18:45:17 +00:00
kleink
df0d6631b5
Per XPG4.2, change the `n' argument of initstate() to size_t. (Since it was
...
recently changed from int to long (lite-2 import), I saw no reason to delay
this `alignment'.)
1998-02-04 21:06:14 +00:00
perry
a16d9e868b
.Bx'ize
1998-02-03 21:42:54 +00:00
perry
c8bafd6265
remove obsolete register declarations
1998-02-03 18:38:12 +00:00
mycroft
51c4c84e39
Nuke `register', deal with GCC warnings.
1998-02-03 01:48:30 +00:00
mycroft
a0326f2ee6
Nuke `register'.
1998-02-03 01:46:27 +00:00
mycroft
704290aaa1
Deal with GCC warning.
1998-02-03 01:40:49 +00:00
perry
c52ced5ca9
include <unistd.h> instead of <stdlib.h> to fix a compile error caused
...
by the fact that the prototype for getopt has moved to unistd.h
1998-02-03 01:30:17 +00:00
perry
764a8201df
realpath is now part of getcwd.c in gen/; man page moved to gen, too.
1998-02-02 23:20:35 +00:00
frueauf
d922341864
Add _strtoq.c back to SRCS+= which seemed to get lost while reordering it.
1998-02-01 14:03:47 +00:00
thorpej
163c89fb8a
Pull in <string.h> to get strcmp() prototype.
1998-01-31 20:43:48 +00:00
thorpej
edf59accb5
RCS ID police, and add explicit return value to getsubopt().
1998-01-31 20:41:39 +00:00
perry
5f8a6c06f3
update to lite-2
1998-01-30 23:37:40 +00:00
perry
78ef0c30cb
import lite-2
1998-01-30 21:42:13 +00:00
perry
b51ed80fd5
RCS Id Police.
1998-01-09 04:11:49 +00:00
perry
4e067afcb1
RCS Id Police.
1998-01-09 03:15:09 +00:00
enami
2b952b2261
Remove an extra comma at the end of SEE ALSO list.
1997-11-18 07:00:48 +00:00
enami
dafe39d6fe
Use .Sh RETURN VALUES instead of .Pp, as malloc.3 or free.3 does.
1997-11-18 06:58:46 +00:00
mrg
4e252e8c4d
add missing .Nm entries. from spz@serpens.swb.de.
1997-11-14 02:04:36 +00:00
cgd
023cd79c6b
lint stubs for functions which ports use assembly versions. When using
...
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
1997-11-06 00:51:04 +00:00
cgd
4d7e773266
A foolish consistency... gen, net, and string all get MD sources
...
specified by including a Makefile.inc from the appropriate MD directory.
stdlib doesn't do that, but there's no reason that it shouldn't (and
it'd be nice to eliminate the 'if's from the MI stdlib Makefile.inc).
1997-11-05 22:59:37 +00:00
thorpej
2a43f22095
__warn_references and __indr_reference semicolon fixups. From
...
Chris Demetriou <cgd@pa.dec.com>.
1997-11-04 23:52:05 +00:00