Commit Graph

448 Commits

Author SHA1 Message Date
asmodai
1036376e73 Add ERRORS section.
Mention thread safety and async-cancel safety status [not].
Add standards compliancy references.
Note strtol() is preferred over atoi().

MFC after:	2 weeks
2001-09-26 20:22:44 +00:00
asmodai
176ff42ed5 Be explicit about the POSIX version it conforms to [in this case 1990].
Put the error comment under the more appropriate ERRORS section.
2001-09-26 20:10:10 +00:00
asmodai
518e58c70b Change standards compliancy order so that C and POSIX are grouped. 2001-09-26 19:42:39 +00:00
mike
c097487da5 style(9)
Silence from:	phantom
2001-09-17 00:23:19 +00:00
ru
05234b1d16 mdoc(7) police: changed pure POSIX text; added missing markup bits. 2001-09-11 09:39:23 +00:00
asmodai
fe6129599e Add more standards which we conform to.
Note our implementation is not thread nor async-cancel safe.
Explicitely note atof() does not check nor report errors.
Note that strtod() should be used instead.
2001-09-09 21:09:53 +00:00
asmodai
e08a19072b Detail thread-safe and async-cancel-safe status.
Also add C99 conformity status plus clarification that C99 leaves the
flushing of unwritten data, closure of open streams, and removal of
temporary files to the implementation.
2001-09-09 18:52:00 +00:00
asmodai
a04d04aa06 Move to using .In instead of .Fd #include <> for include mark-up.
Inspired by comment from:	dd
2001-09-07 14:46:36 +00:00
phantom
ae41577e4e reconnect strfmon.c to build list 2001-09-07 13:03:16 +00:00
asmodai
b883ee05be Fix some mdoc nits caused by my knowledge not being too up-to-date on
mdocNG.

Submitted by:	dd
2001-09-07 12:38:10 +00:00
dfr
890e070aa1 Port to ia64, taking into account the fact that pagesizes may be variable. 2001-09-07 12:32:43 +00:00
asmodai
aa037ff4c0 Add strfmon.3 to the fray.
This is a first cut, but enough to help people interested in using it
further than before.
More text coming to illustrate use and provide more details.

Based on standards' text.
2001-09-07 09:55:28 +00:00
phantom
ef56905cb0 correctly wrap macros with { } 2001-09-06 09:26:28 +00:00
obrien
c2f1c203f1 strfmon(3) is not ready to go live. 2001-09-06 08:58:42 +00:00
phantom
2b26e9313c Add strfmon(3) implementation. It still contains few XXX's because I lost
my last version of this work due to HDD crash, but this version cleanly
passed all POSIX and SuSv2 tests. I am working on testing scripts which
should test this implementation against all locales and surely more fixes
will come soon.

Reviewed by:	ache, silence at -audit & -developers
2001-09-05 18:50:02 +00:00
ache
c516d85954 Portability fix: use unsigned cast to guaranteed positive part of expression
in case {L}LONG_MAX > abs({L}LONG_MIN).  Non-functional change - we don't
have any such platforms.
2001-09-04 21:28:01 +00:00
ache
a9d341bd9b Remove rcsids and unneded include 2001-09-04 17:41:20 +00:00
ache
48c9c31dbb 'acc' is not initialized in one hypotetical case, fix it 2001-09-04 17:12:15 +00:00
ache
cd61d5ab48 Locale *is* used in strto*l*(), at least for isspace(), so remove
'locale not used' statement from comments and BUGS section of manpage.

strtol(): fix non-portable 'cutoff' calculation using the same method as
in strtoll().

Cleanup 'cutoff' calculation, remove unneded casts. Misc. cleanup to
make all functions looks the same.

Implement EINVAL reaction per POSIX, document it in manpage, corresponding
POSIX example quotes here:

------------------------------------------------
If the subject sequence is empty or does not have the expected form, no
conversion is performed; the value of str is stored in the object pointed
to by endptr, provided that endptr is not a null pointer.

If no conversion could be performed, 0 shall be returned and errno may be
set to [EINVAL].

[EINVAL] The value of base is not supported.

Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX} are
returned on error and are also valid returns on success, an application
wishing to check for error situations should set errno to 0, then call
strtol( ) or strtoll ( ), then check errno.
-----------------------------------------------------
2001-09-04 16:39:11 +00:00
ru
69224c0edd Use ``.Rv -std'' wherever possible.
Submitted by:	yar
2001-08-31 09:57:38 +00:00
jkoshy
033062de28 If the string specifying the allowed options starts with a leading `:',
`getopt(3)' should not print a warning for missing argument values.

PR:		bin/29625
Reviewed by:	mikeh
MFC after:	1 week
2001-08-16 03:27:03 +00:00
ru
14c81f3796 Fixed style bugs (dot `.' at the end of error and warning messages).
Noticed by:	bde
2001-08-10 11:46:37 +00:00
ru
c41292f634 Markup nits: use diagnostic type lists for error and warning messages.
Backout previous revision.  We should not expand plain text xrefs if
they appear in the literal text, e.g. in the error or warning message
of the library function.  (Submitted by: bde)

Moved "out of memory" from warning to errors section.
2001-08-10 11:41:55 +00:00
yar
27b7f2d4e7 Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.
Reviewed by:	ru
2001-08-09 13:32:13 +00:00
ru
6787c701a8 mdoc(7) police: expand plain text xrefs. 2001-08-08 11:48:28 +00:00
mp
8151115973 Only pull in the MD files if they exist. This allows for progressive
implementation and compilation when bringing up a new architecture.
2001-07-31 16:34:52 +00:00
dd
a145482cf6 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
ru
317b7d8e37 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
ru
1c060c459c mdoc(7) police: eliminate -ww warnings. 2001-07-09 15:54:36 +00:00
dd
eaa6ee03b8 mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
ru
3a4b4ffda9 mdoc(7) police: mark NULL with .Dv. 2001-07-04 12:04:25 +00:00
dd
0c88f20748 mdoc(7) police: the BUGS section should go after HISTORY and AUTHORS. 2001-06-24 20:58:20 +00:00
dd
f895aac665 The fact that phk wrote this is not a bug! 2001-06-24 20:56:39 +00:00
dd
0b9658e72e Reword a sentence to make it proper English. 2001-06-24 18:11:42 +00:00
dd
7e284cc83d urandom(4) -> random(4) in comments.
PR:		27858
Submitted by:	Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Reviewed by:	md5(1)
Approved by:	markm
2001-06-07 02:32:18 +00:00
dd
075fc28fc8 urandom(4) -> random(4)
PR:		27858
Submitted by:	Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Approved by:	markm
2001-06-07 02:31:03 +00:00
ru
5d7d030eb3 Add new, from scratch implementation of hsearch() et al that actually works.
Obtained from:	NetBSD
MFC after:	1 month
2001-05-15 07:08:20 +00:00
ru
c507c0ccd6 Grammar nit. 2001-04-27 08:16:57 +00:00
ache
43a5f99125 Add sranddev.3 to MLINKS 2001-04-23 11:11:00 +00:00
ache
873e76a169 Add #include "un-namespace.h" 2001-04-23 10:38:26 +00:00
ache
18527260ea srand*dev() fallback code: change ^getpid() to ^(getpid() << 16) to allow
change of high word part too to produce more interesting seed distribution.
2001-04-23 10:14:28 +00:00
ache
fb76083ae2 Add sranddev() since srand() is not vary much with seed, typical time 2001-04-23 02:29:10 +00:00
ru
25ef23ac1c MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
dd
3d978abb64 Make tdelete(3), tfind(3), and twalk(3) links to tsearch(3).
Approved by:	nik
2001-03-15 01:53:17 +00:00
obrien
130eca7d1b Merge in strtoul.3 rev 1.11 mdoc(7) police changes:
.Nd line broken in rev 1.10
	use .Bx for ``BSD''
2001-02-28 17:46:56 +00:00
ru
eb11ec5a72 mdoc(7) police: fix the .Nd line broken in previous revision.
Noticed by:	bde

Use .Bx for ``BSD''.
2001-02-28 12:54:16 +00:00
ache
3646349667 Use formula with better random distribution for rand()
Even better formula from random() could not be intetgrated because rand_r()
supposed to store its state in the single variable (but table needed for
random() algorithm integration).
2001-02-27 14:42:19 +00:00
obrien
79916cd3d7 I accidently deleted an include when I added the $FreeBSD$ so I could
check in my changes.
2001-02-27 14:30:42 +00:00
obrien
bb70e1687a Impliment the ISO-C99 strto[u]ll()
and rewrite strto[u]q() in terms of it.
2001-02-27 13:33:07 +00:00
ru
3ff23f918d .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
tegge
03881b0e61 Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
tegge
6a8ad1fd29 Remove freelists managed by Balloc/Bfree.
Change __dtoa to not free the string it allocated the previous time it was
called.  The caller now frees the string after usage if appropiate.

PR:		15070
Reviewed by:	deischen
2001-02-15 22:12:50 +00:00
ru
01c704e495 "Cross references in the SEE ALSO section should be sorted by section
number, and then placed in alphabetical order and comma separated.",
mdoc.samples(7) said.
2001-02-12 08:30:22 +00:00
ru
0a9118516a mmap(3) -> mmap(2). 2001-02-12 08:27:06 +00:00
nik
9fc53ff195 Include mmap(2) in the list of memory allocation functions.
Reviewed by:	hackers
2001-02-11 19:28:36 +00:00
nik
b05520c6ae .Xr to mmap. 2001-02-11 18:53:50 +00:00
ru
491030fdcc mdoc(7) police: mark LC_NUMERIC with .Dv. 2001-02-10 10:26:52 +00:00
ache
0e7900a440 Note that decimal point taken from locale 2001-02-10 06:42:32 +00:00
ache
2cb0d28611 Note the fact that decimal point taken from locale (according to SUSv2) 2001-02-10 05:16:41 +00:00
ache
4060fa06fa Use decimap_point from localeconv() instead of hardcoded '.'
Obtained from:	inspired by NetBSD strtod
2001-02-10 05:05:09 +00:00
tegge
172bac8699 Backout previous commit. Use of spinlocks was not approved.
PR:		15070
2001-02-09 20:31:48 +00:00
tegge
d93ead21a2 Protect freelists managed by Balloc/Bfree with a spinlock.
Change __dtoa to not free the string it allocated the previous time it was
called.  The caller now frees the string after usage if appropiate.

PR:		15070
2001-02-08 20:22:28 +00:00
ru
5addfd60d6 mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged.  With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
2001-02-07 13:45:30 +00:00
bde
4846f5fbda Fixed C error(s) in synopsis. Many were hiding under mdoc errors. 2001-02-05 15:19:56 +00:00
phk
098a0a97ed Remove a sizeof(void *) == sizeof(int) assumption.
Submitted by:	Loren James Rittle <rittle@latour.rsch.comm.mot.com>
2001-02-04 10:06:24 +00:00
ru
8a6f8b5fe4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
deischen
1635c221b7 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
ru
3d8401c62e Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
ru
0a221c5a50 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
ru
6378a80ceb Fixed typo not fixed in previous revision. 2000-12-29 14:36:05 +00:00
ru
8ba4187688 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ru
c23c39b3a4 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
obrien
c2ee1dcc02 Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
mph
84bc874893 The parameter that contains valid options is "optstring", not "optarg". 2000-11-28 22:06:17 +00:00
phk
5df764b518 Make it possible to override the function which writes messages to
stderr in case of warnings and errors.

Rename malloc_options to have a leading underscore, I belive I have been
told that is more correct namespace wise.
2000-11-26 10:30:18 +00:00
ru
bdc5340b39 mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
ru
eb8c554f56 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
ru
7d99729431 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
ru
ff45078d39 Fixed typos. 2000-11-06 15:46:57 +00:00
eivind
b94f208d17 Back out previous commit (MLINK malloc.conf.5 -> malloc.3).
This did not work correctly with whatis(1).

Issue brought up by:	mpp
2000-10-29 13:20:24 +00:00
eivind
01fd1b0f22 Add link malloc.conf.5 -> malloc.3 2000-10-29 09:59:35 +00:00
brian
d3ad46b5d5 Oops, un-spam this file - the last commit was an accident.
Pointed out by: phk
2000-09-20 06:16:23 +00:00
brian
556211d48c Only realloc() environ if we're sure that we know where it came from.
The recent problems with sshd were due to sshd reassigning
`environ' when setenv() thinks it owns it.  setenv() subsequently
realloc()s the new version of environ and *boom*
2000-09-20 03:05:37 +00:00
imp
78c14ae89a Don't print an error message if the bad option is '?'. This has been
in my tree for a long time.  bde reviewed this once upon a time and
said it was OK, iirc.  This also obviates the need to put ? in the
optstring argument to preclude the extra warning message which some
people think confuses users.  When I made my getopt cleanups of a long
time ago, this was the compromise reached.  I just neglected to commit
it until now.
2000-09-04 03:49:22 +00:00
phk
2845a5b541 Turn malloc options "AJ" on by default.
These will be turned off again as we approach 5.0-RELEASE.

If you benchmark things, make sure to
	ln -sf j /etc/malloc.conf
to see "true" performance.
2000-07-09 13:10:18 +00:00
alfred
5a1e6c960d bring in binary search tree code.
Obtained from: NetBSD
2000-07-01 06:55:11 +00:00
sheldonh
14e9cd73ea Fix miscellaneous mdoc macro argument limit infringements.
PR:		18465
Reported by:	Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
2000-05-09 14:02:06 +00:00
phantom
3a61ac3c01 Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:00:11 +00:00
mpp
c0f912fb2f Minor mdoc cleanup.
PR:		docs/13218
2000-05-05 02:21:45 +00:00
phantom
5401879e3b Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
phk
296f8c148a Add a missing THREAD_UNLOCK() found missing by Valentin Nechayev
<netch@segfault.kiev.ua>

Remove allocation failure check from 'A' option, the 'X' option does
this as a standalone check now.
2000-04-10 09:24:44 +00:00
charnier
abcb2d08a5 Spelling, fprintf -> err, remove unneeded variable declaration 2000-03-26 15:18:12 +00:00
jasone
23c4215cb0 Take care to avoid having "strong" and "weak" symbols of the same name in
libc_r.
2000-03-16 02:14:41 +00:00
chris
ed1d6704fb Merge from RELENG_3 (oops):
resolved_name	-> resolved_path
    resolvedname	-> resolved_path
2000-01-29 19:43:25 +00:00
jasone
8abe2a2d86 Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo().  In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate.  In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().

Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().

Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().

Make thread cancellation fully POSIX-compliant.

Suggested by:	deischen
2000-01-27 23:07:25 +00:00
ru
275ce72a91 o Back out rev 1.4 - reallocf() failure clobbers existing `environ'.
o Do not override `environ' if realloc() fails, leave it intact.
o Set `alloced' only when memory is actually allocated.

PR:		bin/5604 (2nd part)
Reviewed by:	bde
2000-01-27 16:12:03 +00:00
archie
af563a21f8 Document the memory leak that is inherent in FreeBSD's semantics
for getenv()/putenv().

PR:	10341 5604
2000-01-26 22:10:56 +00:00
jasone
75903038bc Add three-tier symbol naming in support of POSIX thread cancellation
points.  For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep().  The arrows represent weak aliases.  For
system calls, the pattern is _read() <-- _libc_read() <-- read().
2000-01-12 09:23:48 +00:00
hoek
25fa278a58 Make example for handling "-##" work and comply with style(9). Still
doesn't handle nastier corner cases such as "-j3 -33" correctly.  <shrug>

PR:		docs/12994 (James Howard <howardjp@wam.umd.edu>)
2000-01-06 01:25:15 +00:00
hoek
30af2ca344 Add history: The reallocf() function first appeared in FreeBSD-3.0.
See imp's 199808201619.KAA20970@harmony.village.org in freebsd-hackers (the
reallocf.c cvs history mistakenly refers to freebsd-current).
1999-12-28 15:14:59 +00:00
bde
6b050d7244 Fixed missing installation of a link to rand_r.3. 1999-12-23 16:00:50 +00:00
sheldonh
54243b8e7a Document the current behaviour with respect to the handling of errno.
Approved by:	phk
1999-12-22 17:04:46 +00:00
jkh
dd89aff001 Fix handling of trailing :'s to match what other OSes do (spit out
a diagnostis).

Submitted by:	Guy Harris <gharris@flashcom.net>
1999-12-17 01:52:15 +00:00
chris
ed204f848e Add a cross-reference to fabs(3) man page.
PR:		docs/15337
Submitted by:	Bruce A. Mah <bmah@ca.sandia.gov>
1999-12-07 23:09:58 +00:00
kris
3853bec4b5 Typo
Obtained from:	OpenBSD
1999-11-15 03:13:23 +00:00
peter
70fc0d318e Go to a bit more trouble to make it absolutely clear that malloc(3)
does not zero the allocated memory.
1999-11-12 16:41:21 +00:00
chris
63b5167082 Change .Fn to .Xr on a couple of lines where abort(3) is referenced. 1999-09-25 22:42:12 +00:00
peter
93f9277c83 Tidy up $Log$ debris. 1999-09-05 17:42:45 +00:00
peter
c81dbb3c98 $Header$ -> $FreeBSD$ 1999-08-28 05:11:36 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
mpp
b813f67e2a Various man page cleanup:
- Sort xrefs
- FreeBSD.ORG -> FreeBSD.org
- Be consistent with section names as outlines in mdoc(7)
- Other misc mdoc cleanup.

PR:		doc/13144
Submitted by:	Alexy M. Zelkin <phantom@cris.net>
1999-08-15 09:51:25 +00:00
chris
d680f15828 Fix .Xr line for `getpagesize' 1999-08-14 07:33:15 +00:00
hoek
6a57215607 Mention that EXIT_SUCCESS and EXIT_FAILURE are preferred over
sysexits.h-values as exit codes for portable programs.
1999-08-01 20:46:45 +00:00
nik
f7a8bc4c04 Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:50:10 +00:00
des
dfaa48d6e0 Back out previous commit after discussing it with Dmitrij Tejblum. 1999-07-07 21:01:20 +00:00
des
8987e649ca Always set errno to ENOMEM when returning 0 from malloc() or realloc().
Approved by:	phk
1999-07-07 19:54:08 +00:00
wes
07cfb42e12 Added Posix rand_r function. 1999-05-24 23:30:14 +00:00
phk
eed7c97f34 Disable the "Hint" option in phkmalloc as default. Recent VM system
changes have made this too expensive.  This gains about 1.25% on
worldstone on my SMP machine.

Swap-less machines, for instance PicoBSDs, and machines which experience
page-out trafic, check with top(1), will probably want to reenable this
with:
	ln -s H /etc/malloc.conf

Suggested by: alc (&dyson ?)
1999-03-28 14:16:05 +00:00
ghelmer
7a5b08f806 Correct synopsys: getsubopt is declared in unistd.h, not stdlib.h.
PR:		docs/9376
1999-03-02 02:35:57 +00:00
ache
a36bb76941 fix tabs lost apparently in copy&paste 1999-02-12 19:45:53 +00:00
jkoshy
2c3bd3ad9c Clarify format of exit status code. Note when a return code of -1 can
be expected.

PR:		docs/9701
Submitted by:	Marc van Kempen <marc@bowtie.nl>
1999-01-27 03:54:09 +00:00
rnordier
6037124de3 Include mergesort() in description of errors. 1998-11-04 09:27:03 +00:00
rnordier
05e7da8d39 Drop unused labels. 1998-11-04 09:22:07 +00:00
rnordier
6ffb967233 Handle a zero elements argument.
PR:		8566
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-11-04 08:55:34 +00:00
jb
8d80497304 Delete the XXX comments that refer to spinlock recursion. The malloc/free/
realloc functions check for recursion within the malloc code itself. In
a thread-safe library, the single spinlock ensures that no two threads
go inside the protected code at the same time. The thread implementation
is responsible for ensuring that the spinlock does in fact protect malloc.
There was a window of opportunity in which this was not the case. I'll fix
that with a commit RSN.
1998-09-30 06:13:59 +00:00
dfr
7fdf235da0 Use 8k pagesize on alpha, not 4k. 1998-09-23 21:26:04 +00:00
alex
6afe7a9f53 Back out part of previous commit (even though it's technically correct).
Our spinlock implementation allows a particular thread to obtain a lock
multiple times, but release the lock with a single unlock call.  Since
we're detecting recursion, we know the lock is already owned by the
current thread in a previous call and must not be released in the
current call.  This is really far too dependent on this particular
spinlock implementation, so I've added commented out calls to
THREAD_UNLOCK in the appropriate places.  We can activate this code when
spinlock is taught to count each lock operation.
1998-09-20 01:07:50 +00:00
alex
2945cc62f8 Correctly back out of free if a recursive call into malloc.c is detected.
Set malloc_func *after* grabbing the thread lock.

Noticed by:	Simon Coggins <simon@oz.org>
1998-09-19 20:55:36 +00:00
imp
bfe73fd683 Replace memory leaking instances of realloc with non-leaking reallocf.
In some cases replace if (a == null) a = malloc(x); else a =
realloc(a, x); with simple reallocf(a, x).  Per ANSI-C, this is
guaranteed to be the same thing.

I've been running these on my system here w/o ill effects for some
time.  However, the CTM-express is at part 6 of 34 for the CAM
changes, so I've not been able to do a build world with the CAM in the
tree with these changes.  Shouldn't impact anything, but...
1998-09-16 04:17:47 +00:00
imp
5c7c8dfbe2 o Don't reference non-existant function freealloc.
o Properly order things

Pointed out by: bde
1998-09-16 04:07:31 +00:00
imp
f706ca01b7 Fix style problems noted by Bruce:
o No copyright on reallocf.
	o Order makefile list correctly.
	o indent reallocf properly.
1998-09-16 03:16:06 +00:00
imp
d54a12dd1f Add reallocf to the library. This function is simliar to realloc, but
when it returns NULL to indicate failure, it will also free the memory
that was passed to it, if that was non-null.

This does not change the semantics of realloc.

A second commit will be done to commit the conversion of those places in
the code that can safely use this to avoid memory leaks when confronted
with low memory situations.

Beaten-to-death-but-finally-approved-in: -current
1998-09-14 20:34:34 +00:00
peter
03956e03bf preserve errno across the readlink() calls. There is no value in trashing
errno during a successful malloc() call.
1998-06-18 09:13:16 +00:00
jb
439aa43648 Add support for thread lock debug. No impact of the malloc code. 1998-06-09 08:30:32 +00:00
jb
1baebded07 This is a hack to workaround source that is coded to use long variables
but also assumes that they are 32-bits. This is one place where I don't
think it is appropriate to change 'long' to 'int'. I don't see why the
code couldn't be fixed so that using natural long variables does the
right thing. It's spaggetti code so it'll take some effort. Obviously
NetBSD thought so too because they change 'long' to 'int32_t' etc
and left it at that. As a temporary measure FreeBSD/Alpha can use the
NetBSD code and put this on the list of things to fix.
1998-05-08 05:41:57 +00:00
rnordier
f35a3f07ec Fix a few nits in quoted code fragments and elsewhere. 1998-05-04 23:16:50 +00:00
jb
f1fb79481d Replace the threaded locking with spinlock calls for both threaded
and non-threaded programs. This makes malloc thread safe for linking
with libpthread and kernel threads.

Reviewed by: phk
1998-04-29 09:10:58 +00:00
jb
0d8f4028af Reference an external variable in threaded programs so that the
autoinitialiser gets linked in and therefore called before main().
1998-04-29 09:08:43 +00:00
jb
44b61e0100 Use signal() in both the threaded and non-threaded cases. 1998-04-29 09:06:13 +00:00
dima
f475e872ad indent 1998-04-20 22:13:50 +00:00
phk
525c97c21d Remove a nolonger implented "BUGS" description.
PR:		6240
Reviewed by:	phk
Submitted by:	Niall Smart rotel@indigo.ie
1998-04-11 07:37:44 +00:00
jb
4c358b50ec Add a global variable called __isthreaded that can be tested throughout
libc to determine if locking is required. This is needed in libc
for use with kernel threads, but until a thread is created, we don't
really want to bother locking things. The variable was added here
because the crt code calls exit(main()) so all programs will get the
variable.
1998-04-11 07:02:58 +00:00
jb
43c2287620 Change in name of the static initializer define. 1998-04-04 11:03:07 +00:00
charnier
79fc0e5555 .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
jb
1b6316f0e7 NetBSD doesn't have a utrace syscall, so don't define that if
__NETBSD_SYSCALLS is defined.
1998-03-09 07:00:38 +00:00
jb
7bfcc9edbb Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:41:46 +00:00
alex
eac766f136 Drop the use of caddr_t in conjunction with mmap(2). 1997-12-31 03:15:06 +00:00
jb
da6ab2349a Fix recursion problem which occurs when a signal is received during
a malloc. The signal handler creates a thread which requires a malloc...
For now, the only thing to do is to block signals. When we move user
pthreads to use the kernel threads, mutexes will be implemented in kernel
space and then malloc can revert.
1997-12-15 02:12:42 +00:00
bde
ea35ce8d73 Sorted lists. 1997-10-21 08:41:15 +00:00
bde
d1bc3e7989 Handle machine-dependent (stdlib) sources more automatically.
This fixes bugs in the manual handling.  abs.[cS] was handled too
specially and the wrong (.c) variant for each of div.[cS], labs.[cS]
and ldiv.[cS] was added to SRCS.  This caused the .c variant to be
used if `depend' was made and the .S version to be used otherwise.
1997-10-16 14:58:30 +00:00
bde
ef5c98dd45 Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
1997-10-15 16:16:41 +00:00
charnier
1754071cd4 environmental -> environment. 1997-09-18 06:55:21 +00:00
phk
6152eccaa4 Another 32bits of 64bits conformance.
Reviewed by:	phk
Submitted by:	jdp
1997-08-31 05:59:39 +00:00
phk
cb8d9886a9 Improvement of type independency for the bitmap.
This makes 64bit operation more likely.

Reviewed by:	phk
Submitted by:	jdp
1997-08-27 12:04:33 +00:00
phk
f276c66ddf Malloc option H is now default. 1997-08-27 06:40:34 +00:00
steve
fc8b5b4955 Get rid of integer overflow warning.
PR:		misc/3575
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-08-23 23:51:12 +00:00
jdp
81e43f0b38 Fix a minor typo. It only affects the sparc version. 1997-07-26 03:43:14 +00:00
phk
1483aecd5e realpath() should break on looped symlinks.
PR:		3911
Reviewed by:	phk
Submitted by:	Shigio Yamaguchi <shigio@wafu.netgate.net>
1997-07-16 11:25:48 +00:00
peter
486333fcfd kill the undead 1997-07-13 14:26:00 +00:00
bde
c800b77e17 This commit was generated by cvs2svn to compensate for changes in r27180,
which included commits to RCS files with non-trunk default branches.
1997-07-03 03:28:27 +00:00
bde
e2f0a0f35c Import Lite2's src/lib, except for non-i386 machine-dependent directories,
libc/db, libc/gen/crypt.* and libtelnet.  All affected files except 3
unimportant ones have already left the vendor branch.
1997-07-03 03:28:27 +00:00
phk
73643318c3 Have another go at the malloc-sysv initialization.
PR:		4002
Pointed out by:	bde
1997-07-02 19:33:23 +00:00
phk
a4c2098502 malloc_sysv used before initialized, reported in PR4002 by
Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>

Various cleanup from Keith Bostic

Reinstate calloc() as a separate funtion, in its own source/object file.
leave the manpage integrated with malloc.3 and friends.  Too many things
were broken in this respect.

PR:		4002
Reviewed by:	phk
Submitted by:	Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Submitted by:	Keith Bostic <bostic@bostic.com>
1997-07-01 18:39:38 +00:00
steve
7a5541cde7 Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
phk
e682320b6b Integrate calloc with the rest of the gang.
Various portability and stylistic cleanups.
Kill MALLOC_STATS & the 'D' option.
Fix the 'V' option.
Major overhaul of the man-page.
You milage should not vary.

Reviewed by:	Keith Bostic <bostic@bostic.com>
Submitted by:	Keith Bostic <bostic@bostic.com>
1997-06-22 17:54:27 +00:00
ache
898607164b srandomdev: use stack junk value in the fallback code too 1997-06-15 18:23:19 +00:00
ache
98ddc15c28 Instead of copying fallback code over and over in each program,
implement (better) falback code inside srandomdev() itself.
Change return type from int to void (binary compatibility surprisely
achieved). Userland code will be changed soon.
1997-06-14 00:14:29 +00:00
phk
88464dd9dc Add yet an option, this time on how to deal with malloc(0) and realloc(ptr.0)
Prompted by:	X11 & XFree86
1997-06-12 12:45:45 +00:00
jb
5158253c97 Fix mutex initialization.
Malloc cannot use pthread_mutex_init() to initialize a mutex because
the mutex initialization process does a malloc!

libc_r internals skip the malloc and assign an initializer to a static
structure and point the opaque type (pthread_mutex_t in this case) to
that structure. This is done on the assumption that the mutex will never
be destroyed. This style of initialization is only valid inside libc_r
because the structure that is assigned is opaque to the user.

This fix allows a simple program to get to main() again. 8-)
1997-06-04 12:55:49 +00:00
phk
51cf1d5bbc Malloc flag X makes malloc behave like the canonical xmalloc() wrapper.
Untested support for Solaris from John-Mark Gurney

Reviewed by:	phk
Submitted by:	(partially) John-Mark Gurney <gurney_j@resnet.uoregon.edu>
1997-05-30 20:39:32 +00:00
jb
a1337bb0ae Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
1997-05-03 03:50:06 +00:00
max
bf45fa98fc Typo.
PR:		#3178
Submitted by:	Josh Gilliam <soil@quick.net>
1997-04-25 20:36:10 +00:00
bde
4d078cb8d9 Fixed #include and/or prototype bugs in synopsis. 1997-04-19 15:57:20 +00:00
bde
d6e9aa93dc Fixed missing consts in synopsis. 1997-04-13 13:37:56 +00:00
ache
869ea014d0 Remove orand* code as promised for the next release 1997-03-29 19:55:03 +00:00
ache
d16568f141 Add srandomdev.3 link 1997-03-23 23:12:59 +00:00
ache
27fa1c8849 Fix urandom reference in the comment 1997-03-23 23:09:31 +00:00
ache
d2a19efd66 Add srandomdev() description 1997-03-23 23:08:31 +00:00
ache
b9d8a7cc98 Add srandomdev() function (use "/dev/urandom" now)
Submitted by: wollman & me (add type casts and remove unneded loop)
1997-03-23 22:40:20 +00:00
mpp
70978b19ab Remove an extra comma. 1997-03-22 23:48:12 +00:00
mpp
739a0bf676 Use the .Tn macro for generic FreeBSD references. Other minor cleanup. 1997-03-21 20:57:20 +00:00
phk
2efc53e737 Check for overflow in size argument.
Tested by:	Joel Maslak <j@pobox.com>
Closes:		PR kern/2964
1997-03-18 07:54:24 +00:00
ache
30ee004f83 Fix arg types to match Lite2 1997-03-17 16:27:16 +00:00
peter
5f73b5e6c7 Part 2 of a failed commit (cvs broke). Original message:
Back out a dubious Lite2 change to "optimise" getcwd() to look at $PWD
because it's potentially dangerous (think: symlink races).  Move
realpath() back to it's original location, and remove getcwd_physical()
by renaming it back to getcwd() and zapping the original getcwd wrapper.

Noticed by: bde

The following commits already happened but the log message got lost:

Modified Files:
   gen/Makefile.inc gen/getcwd.c stdlib/Makefile.inc
Removed Files:
   gen/realpath.3
1997-03-13 06:58:46 +00:00
peter
78c59a98a4 Back out a dubious Lite2 change to "optimise" getcwd() to look at $PWD
because it's potentially dangerous (think: symlink races).  Move
realpath() back to it's original location, and remove getcwd_physical()
by renaming it back to getcwd() and zapping the original getcwd wrapper.

Noticed by: bde
1997-03-13 06:45:38 +00:00
peter
8574ea8a0e Merge Lite2 changes 1997-03-11 11:39:58 +00:00
peter
bb2b65bb1c merge from Lite2 - realpath() now shares a lot of code with getcwd()
and is now in the same file.
1997-03-11 11:37:59 +00:00
peter
e0e06d68d5 Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch 1997-03-11 11:29:42 +00:00
peter
e8e23405de This commit was generated by cvs2svn to compensate for changes in r23658,
which included commits to RCS files with non-trunk default branches.
1997-03-11 11:29:42 +00:00
peter
6b08958c64 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
wosch
6d0dbd7455 Sort cross references. 1997-01-20 23:23:22 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
alex
5f299ee771 _thread_kern_sig_unblock takes an integer, not a reference.
Submitted by:	John Birrell <jb@cimlogic.com.au>
1996-12-29 02:38:50 +00:00
wosch
0426c0af88 comma typos 1996-12-23 23:09:55 +00:00
phk
10c5f03c81 If you run with option Z and malloc fails, memset gets called
with a NULL pointer (archie)
Explain that minsize is also the smallest alignment.

Submitted by:	Archie Cobbs <archie@whistle.com>
1996-10-29 20:35:39 +00:00
alex
7f80fc5431 Note that streams are now flushed on abort.
Change standards section to reflect POSIX 1003.1-1990 conformance.
1996-10-26 18:14:44 +00:00
phk
bc3c11514b Various cosmetics
Improve chances of troublefree 64bit operation. [imp]

Noticed by:	Warner Losh <imp@village.org>
1996-10-26 08:19:07 +00:00
alex
b5adba895d POSIX requires stdio buffers be flushed on abort.
Obtained from:	OpenBSD, Thorsten Lockert <tholo@OpenBSD.ORG>
1996-10-26 01:42:33 +00:00
phk
dcce35102d malloc_pages should be static.
Add progname to warning/error message layout. (joerg)
Remove inline assembler, no speed impact, not need for the obfuscation (bde)
Remove on the fly calculation of parameters, no longer critical.
Make D & U flags valid even if we don't support them.
Don't call imalloc until we're done initializing.
Zap contents on free() if we have "Junk" set. [*]
Various nitpicking.

[*] As a sideeffect of this change, if you are worried about
sensitive data lingering in memory, you can use the 'Junk' option
now to make sure phkmalloc zaps memory when it is returned.  add
	char * malloc_options = "J";
to your source.  Obviously there is a performance impact.
1996-10-20 13:20:57 +00:00
ache
c00dcd7b7a Improve seeding, the random sequence did not vary match
with the seed. Old variant will be available via libcompat soon.
1996-10-09 15:59:04 +00:00
phk
331ec6879b Don't use malloc, pessimize to use sbrk.
fix sbrk manpage while we're at it.
1996-09-27 15:34:19 +00:00
sos
330982acee Fix a typo.
Reviewed by:	 phk
1996-09-25 16:29:15 +00:00
phk
b0488ab962 A number of minor bogons and portability things from jdp.
Submitted by:	jdp
1996-09-25 08:30:46 +00:00
wosch
89dea7c61d add missing comma(s) in .Xr macros 1996-09-23 22:24:39 +00:00
phk
8362cc2d1d phkmalloc/3
Various neat features added.  More documentation in the manpage.
If your machine has very little RAM, I guess that would be < 16M
these days :-(,  you may want to try this:
	ln -fs 'H<' /etc/malloc.conf
check the manpage.
1996-09-23 19:26:39 +00:00
phk
cd3f943120 Fix a very rare error condition: The code to free VM back to the kernel
as done after a quasi-recursive call to free() had modified what we
thought we knew about the last chunk of pages.
This bug manifested itself when I did a "make obj" from src/usr.sbin/lpr,
then make would coredump in the lpd directory.
1996-09-17 19:50:23 +00:00
bde
7d4c1814f6 Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'.  Warn about this in future.
1996-08-31 14:48:13 +00:00
mpp
5e0b8a5234 Correctly use .Fn instead of .Nm to reference function names
in a bunch of man pages.

Use the correct .Bx  (BSD UNIX) or .At (AT&T UNIX) macros
instead of explicitly specifying the version in the text
in a bunch of man pages.
1996-08-22 23:31:07 +00:00
mpp
ccc340f5aa Update a bunch of man pages to use .Fn instead
of .Nm when referencing funciton names.
1996-08-22 22:05:59 +00:00
mpp
a9ea88b748 Correctly document when getopt returns EOF and '?', and some other
minor cleanup.
1996-08-21 19:48:50 +00:00
jkh
c4d4a99d31 General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
phk
c88590ee78 Isolated all the crap for thread-safe so I can see what goes on again... 1996-07-03 05:03:07 +00:00
jraynard
597045971f Oops, replace a rather important line that was lost in transit 8-( 1996-06-08 15:28:11 +00:00
jraynard
f12d02958a Submitted by: (based on code in "Advanced Programming in the Unix Environment"
by W.Richard Ste vens. EINTR handling suggested by bde@freebsd.org).

Code cleanup:

1. Add missing return type.
2. Replace 'union wait' by int.
3. Use Posix-style signal handling instead of signal().
4. Use fork() instead of deprecated vfork().
5. Block signals before fork()'ing, instead of after.
6. Return -1 if fork() fails, instead of 0.
7. Add EINTR handling for waitpid() call.

Also add claim of Posix conformance to man page.
1996-06-05 00:08:54 +00:00
mpp
ba6f97d58c Fixed various problems: typos, grammer, missing include files
wrong function type declarations, and wrong argument type
declarations.
1996-05-23 01:05:25 +00:00
bde
b0b36003dc Don't include <sys/types.h> when it isn't used.
This commit covers most of the ANSI library functions. Many others only
need <sys/types.h> because they use u_xxx.
1996-04-19 18:40:25 +00:00
joerg
f55ef7e508 Xref sysexits(3). 1996-03-31 22:31:51 +00:00
mpp
822fdcab93 Added missing section numbers to a bunch of .Xr macros, or
converted them into .Fn macros where appropriate.  Also fixed
up some minor formatting problems.
1996-03-27 20:49:07 +00:00
mpp
f153098d8f Fixed a bunch of man page cross references that were
in the main text of various man pages.

Thanks to Warner Losh for adding an option to manck to allow
it to scan the entire man page looking for bogus xrefs, instead
of just checking the SEE ALSO section.
1996-02-15 20:07:05 +00:00
mpp
3aeb7f1d49 Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
1996-02-11 22:38:05 +00:00
mpp
62cdcaa268 Fix even more spelling errors in some more man pages. 1996-01-30 16:34:52 +00:00
julian
619b731f5b Reviewed by: julian and (hsu?)
Submitted by:	 John Birrel(L?)

changes for threadsafe operations
1996-01-22 00:02:33 +00:00
jkh
b589e2455c Return pointer to new hash node when search inserts it (e.g. there
was some datum given).
1996-01-13 14:25:04 +00:00
phk
ccd7b7cc3f Fix a fencepost error.
Found by: Lars Fredriksen <fredriks@mcs.com>
1996-01-05 23:30:41 +00:00
peter
9e723d65b3 recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
peter
c3f352d4ad This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
bde
6a0ace8bd0 Added prototypes. 1995-12-26 13:25:13 +00:00
phk
fbbda41bed Preallocate a small structure, so we can sbrk(2) further back.
Reviewed by:	phk
Submitted by:	Kaleb Keithly <kaleb@x.org>
1995-12-18 12:03:54 +00:00
peter
bb88f51c8e Change phkmalloc so that the page directory is now floating and allocated
via mmap() up around the shared library area.  Previously the directory
was allocated from space from it's own memory pool.  Because of the way it
was being extended on processes with large malloced data segments (ie: inn)
once the page directory was extended for some reason, it was not possible
to lower the heap size any more to return pages to the OS.
(If my understanding is correct, page directory expansion occurs at 4MB,
12MB, 20MB, 28MB, etc.)  I was seeing INN allocate a large amount of short
term memory, pushing it over the 28MB mark, and once it's transient demands
hit 28MB, it never freed it's pages and swap space again.)

I've been running this in my libc for about a month...

Also, seperate MALLOC_STATS from EXTRA_SANITY..  I found it useful to call
malloc_dump() from within INN from a ctlinnd command to see where the hell
all the memory was going.. :-)  I've left MALLOC_STATS enabled, as it has
no run-time or data storage cost.

Reviewed by: phk
1995-12-11 14:28:12 +00:00
phk
d06fcfa2c5 Mino cleanup, #includes & unused vars. 1995-10-22 14:53:17 +00:00
phk
073a1e809a Remove EXTRA_SANITY, fix a unused var. 1995-10-22 14:47:00 +00:00
dg
43c7f23817 Doubled the performance of getenv()/__findenv() by rewriting it to not
use strncmp()..
1995-10-17 21:37:41 +00:00
phk
b965b1036f phkmalloc/2
"zero' and 'junk' options to help find and diagnose malloc abuse.
EXTRA_SANITY defaults "junk" to on.
Don't dump the internal state, unless EXTRA_SANITY.
General code cleanup.
Error messages cleaned up a bit, more checking earlier.
EXTRA_SANITY is default at this time (just in case).
Performance (without EXTRA_SANITY) is better, beats gnumalloc in
both time & space most of the time:

	# In-memory test.
	./malloc 50000000 2000 8192
	159.2u 1.5s 2:41.85 99.3% 5+7742k 0+0io 0pf+0w
	./gnumalloc 50000000 2000 8192
	272.6u 0.4s 4:35.01 99.3% 5+8533k 0+0io 0pf+0w

	# Swap-space test.
	./malloc 500000 14000 8192
	6.5u 4.1s 4:08.87 4.3% 5+49209k 0+0io 9772pf+0w
	./gnumalloc 500000 14000 8192
	16.2u 14.5s 15:36.14 3.2% 5+54100k 0+0io 47651pf+0w

	# Small items test.
	./malloc 20000000 20000 2048
	67.0u 0.3s 1:07.83 99.2% 5+18199k 0+0io 4pf+0w
	./gnumalloc 20000000 20000 2048
	66.2u 0.3s 1:07.03 99.3% 5+18107k 0+0io 0pf+0w

SANITY is not an option anymore. (!!)
1995-10-08 18:44:20 +00:00
phk
42a27824b7 A buglet when dumping and a stylistic point from Mike.
Submitted by:	Mike Pritchard <mpp@mpp.minn.net>
1995-09-22 14:11:00 +00:00
phk
3f27b3de03 ``phkmalloc''
Performance is comparable to gnumalloc if you have sufficient RAM, and
it screams around it if you don't.
Compiled with "EXTRA_SANITY" until further notice.
see malloc.3 for more details.
1995-09-16 09:28:13 +00:00
ache
923e998823 Make strtod conforms manpage, use isspace to skip initial whitespaces
instead of hardcoded whitespaces
1995-08-01 22:20:16 +00:00
ache
0548e292bd Similar changes like in strtol, all this family is VERY broken
in 8bit environment (isalpha at the end of digits)
1995-08-01 22:04:57 +00:00
ache
9246df9bb4 strtol and atoi VERY broken in 8bit chars locale, i.e. if you pass something
like 38400<any 8bit char, isalpha> it not detect this stuff and
produce very big number instead. Fixed by operating with unsigned char
and checking for isascii. (secure/telnetd hits by it f.e.)
1995-08-01 21:38:00 +00:00
rgrimes
f05428e4cd Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
jkh
afdcd6ad46 Fix a missing _hash() to prevent namespace pollution with the db/hash routines.
Grrr.  If the dbhash routines weren't grossly overengineered I wouldn't
even need to do this! :-(

Also now export the hash_stats routine.  Manpage coming RSN - I promise.
1995-03-28 08:41:02 +00:00
ache
04eca1b0ef Hash 8bit chars without sign extension 1995-03-26 19:32:24 +00:00
jkh
8851a8c5cc Add the strhash family of routines. They provide a number of features
that the db/hash functions don't, and they're much simpler to use for
low-overhead string hashing.
1995-03-26 10:21:55 +00:00
bde
17a5fa641e Don't attempt to lstat() the POSIXLY invalid empty pathname.
realpath() still accepts "" as an arg and converts it to a canonical
pathname for the current directory.
1995-02-25 16:06:07 +00:00
bde
5a325be3b5 u_int -> unsigned int, so that we don't have to include <sys/types.h>
or depend on <stdio.h> bogusly including it.
1994-09-05 13:26:40 +00:00
wollman
e017c781ca First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work.  Still to be done: RPCand YP merge.
1994-08-05 01:19:12 +00:00
rgrimes
be22b15ae2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
rgrimes
e043687c62 This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.
1994-05-27 05:00:24 +00:00
rgrimes
cb2f2e712b BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00