Commit Graph

8481 Commits

Author SHA1 Message Date
nectar
ebdf5cfddd The previous commit changed the behavior of nsdispatch() in the
case where an /etc/nsswitch.conf file was present, but could not
be opened (e.g. due to permissions).  Previously, the open failure
condition was suppressed, and the built-in defaults were used.  In
revision 1.11, however, propagated the open failure causing all
nsdispatch() invocations to return NS_UNAVAIL, and thus many APIs
including getpwnam and gethostbyname unconditionally failed.

This commit restores the previous behavior.

Pointy hat:	nectar  (+1 for obstinance; ache had to use clue bat)
Reported by:	ache
2004-04-01 19:12:45 +00:00
des
38842c29ce Raise WARNS level to 2. 2004-03-31 21:33:55 +00:00
des
2209468b0e Deal with aliasing warnings.
Reviewed by:	ru
Approved by:	silence on the lists
2004-03-31 21:32:58 +00:00
bms
723e163490 Merge of libpcap 0.8.3 from tcpdump.org. 2004-03-31 09:15:09 +00:00
peter
aeb757d841 Fix Yet Another 16 byte stack alignment bug. Thankfully, this one is
solved by a simple 'make world'.  The signalcontext function was going
to the trouble of generating an even 16 byte alignment, but in fact it
needed to be odd aligned to simulate the 8-byte return address having
been pushed by the caller.  This fixes yet another group of crashes in
applications using libpthread.  And yet again, it was my fault all along.

While here, rename the duplicate internal ctx_wrapper() functions to
makectx_wrapper() and sigctx_wrapper() so that traces aren't ambiguous.
2004-03-31 07:27:31 +00:00
nectar
7ec3e33301 When a dynamic NSS module is built and linked against a thread
library, it may pull in that thread library at run time.  If the
process started out single-threaded, this could cause attempts to
release locks that do not exist.  Guard against this possibility by
checking __isthreaded before invoking thread primitives.

A similar problem remains if the process is linked against one thread
library, but the NSS module is linked against another.  This can only
be avoided by careful design of the NSS module.

Submitted by:	Sean McNeil <sean@mcneil.com> (mostly; bugs are mine)
2004-03-30 15:56:15 +00:00
nyan
fcbd1c72ce MFi386: WARNS=4 clean. 2004-03-30 12:22:31 +00:00
tjr
1a32baef3b Add cross-references to isideogram(3), isphonogram(3), isrune(3),
isspecial(3) and wctype(3).
2004-03-30 08:11:57 +00:00
tjr
0e393613f2 Add basic manual pages for isideogram(), isphonogram(), isrune()
and isspecial().
2004-03-30 07:23:54 +00:00
tjr
94fd478493 Trim cross-references. 2004-03-30 07:19:35 +00:00
tjr
9d08058845 Document the isnumber() and ishexnumber() functions, and explain how they
differ (at least in theory) from isdigit() and isxdigit().
2004-03-30 07:02:04 +00:00
kuriyama
9b713c0d7f Down to WARNS=2 for a while. 2004-03-30 06:16:41 +00:00
kuriyama
235cde4aca Make libdisk WARNS=4 clean.
Glanced by:	jhb
2004-03-30 01:39:00 +00:00
tjr
8aa9f6fafe Remove duplicate MLINK. 2004-03-29 21:46:52 +00:00
mtm
a9677be93b o Also check that the mutex type is not less than the minimum allowable value.
o Don't check attribute for NULL. It's the callers responsibility.
2004-03-29 13:57:55 +00:00
mtm
f4172a5e78 Make the minimum implementation of pthread_kill conform to the
functionality spelled out in SUSv3.
	o Signal of 0 means do everything except send the signal
	o Check that the signal is not invalid
	o Check that the target thread is not dead/invalid
2004-03-29 13:56:04 +00:00
mtm
1f163908e4 o Don't explicitly check the thread for NULL. That is the caller's
responsibility.
o If a thread is not joinable, the correct return value is EINVAL.
2004-03-29 13:53:43 +00:00
mtm
319c9db836 o If a thread is marked as detached AND on the dead threads list
the correct return value is ESRCH.
o Don't check the attribute for NULL. It's the caller's responsibility.
o Make the bitwise comparison explicit.
2004-03-29 13:51:51 +00:00
mtm
e278045fda If a condition variable is statically initialized don't return
an error. Return successfully without doing anything.
2004-03-29 11:24:02 +00:00
mtm
f48b8920dc The thread suspend function now returns ETIMEDOUT, not EAGAIN. 2004-03-29 09:35:07 +00:00
mtm
e5540ff230 o Remove more references to SIGTHR
o Remove clock resolution information left over from libc_r
2004-03-29 05:45:01 +00:00
mtm
c715901410 Remove the garbage collector thread. All resources are freed
in-line. If the exiting thread cannot release a resource, then
the next thread to exit will release it.
2004-03-28 14:05:28 +00:00
schweikh
9ae4a75423 Fix a warning: compare u_long ps_strings to 0 instead of NULL. 2004-03-28 11:50:54 +00:00
mtm
1368ee7bbe o Since we're not using signals for thread synchronization anymore,
sigprocmask no longer needs to be wrapped.
o raise(3) is applied to the calling thread in a threaded program.
o In the sigaction wrapper reference the correct structure.
o Don't treat SIGTHR especially anymore (infact it won't exist in
  a little while).
2004-03-27 15:05:28 +00:00
mtm
9481d0539d Stop using signals for synchronizing threads. The performance penalty
was too much.
2004-03-27 14:39:21 +00:00
tjr
9b0a927d71 Recognize the "rune" character class in wctype(). 2004-03-27 08:59:21 +00:00
mtm
194cc11a54 o The mutex locking functions aren't normally cancellation points. But,
we still have to DTRT when an asynchronously cancellable thread is
  cancelled while waiting for a mutex.
o While dequeueing a waiting mutex don't skip a thread if it has
  a cancel pending. Only skip it if it is also async cancellable.
2004-03-26 14:47:54 +00:00
mtm
8d2a2db80c o Initialize a local variable before referencing it. This was not
the cause of any bugs because it is *always* indirectly set
  in the for...loop, but better to be explicit about it.
o Check the magic number of the passed in thread only after it has
  been found in the active thread list. Otherwise, if the check is done
  at the very beginning we may end up pointing to garbage if the
  thread was once a valid thread, but has now been destroyed.
2004-03-26 14:45:35 +00:00
ru
6320e86ac0 Document that kvm_open(3) also accepts "/dev/null" as a special
"corefile" argument, to access the running system via sysctl(3)
if possible, thus not requring special setgid privileges.
2004-03-26 08:05:39 +00:00
ru
b8af1b3b30 Document that libkvm also uses /dev/kmem, to access KVM. 2004-03-26 08:03:53 +00:00
bms
6fa18a5397 Document the existence of NET_RT_IFMALIST.
Reviewed by:	ru
2004-03-25 10:08:46 +00:00
ru
9e6098efd7 [troff] removed the unnecessary use of \_ escapes. 2004-03-25 09:25:24 +00:00
green
4927c84b48 Add locking so that arc4random(3) functions are all reentrant for
pthreads.

Submitted by:	Christian S.J. Peron <maneo@bsdpro.com>
2004-03-24 14:44:57 +00:00
kientzle
1a06758781 mdoc fixes 2004-03-23 03:14:01 +00:00
kientzle
30025170bd Just use autoconf-compatible feature macros; don't try to be clever. 2004-03-22 05:17:23 +00:00
tjr
f50e5eaa3b Document incorrect handling of multibyte characters. 2004-03-21 11:31:37 +00:00
peter
52b4c49f11 Adjust stack alignment so that when the 'call xxx' functions are
gathered into the middle of the _init and _fini sections, they get
executed with their expected stack alignment.
2004-03-21 01:39:01 +00:00
kientzle
bbabca3fda Bug: Standard C still requires declarations to precede statements. <sigh>
Portability: Eliminate an accidental __unused, accomodate
  systems with non-POSIX strerror_r
2004-03-20 22:35:33 +00:00
tjr
023efa65f4 Mention that funopen() uses fpos_t incorrectly in the BUGS section. 2004-03-20 08:41:12 +00:00
tjr
55f1dd7399 Improve documentation for fgetpos() and fsetpos(), and discourage
users from assuming that fpos_t is an integral type.
2004-03-20 08:38:27 +00:00
kientzle
ef0d6eb598 Many fixes:
* Disabled shared-library building, as some API breakage is
  still likely.  (I didn't realize it was turned on by default.)  If
  you have an existing /usr/lib/libarchive.so.2, I recommend deleting it.
* Pax interchange format now correctly stores and reads UTF8
  for extended attributes.  In particular, pax format can portably
  handle arbitrarily long pathnames containing arbitrary characters.
* Library compiles cleanly at -O2, -O3, and WARNS=6 on all
  FreeBSD-CURRENT platforms.
* Minor portability improvements inspired by Juergen Lock
  and Greg Lewis.  (Less reliance on stdint.h, isolating of
  various portability-challenged constructs.)
* archive_entry transparently converts multi-byte <-> wide character
  strings, allowing clients and format handlers to deal with either
  one, as appropriate.
* Support for reading 'L' and 'K' entries in standard tar archives
  for star compatibility.
* Recognize (but don't yet handle) ACL entries from Solaris tar.
* Pushed format-specific data for format readers down into
  format-specific storage and out of library-global storage.  This
  should make it easier to maintain individual formats without mucking
  with the core library management.
* Documentation updates to track the above changes.
* Updates to tar.5 to correct a few mistakes and add some additional
  information about GNU tar and Solaris tar formats.

Notes:
* The basic 'tar' reader is getting more general; there's not much
  point in keeping the 'gnutar' reader separate.  Merging the two
  would lose a bunch of duplicate code.
* The libc ACL support is looking increasingly inadequate for my needs
  here.  I might need to assemble some fairly significant code for
  parsing and building ACLs. <sigh>
2004-03-19 22:37:06 +00:00
dds
334e1c11e7 Shave-off troff cycles by invoking .Fa only once.
Submitted by:	ru
MFC after:	1 week
2004-03-19 16:04:11 +00:00
tjr
b893e6c496 Do not redundantly set the stream orientation in getc(), putc(), and
related functions - __sgetc() and __sputc() will set it when necessary.
2004-03-19 09:04:56 +00:00
tjr
41709fbe79 Update list of macros defined in <stdio.h>. 2004-03-17 12:54:06 +00:00
tjr
dab1ed1529 Re-add description of putc() macro (back out rev. 1.13.) 2004-03-17 12:46:17 +00:00
tjr
430cbeb954 Re-add text that says getc() is a macro (back out rev. 1.16.) 2004-03-17 12:37:28 +00:00
davidxu
12db4373da Fix a POSIX conformance bug. POSIX says sigwait should return error number
in return value not in errno.
2004-03-17 02:12:19 +00:00
tjr
b4d98c6855 Re-add macro versions of getc(), getchar(), putc(), putchar(), feof(),
ferror(), fileno() and clearerr(), using the value of __isthreaded to
decide between the fast inline single-threaded code and the more
general function equivalent. This gives most of the performance
benefits of the old unsafe macros while preserving thread safety.
2004-03-17 01:43:08 +00:00
des
3cb81148d8 Run through indent(1) so I can read the code without getting a headache.
The result isn't quite knf, but it's knfer than the original, and far
more consistent.
2004-03-16 21:30:41 +00:00
des
ce346529a3 Use unions to avoid violating C99 strict aliasing rules. 2004-03-16 20:42:02 +00:00