Commit Graph

1783 Commits

Author SHA1 Message Date
Tim Vanderhoek
b91cc296c8 Add .Xrefs to tolower.3 and toupper.3, respectively. 1999-12-28 14:10:21 +00:00
Robert Watson
7ea38f3479 Suppress vast quantities of unneeded warnings spewed by libc's gethostbydns
on encountering a real-world SIG record during a lookup of another type.

PR:		bin/7352
Reviewed by:	peter, eivind
1999-12-28 07:21:08 +00:00
Yoshinobu Inoue
9b59fde4e0 Small bug fix and improvements
(1)added error check of if_nameindex() return value at getaddrinfo().
  (2)print out more detailed information when getaddrinfo() error value
     is EAI_SYSTEM.(in this case system error num is kept in errno)

(1) is Discovered by: jinmei@kame.net in KAME environment.
1999-12-28 05:37:39 +00:00
John Polstra
3600eb76c6 Work around an assert failure in the dynamic linker's default thread
locking functions.  If an application loads a shared object with
dlopen() and the shared object has an init function which requires
lazy binding, then _rtld_bind is called when the thread is already
inside the dynamic linker.  This leads to a recursive acquisition
of the lock, which I was not expecting -- hence the assert failure.

This work-around makes the default locking functions handle recursive
locking.  It is NOT the correct fix -- that should be implemented
at the generic locking level rather than in the default locking
functions.  I will implement the correct fix in a future commit.

Since the dllockinit() interface will likely need to change, warn
about that in both the man page and the header file.
1999-12-28 04:38:17 +00:00
Yoshinobu Inoue
7d56d3747c Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-28 02:37:14 +00:00
Peter Wemm
0ba6f08f0a Make this compile with -Wall -Werror 1999-12-27 08:40:40 +00:00
John Polstra
d3980376e8 Add a new function dllockinit() for registering thread locking
functions to be used by the dynamic linker.  This can be called by
threads packages at start-up time.  I will add the call to libc_r
soon.

Also add a default locking method that is used up until dllockinit()
is called.  The default method works by blocking SIGVTALRM, SIGPROF,
and SIGALRM in critical sections.  It is based on the observation
that most user-space threads packages implement thread preemption
with one of these signals (usually SIGVTALRM).

The dynamic linker has never been reentrant, but it became less
reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c".
Starting with that revision, multiple threads each doing lazy
binding could interfere with each other.  The usual symptom was
that a symbol was falsely reported as undefined at start-up time.
It was rare but not unseen.  This commit fixes it.
1999-12-27 04:44:04 +00:00
Jason Evans
ec9d5fa5f8 Creating weak symbols doesn't work correctly when building an aout libc.
Doing the "right thing" here is difficult, so create two ENTRY points for
each function (for example, __setjmp and setjmp are equivalent).  This
isn't pretty, but it works for both aout and ELF.

libc symbol naming needs an overhaul in order to properly support function
wrapping, specifically in the case of a real libpthread, and these
duplicate entry points should be fixed as part of that overhaul.

Pointed out by:	bde
1999-12-24 00:03:00 +00:00
Bruce Evans
2f64ff4437 Fixed wrong #include in synopsis. 1999-12-23 16:48:57 +00:00
Bruce Evans
7452ae6ecc Fixed missing `const' in synopsis. 1999-12-23 16:46:34 +00:00
Bruce Evans
6785844d79 Fixed missing includes in synopsis. 1999-12-23 16:38:51 +00:00
Bruce Evans
e395da92c4 Fixed missing installation of a link to ctermid_r.3. 1999-12-23 16:36:48 +00:00
Bruce Evans
79ac896751 Fixed wrong prototype and missing include for strsignal(3). strsignal()
takes an int arg and is prototyped in <string.h>.  It has the opposite
interface botches to psignal(3) which takes a bogus unsigned arg but is
prototyped in the right place.

This is not the last of the interface problems for strsignal().  We
obtained it from NetBSD, but NetBSD has moved its prototype to
<unistd.h>.  strsignal() should return const char *, but it returns
char * for historical reasons.  NetBSD declares it as returning
__aconst char, where __aconst is normally empty but can be set to
`const' to give better error checking.  glibc-2.1.1 prototypes
strsignal() in <string.h>.
1999-12-23 16:29:58 +00:00
Bruce Evans
3050159ad5 Fixed missing installation of a link to getlogin_r.3. This is the first
example of section 2 and section 3 interfaces sharing a man page.  It's
probably a bad example.
1999-12-23 16:12:24 +00:00
Bruce Evans
fb59427e5c Fixed missing installation of a link to rand_r.3. 1999-12-23 16:00:50 +00:00
Peter Wemm
473ee77f29 Fix the fixfsfile() so that it works for both block and character devices
as root.  This could fix the "filesystem still dirty after fsck" problem.

Submitted by:   bde
1999-12-23 14:44:36 +00:00
Sheldon Hearn
b3c5295256 Document the current behaviour with respect to the handling of errno.
Approved by:	phk
1999-12-22 17:04:46 +00:00
Jeroen Ruigrok van der Werven
7bf92e055d Fix a typo which I cannot believe I missed after rereading this text
about 6-7 times prior to commit.

Reported by: sheldonh
1999-12-21 11:55:44 +00:00
Jeroen Ruigrok van der Werven
7ec9b49533 Properly manify this manpage.
Fix some spelling mistakes and typo's inspired by Nicholas' initial
PR submission.

PR:		docs/15597
Submitted by:	Nicholas Esborn <nick@flatlan.net>
1999-12-21 11:19:32 +00:00
Ollivier Robert
aa50282cd1 Fix a bug where a pointer would be one character too far after putting
a '\0' at the end of a string.

Submitted by:	Martin Birgmeier <Martin.Birgmeier@aon.at>
1999-12-21 10:17:36 +00:00
Ollivier Robert
27d5775d8c Rewriting of flags_to_string() and string_to_flags() to use an array.
PR:		bin/3648
Submitted by:	Martin Birgmeier <mbirg@austria.ds.philips.com>
1999-12-19 15:31:24 +00:00
David E. O'Brien
9d6eb14221 Initialize a var to quiet -Wall. 1999-12-18 04:47:43 +00:00
Brian Feldman
1a9b5f474e Switch over to the OpenBSD fts.c, fixing lots of things.
Obtained from:	OpenBSD
1999-12-18 04:36:14 +00:00
Alexey Zelkin
94da96bf18 Back up following macros by functions: ishexnumber, isideogram, isnumber,
isphonogram, isrune, isspecial. Fix ordering.

Reviewed by: bde
1999-12-17 15:12:21 +00:00
Jordan K. Hubbard
f8d7aff7a0 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
Yoshinobu Inoue
05a244b407 KAME 4th patch
IPv6 specific library functions addition.
(getnameinfo(), getaddrinfo(), and IPv6 transport support is not yet)

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-16 18:32:01 +00:00
Martin Cracauer
48e364bf96 Document SA_SIGINFO
Reviewed by:	Sheldon Hearn <sheldonh@uunet.co.za>
1999-12-15 16:51:35 +00:00
Jason Evans
ea8271a8bb Make setjmp, longjmp, sigsetjmp, and siglongjmp weak aliases for
__setjmp, __longjmp, __sigsetjmp, and __siglongjmp, respectively.
This supports cancellation in the linuxthreads port.  In the long run,
a much more comprehensive solution will necessitate more dramatic changes
to libc symbol naming, and these aliases will probably need modification
at that time.
1999-12-14 20:17:52 +00:00
Nik Clayton
38c05314b4 Commented out
MAN8+= rstat_svc.8

The file it talks about doesn't exist on FreeBSD, so there's no point in
installing the manual page.  There was already a comment to this effect in
this file, but the entry hadn't been commented out.

rstat.1 and rstat_svc.8 can probably actually be removed.

PR:             docs/13767
Submitted by:   Seth <seth@freebie.dp.ny.frb.org>
1999-12-14 16:56:46 +00:00
Bill Fumerola
b837caf89b Remove x-ref to itself.
Reviewed by:	mpp
1999-12-14 11:34:47 +00:00
Alexey Zelkin
2835cc3b12 Correct "standard compilance" notes
Reminded by: bde
1999-12-14 10:35:09 +00:00
Matthew Dillon
4f79d873c1 Add MAP_NOSYNC feature to mmap(), and MADV_NOSYNC and MADV_AUTOSYNC to
madvise().

    This feature prevents the update daemon from gratuitously flushing
    dirty pages associated with a mapped file-backed region of memory.  The
    system pager will still page the memory as necessary and the VM system
    will still be fully coherent with the filesystem.  Modifications made
    by other means to the same area of memory, for example by write(), are
    unaffected.  The feature works on a page-granularity basis.

    MAP_NOSYNC allows one to use mmap() to share memory between processes
    without incuring any significant filesystem overhead, putting it in
    the same performance category as SysV Shared memory and anonymous memory.

Reviewed by: julian, alc, dg
1999-12-12 03:19:33 +00:00
Peter Wemm
5f02be00bc While comparing this with OpenBSD (ie: trying to figure out what mkstemps()
is good for... :-)), I discovered that part of the change when mkstemps()
was brought in was missed - it was missing the termination case to make
sure it doesn't walk into the suffix.  This isn't the same code OpenBSD
has, I think this is a little better as we terminate the loop in a better
spot.
1999-12-11 14:48:24 +00:00
Sheldon Hearn
ababc297fa Remove discussion of %C in the BUGS section. The limitations on valid
centuries are much more serious than those mentioned and this is not the
place to discuss the limitations of time_t.
1999-12-09 07:58:28 +00:00
Sheldon Hearn
398592ffe1 Prevent digit-gobbling for all but %l and %e, which can't be fixed.
Discuss in the BUGS section of the manpage, problems involved with
the use of %C, %e, %l, %p, %U and %W.

PR:		13901
Reported by:	scott@chronis.pobox.com
1999-12-08 15:49:10 +00:00
Sheldon Hearn
882f32c169 Accept 12 for %l, because it's logical to expect "%l:%M" to work for
"12:00" and because strftime(3) does the same.
1999-12-08 11:11:40 +00:00
Chris Costello
a70b5c6a96 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
Archie Cobbs
93521056fa Add reference to netgraph(4) in the 'see also' section. 1999-12-06 23:35:40 +00:00
Kris Kennaway
83ac6cdcee Fix buffer overflows.
Reviewed by:	imp, audit@freebsd.org
1999-12-05 21:02:41 +00:00
Brian Feldman
1c982a6d2f Add RLIMIT_SBSIZE here, too. 1999-12-03 23:25:14 +00:00
Sheldon Hearn
9a602acc36 Replace the -q option to pwd_mkdb with a test for PW_SCAN_BIG_IDS in
the environment.  This allows big ID warnings to be suppressed for
vipw and chpass as well.

Since the environment variable test is only performed for callers
of pw_scan() that do not set pw_big_ids_warning, the test can still
be overriden.  Currently, chpass and pwd_mkdb are the only users
of pw_scan() and neither of them overrides the environment variable
test.
1999-12-02 16:39:15 +00:00
Brian Feldman
226420a464 Separate some common sysctl code into sysctl_find_oid() and calling
thereof.  Also, make the errno returns  _correct_, and add a new one
which is more appropriate.
1999-12-01 02:25:19 +00:00
Andrey A. Chernov
c63a4303ab %Ex -> %Ef to not conflict with POSIX
Add %EF (long months name / day order)
Check that O and E not intermixed
Add missing POSIX extension to example
1999-11-30 19:24:07 +00:00
Andrey A. Chernov
a36840a71a Document %Ex and %OB 1999-11-30 18:37:36 +00:00
Andrey A. Chernov
7ecd80de13 Stricter checking %A vs %a 1999-11-30 08:11:13 +00:00
Andrey A. Chernov
1d6c99412b Fix %C handling
Use locale for %c
Add %+
Add %Ex and %OB
1999-11-30 08:05:09 +00:00
Andrey A. Chernov
11cd0d3241 Add %Ex extension to determine "%e %b" or "%b %e" order
Separate alternative for O and E cases
1999-11-30 07:33:37 +00:00
Alfred Perlstein
8b6c02f328 style fixes, remove extra braces.
readdir_r is not POSIX according to POSIX_SOURCE, bruce says:
> readdir_r() is in the _POSIX_SOURCE section, but is not a POSIX.1-1990
> function.  It's POSIX.1-1996 so it should be under a different feature
> test which we don't support yet.

make sure errno is saved so that its contents are cleared unless
necessary.

Submitted by: bde
1999-11-29 19:12:50 +00:00
Wes Peters
00ecacd3c4 Provide a man page for Alfreds lovely readdir_r function. Also
fixed a minor indentation nit and added a few {}s to make readdir_r
easier on old eyes.
1999-11-29 06:12:22 +00:00
Wes Peters
be728db489 Provide and document ctermid_r function. 1999-11-28 23:28:49 +00:00