Commit Graph

4499 Commits

Author SHA1 Message Date
deischen
2d1163e370 Hide the definition of struct __sFILEX and add the needed
lock definitions to it.  flockfile state is now allocated
along with the rest of FILE.  This eliminates the need for a
separate allocation of flockfile state as well as eliminating
the mutex/lock used to serialize its allocation.
2001-03-01 05:22:14 +00:00
deischen
242ddf3c95 s/fstat/_fstat/
Approved by:	phantom
2001-03-01 04:59:01 +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
f4325cbb8b Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
jlemon
f962d0dc9b Use the new EV_SET macro to insure that all fields in struct kevent
are correctly initialized before use.  This should fix the problem
with DNS.

Pointy hat to:  me
2001-02-28 15:47:47 +00:00
ru
1f34e99769 mdoc(7) police: prepare for mdocNG. 2001-02-28 13:11:51 +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
obrien
f54404e03d Remove the `r' devices. 2001-02-27 23:29:13 +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
ru
9000b1de10 In soshutdown(), use SHUT_{RD,WR,RDWR} instead of FREAD and FWRITE.
Also, return EINVAL if `how' is invalid, as required by POSIX spec.
2001-02-27 13:48:07 +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
75878da23e Use ``.St -p1003.[12]''. 2001-02-26 16:12:39 +00:00
ru
caabf4417c Use ``.St -p1003.1g''. 2001-02-26 16:08:15 +00:00
ru
ba42cfc998 Use ``.St -p1003.1-96''. 2001-02-26 15:16:43 +00:00
ru
ec147c6b0d /^\.St/ s/-iso9945-1/-p1003.1-96/ 2001-02-26 14:48:38 +00:00
ru
b8b2293293 `.St -p1003.1b'' -> `.St -p1003.1b-93''. 2001-02-26 14:33:54 +00:00
ru
3ff23f918d .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
jasone
2534aff6a5 Document the EINTR error. 2001-02-26 09:38:01 +00:00
ru
c3bad89bb4 mdoc(7) police: use .Vt macro. 2001-02-26 09:15:17 +00:00
ru
9f97905571 Prepare for mdocNG. 2001-02-26 09:05:48 +00:00
jlemon
3794af37e6 Document various changes to kq:
- new EV_SET macro,
    - NOTE_LOWAT option for low water marks on read/write filters,
    - NOTE_REVOKE for filesystem unmounting (and revoke() calls)
    - improved API for EVFILT_AIO
2001-02-26 04:16:19 +00:00
deischen
a7a408f67f Really set the flags for a private mutex (used by libc/libc_r). 2001-02-26 01:06:52 +00:00
deischen
ead1438fd8 Limit threads clock resolution to no less than 1000usec (1000Hz).
PR:		25300
Submitted by:	Tom Pavel <pavel@alum.mit.edu> (in part)
2001-02-26 01:05:33 +00:00
olgeni
ce6c598807 Fix my ambiguous message about ECONNABORTED.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2001-02-25 23:56:41 +00:00
olgeni
8fe3c798ae Add ECONNABORTED to the ERRORS section. 2001-02-25 22:12:40 +00:00
tegge
03881b0e61 Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
phantom
c33a989ee7 Fix visibility of empty variable -- it should be static.
Submitted by:	bde and Hartmut Brandt <brandt@fokus.gmd.de> (via PR)
PR:		bin/25308
2001-02-24 13:13:48 +00:00
rwatson
78bbdcc2c4 Adapt libkvm_getswapinfo() to make use of recently committed vm and swap
sysctls exporting swap information.  When running on a live kernel,
the sysctl's will now be used instead of kvm_read, allowing consumers of
this interface to run without privilege (setgid kmem).  Retain the
ability to run on coredumps, or on a kernel using kmem if explicitly
pointed at one.

A side effect of this change is that kvm_getswapinfo() is faster now in
the general case. If the SWIF_DUMP_TREE flag is given (pstat -ss does
this), the radix tree walker, which still uses kvm_read in any case, is
invoked, and therefore does require privilege.

Submitted by:	Thomas Moestl <tmoestl@gmx.net>
Reviewed by:	freebsd-audit
2001-02-23 18:49:16 +00:00
green
77bc7b795e Correctly handle the race itself, too (don't leave it locked).
This is about to be replaced anyway by initialization explicitly
instead of lazily, and reducing the complexity of it.  As it is
now, this will work fine, however.
2001-02-23 17:55:01 +00:00
green
ea0fd4a1a4 Use the right names to call pthread_mutex_{,un}lock so that things
work in both the libc only and libc/libc_r case.
2001-02-23 06:26:22 +00:00
green
63ed3e92a9 Fix the problems I (and others, undoubtedly) have been having for a
while with threaded software in -CURRENT acting very "weird".  It has
seemed, for example, in Mozilla that threads attempting to do host
lookups have been locking up.  That's exactly the case.

There was a race condition in the implementation of the initialization
of the mutex used to protect FILE operations, first of all: multiple
instances of FLOCKFILE() in libc could occur on the same FILE at
the same time and cause strange behavior by overwriting eachothers'
creation of the mutex and the rest of the file lock.

Secondly, it's not appropriate to test the "validity" of the file
descriptor referenced by the FILE; if the code is calling FLOCKFILE()
or FUNLOCKFILE(), it wants the FILE to be locked or unlocked, not
to be locked or unlocked on the condition that _file is >= 0.  This
also could quite easily cause leaks by failing to perform the lock or
unlock operation when it actually is needed.

Mozilla now works again on -CURRENT when linked to libc_r.so.5 and
libc.so.5.
2001-02-23 04:59:12 +00:00
ru
2d99511f43 Prepare for mdoc(7)NG. 2001-02-22 15:03:09 +00:00
dcs
4656ee74ca Correct the prototype for pager_output(). 2001-02-22 10:58:30 +00:00
kris
4dc4c3edc5 Correct comment typos 2001-02-20 10:23:10 +00:00
peter
f64981b39c Place some hooks (__stdin, __stdout, __stderr) into libc for a future
ABI change.  There is some serious evilness here to work around some
gcc weaknesses.  We need to know the sizeof(FILE) manually until __sF
goes away in the next major bump.  We have the size for Alpha and i386,
missing is ia64, ppc and sparc* (and i386 with 64 bit longs).
At some point down the track we can change the stdin etc #defines to
stop hard coding the size of FILE into application binaries.

Lots of head scratching and ideas and testing by: green, imp
2001-02-20 01:56:52 +00:00
phantom
fa610ba2e2 cleanup commentaries 2001-02-19 19:09:00 +00:00
ume
4c1233433d Enable AI_ADDRCONFIG as a valid flag of getaddrinfo(3). Some
applications specify AI_ADDRCONFIG and fail to run under FreeBSD.
Latest mews is known.  Now, getaddrinfo(3) behaves according to
AI_ADDRCONFIG.
2001-02-19 13:13:51 +00:00
ache
2e6d7dce03 Deal properly with "0" 2001-02-19 06:19:51 +00:00
asmodai
0f00927ea0 Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
kris
65e412c000 Silence -Wnon-const-format 2001-02-18 04:51:47 +00:00
kris
9ebaa73623 Back out snprintf -> sprintf change until I have time to look at it. 2001-02-18 04:07:50 +00:00
ache
87ce1ec237 CRNCYSTR: determine '.' too 2001-02-17 11:15:30 +00:00
ache
0a2d6f1a0e Implement CRNCYSTR 2001-02-17 07:35:01 +00:00
imp
2d4d551f1e Extra needs to be initialized for our usual pool of FILEs. This was
causing some versions of as to dump core.  This survived make
buildworld/installworld and the building gettext port afterwards.

Submitted by: <nnd@mail.nsk.ru> "N.Dudorov"
Reviewed by: "Daniel M. Eischen" <eischen@vigrid.com>
2001-02-16 21:09:49 +00:00
imp
51cffb6bac Fix the current libc breakage in current:
o Back out the __std* stuff.  Can't figure out how to do this right now,
  so we'll save it for late.
o use _up as a pointer for extra fields that we need to access.
o back out the libc major version bump.

Submitted by: green
reviewed by: peter, imp, green, obrien (to varying degrees).

We'll fix the "how do we stop encoding sizeof(FILE) in binaries" part
later.
2001-02-16 06:11:22 +00:00
tegge
af67e8b5e1 Don't depend on lcl_mutex being a recursive mutex.
Reviewed by:	deischen
2001-02-15 22:17:04 +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
ume
bf66c2eda8 Correct 2nd argument of getnameinfo(3) to socklen_t.
Reviewed by:	itojun
2001-02-15 10:35:55 +00:00
peter
abdca07e35 List the SA_RESTART flag rather than burying it in another paragraph. 2001-02-14 21:46:07 +00:00