Commit Graph

859 Commits

Author SHA1 Message Date
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Jeroen Ruigrok van der Werven
cc5966e584 Correct incorrect information about the PATH used for exec*() calls.
PR:			21990
Partially submitted by:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
2000-10-30 13:39:23 +00:00
Jeroen Ruigrok van der Werven
5714e85318 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
Mike Pritchard
beb64fb5ac Style & grammar fixes.
PR:		docs/22374, docs/13020
2000-10-28 18:37:37 +00:00
Jacques Vidrine
580ef74769 Explicitly initialize _pw_passwd. 2000-10-27 18:27:07 +00:00
John Polstra
7f244df88e Document RTLD_DEFAULT and the search algorithm used for resolving
undefined symbols.
2000-09-19 04:28:34 +00:00
John Polstra
07f643a52b Make a somewhat unsatisfactory attempt to describe the effects of
the RTLD_GLOBAL and RTLD_LOCAL flags which can be passed to dlopen().
2000-09-19 04:02:05 +00:00
Poul-Henning Kamp
3cea595248 Pickup SPECNAMELEN from <sys/param.h> and use it.
A missing _PATH_DEVDB ("/var/run/dev.db") is not cause for a warning
anymore, the file is effectively optional these days.
2000-09-16 21:58:53 +00:00
Poul-Henning Kamp
8d25eb2c3a Add code to devname(3) so it can find the names of devices which
were not present when dev_mkdb(8) was run.

First the dev_mkdb(8) database is searched, this caters for non-DEVFS
cases where people have renamed a device.

If that fails we ask the kernel using sysctl kern.devname if the device
driver has put a name in the dev_t.  This covers DEVFS cloned devices.

If that also fails we format a string which isn't entirely useless.
2000-09-09 11:39:59 +00:00
Jacques Vidrine
248aee623c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
Peter Wemm
7aa1d9cd4a Remove the SIGSYS handler and wrapper around the __getcwd() syscall.
It was kinda silly since the sigaction() syscall that it used to setup
the handler is more recent than __getcwd(), therefore it was useless
as the wrapper would have died before even getting as far as __getcwd(2).

Reminded by:	bde
2000-09-05 09:35:36 +00:00
Brian Somers
1357c5d3cc setproctitle() requires unistd.h and not libutil.h/-lutil 2000-09-02 02:25:34 +00:00
Brian Somers
9feac5c218 Move setproctitle() from libutil to libc (after a repo-copy)
and bump __FreeBSD_version to 500012 to mark the occasion.

setproctitle() is prototyped in unistd.h as opposed to stdlib.h
where OpenBSD and NetBSD have it.

Reviewed by: peter
2000-09-02 01:51:36 +00:00
Dag-Erling Smørgrav
1250db8139 Import XPG4-compliant basename(3) and dirname(3) from OpenBSD.
The man pages need some adjustments.

PR:		12960, 12962
Submitted by:	James Howard <howardjp@wam.umd.edu>
Obtained from:	OpenBSD
2000-08-31 15:56:15 +00:00
Brian Feldman
8ca723793a Fix style bugs (including ones introduced from OpenBSD). 2000-08-16 23:37:16 +00:00
Kris Kennaway
8f6d480067 sprintf -> snprintf paranoia 2000-08-04 10:23:42 +00:00
Jason Evans
b167c9a5c1 Make sem_post() safe to call from within a signal handler, as required by
POSIX/SUSv2.
2000-08-01 21:19:09 +00:00
Paul Saab
305ad8f908 If the format string passed to setproctitle begins with a '-'
character, skip the program name when setting the process title.
Ansified with extreme prejudice.

Reviewed by:	peter
2000-08-01 06:37:09 +00:00
Peter Wemm
db3c6b6b22 Add a skeleton rfork_thread(3) man page. 2000-07-29 12:12:39 +00:00
Sheldon Hearn
8072ee08a9 Remove the reference to KERN_UPDATEINTERVAL and syncer(4), since
KERN_UPDATEINTERVAL can't be used to control sched_sync().  In
fact, there's no easy way to control the syncer with sysctls.

Reported by:	bde
2000-07-22 15:36:36 +00:00
Sheldon Hearn
a6b651021d Update stale references to update(4) with references to the new
syncer(4) manual page.
2000-07-19 07:39:08 +00:00
Jason Evans
8e234adf86 Change my email address in the copyright notices for the sake of consistency
(jasone@canonware.com --> jasone@freebsd.org).
2000-07-18 01:38:19 +00:00
Jason Evans
82db3da3e1 Reshuffle the SEE ALSO section.
Prompted by:	sheldonh
2000-07-17 22:33:32 +00:00
John Polstra
59a821dae2 Change the dllockinit() interface from "experimental" to
"deprecated" and warn that it will disappear eventually.
2000-07-08 04:17:28 +00:00
Sheldon Hearn
256dba38d1 Remove trailing whitespace only. 2000-07-03 08:31:02 +00:00
Sheldon Hearn
d72b904079 Fix overlong line and trailing whitespace introduced in rev 1.8. 2000-07-03 08:28:30 +00:00
Sheldon Hearn
c50c83c0e1 Add to the SEE ALSO section, a reference to the RFC mentioned in
text introduced in the previous commit.
2000-07-03 08:26:50 +00:00
Brian Feldman
a9e2722c58 Re-pair the MLINKS of unvis.3 with strunvisx.3. This undoubtedly was a
world breakage.
2000-07-03 05:21:43 +00:00
Alexander Langer
0b1c18e4cf Add strunvisx.3 MLINK. 2000-07-02 21:45:16 +00:00
Alexander Langer
d8fa6babb4 Document VIS_HTTPSTYLE:
VIS_HTTPSTYLE is a new encoding style for use in vis(), strvis() and
  strvisx() that escapes characters according to RFC 1808 (URI encoding).

Since decoding of these require different detection of start-points of
  escaped characters, VIS_HTTPSTYLE can be given as flag to unvis().
  unvis() will then properly decode URIs.

A new function appeared, strunvisx(): strunvisx() behaves similar as
  strunvis(), with one exception: It has an additional flag parameter,
  which is passed to unvis() to archive the effect I described above.
2000-07-02 21:31:26 +00:00
Dan Moschuk
d81584ae91 Style fixes. 2000-07-01 17:49:34 +00:00
Dan Moschuk
e63a7af508 Add URI encoding to the vis/unvis routines courtesy of VIS_HTTPSTYLE.
Since alex is a -doc committer, he can update his own manpage. :-)

Also add $FreeBSD$ while I'm here.

Submitted by: alex
2000-07-01 15:55:49 +00:00
Jason Evans
b79702feff Fix typo in SEE ALSO section. 2000-06-28 03:15:21 +00:00
Josef Karthauser
1246bf7279 Remove the setflags/getflags routines. Their functionality has
been replaced with the library calls fflagstostr and strtofflags.
2000-06-18 20:10:41 +00:00
Josef Karthauser
c5bb91d1b2 Add strtofflags and fflagstostr to libc. 2000-06-17 11:55:57 +00:00
Josef Karthauser
8c7bdc130e Modify strtofflags so that it returns a malloced string instead of a
pointer to a static buffer.
2000-06-17 11:09:24 +00:00
Josef Karthauser
d502d9ac46 The "def" arg for fflagstostr is too specialized for ls. The caller
can easily translate from "" to whatever it wants to print if no
flags are set.  (ls prints "-" and mtree prints "none".)

Suggested by:	bde
2000-06-17 01:43:56 +00:00
Josef Karthauser
b81eeaf0a6 Return of the evil file flags! The {s|g}etflags functions were
renamed to {s|g}etflagsbyname, which received objections.   They're
now called strtofflags (string to file flags) and fflagstostr (file
flags to string).

Suggested by:	bde
2000-06-17 01:28:13 +00:00
Kris Kennaway
6641555f44 #include <string.h> for memcpy() prototype
Obtained from:	OpenBSD
2000-06-03 00:27:54 +00:00
Guy Helmer
b4183771fd Describe errx/warnx in comparison to errc/warnc/err/warn.
Use .Fa instead of .Va for function arguments.

Reviewed by:	sheldonh
2000-05-23 19:52:35 +00:00
Tim Vanderhoek
8187dd1c8b Fix a memory leak in getent() that occurred when the requested entry
could not be found.

PR:		bin/17084
2000-05-21 02:55:09 +00:00
Alexey Zelkin
03fc63031e Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:07:59 +00:00
Alexey Zelkin
96e430a43c mdoc related cleanup:
. use construction ".Aq Pa filename" instead of ".Pa <filename>"
. replace Section Heading macro (.Sh) with Subsection (.Ss) macro for
subsections
2000-05-06 12:05:39 +00:00
Alexey Zelkin
95010bdc53 Use suggested by mdoc(7) style section name (ERROR -> ERRORS) 2000-05-06 12:02:18 +00:00
Mike Pritchard
751f44657e Minor mdoc cleanup.
PR:		docs/13218
2000-05-05 02:21:45 +00:00
Jason Evans
51289fd6db Remove cancellation point propagation. 2000-04-26 23:17:17 +00:00
Garrett Wollman
d166947eda Spell MAP_NOSYNC correctly.
Submitted by:	allenc@verinet.com
2000-04-23 15:15:15 +00:00
Garrett Wollman
c1c8bf8375 .Lb-ify 2000-04-23 02:02:33 +00:00
Alexey Zelkin
3dc329d1be Introduce .Lb macro to libutil manpages
Sort .Nm values in some manpages
Remove explicit note about compiling with -lutil, it's implicitly
declared by .Lb macro now.
2000-04-22 16:17:00 +00:00
Alexey Zelkin
d8a7868820 Introduce .Lb macro to libc_r manpages. 2000-04-22 15:50:29 +00:00
Garrett Wollman
5c317306cb Add shm_open(3) and shm_unlink(3). The documentation could use a good
bit of work (and is stylistically probably the worst manual page
I've ever written).
2000-04-22 15:24:29 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Jason Evans
b479399f73 Take care to avoid having "strong" and "weak" symbols of the same name in
libc_r.
2000-03-16 02:14:41 +00:00
Paul Richards
cd7b8d78c7 Fix various unsigned vs signed errors that caused problems with uids
and gids bigger than 16 bits. Added checks for uids and gids that are
bigger than 32 bits.

Approved by:	jkh (partly, this fix is bigger than I first intended)
2000-03-09 18:11:16 +00:00
Sheldon Hearn
4e86fcacf6 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
Sheldon Hearn
c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Nik Clayton
3615c24e18 Fix errors in .Xr usage.
PR:             docs/17057
Submitted by:   Submitted by:   Udo Erdelhoff <ue@nathan.ruhr.de>
2000-03-01 10:48:35 +00:00
Ruslan Ermilov
53c698dc2f Restore [no]{s|u}unlnk' and [no]opaque' support.
Broken in src/bin/ls/stat_flags.c,v 1.12.

PR:		16885
Approved by:	jkh
2000-02-22 08:13:07 +00:00
Jason Evans
b0a1b4f809 Add man pages for the sem_*() functions.
Approved by:	jkh
2000-02-16 19:31:53 +00:00
Chris Costello
11400c9ac3 Replace the existing documentation for ``KERN_QUANTUM'' with a more
descriptive (and generally more useful) explanation.
2000-02-10 01:05:21 +00:00
Josef Karthauser
418d67b0d9 Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process.  It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved:	jkh
2000-02-05 18:42:36 +00:00
John Polstra
4e1635fee5 Revive the warning that dllockinit() is experimental and subject to
change.
2000-01-29 01:33:21 +00:00
Bruce Evans
ff246fc369 Install setflags.3 and its link to getflags.3. 2000-01-28 07:14:52 +00:00
Jason Evans
9233c4d942 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
Josef Karthauser
18c0eeddf7 Historically file flags (schg, uschg, etc) have been converted from
string to u_long and back using two functions, flags_to_string and
string_to_flags, which co-existed with 'ls'.  As time has progressed
more and more other tools have used these private functions to
manipulate the file flags.

Recently I moved these functions from /usr/src/bin/ls to libutil,
but after some discussion with bde it's been decided that they
really ought to go in libc.

There are two already existing libc functions for manipulating file
modes:  setmode and getmode.  In keeping with these flags_to_string
has been renamed getflags and string_to_flags to setflags.

The manual page could probably be improved upon ;)
2000-01-27 21:17:01 +00:00
Chris Costello
443cb51ff0 Document KERN_QUANTUM under CTL_KERN
PR:		15637
Submitted by:	jhs
2000-01-19 05:32:27 +00:00
Chris Costello
665a0de1a9 Document isnanf() for checking if a float is NaN (``Not-a-Number'') and
create a link from isnanf.3 to isinf.3.

PR:		13878
2000-01-19 04:58:39 +00:00
Mark Murray
c66f4b97e9 This man page is not needed; it just gets jumped on later when libcrypt
is installed.
Submitted by:	bde
2000-01-18 18:25:45 +00:00
Jeroen Ruigrok van der Werven
f014ebf537 Correct placement of $FreeBSD$ CVS identifier. 2000-01-13 14:27:44 +00:00
Jeroen Ruigrok van der Werven
d280290002 Change `from'' to `to''.
PR:		15729
Submitted by:	Kim Toms
2000-01-13 14:26:23 +00:00
Jason Evans
929273386f 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
John Polstra
7f20578830 Remove the warning that this interface shouldn't be used yet. Fix
a typo.  Clarify a sentence.
2000-01-09 21:01:39 +00:00
Jun-ichiro itojun Hagino
8a3c127000 remove most of PF_INET6 description. add references only.
Suggested by:	Ruslan Ermilov <ru@FreeBSD.org>
2000-01-06 08:58:33 +00:00
Jun-ichiro itojun Hagino
1522ff5b28 bring in description for KAME IPv6 changes.
XXX it looks that sysctl.3 lacks most of PF_INET items.
Reviewed by:	shin
Obtained from:	KAME (netbsd-current)
2000-01-06 03:47:57 +00:00
Bruce Evans
a37e09e423 Fixed the type of dllockinit() (const unpoisoning).
Use long lines instead of lines split with backslash-newline in synopsis.
My synopsis checker doesn't understand backslash-newline.
2000-01-05 19:04:55 +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
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
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
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
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
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
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
Wes Peters
8166f7fd4b Provide the getlogin_r function. 1999-11-28 22:41:38 +00:00
Alfred Perlstein
7285bccf1a add pthread_cancel, obtained from OpenBSD.
eischen (Daniel Eischen) added wrappers to protect against cancled
threads orphaning internal resources.

the cancelability code is still a bit fuzzy but works for test
programs of my own, OpenBSD's and some examples from ORA's books.

add readdir_r to both libc and libc_r

add some 'const' attributes to function parameters

Reviewed by: eischen, jasone
1999-11-28 05:38:13 +00:00
Eivind Eklund
637bc59616 Allow empty UIDs if we are processing NIS records. I am not entirely
happy with how this end up and will re-visit the entire empty field
problem, but this patch solves the NIS problem for now.

Submitted by:	Dan Nelson <dan@emsphone.com>
PR:	14865,14984
1999-11-22 12:42:38 +00:00
Brian Somers
0675e24de0 Make setproctitle(NULL) restore all of the original arguments
(if it's able).
1999-11-17 21:12:17 +00:00
Poul-Henning Kamp
b9df5231ca Introduce commandline caching in the kernel.
This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.

To disable this facility and revert to previous behaviour:
        sysctl -w kern.ps_arg_cache_limit=0

For full details see the current@FreeBSD.org mail-archives.
1999-11-16 20:31:58 +00:00
Sheldon Hearn
18138b08d8 Add to pwd_mkdb a -q option to silence warnings about large IDs. Add a
suitably ominous warning in the manual page.

The diff applied is not the one provided in the attributed PR.

PR:		13344
Reviewed by:	bde
1999-11-15 16:45:37 +00:00
Kris Kennaway
6b65064ba7 fts_pathlen and fts_namelen are u_short, not short
Obtained from:	OpenBSD
1999-11-15 03:29:19 +00:00
Alexey Zelkin
880dead128 Remove useless section.
PR:		docs/14764
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
1999-11-09 00:28:34 +00:00
Eivind Eklund
aa510d6741 Flag empty UID entries as errors (to stop typos from turning into
alternate root accounts).
1999-11-06 20:21:04 +00:00
Andrey A. Chernov
d67f4d918d Add unsigned char cast to isdigit 1999-11-04 04:46:18 +00:00
Andrey A. Chernov
49435560cc Add unsigned char cast to isspace arg 1999-11-04 04:16:28 +00:00
Joerg Wunsch
c786c636ba It is no longer necessary to prepend underscores to external symbols under
ELF.

Submitted by:	A.Leidinger@WJPServer.CS.Uni-SB.de (Alexander Leidinger)
1999-11-02 18:18:26 +00:00
Alexey Zelkin
e1e5fdf6d4 mdoc(7)'fy 1999-10-30 15:12:25 +00:00
David E. O'Brien
dd30998fb1 "S" comes before "U"...
Alphabet taught to Green by:	obrien
1999-10-25 03:51:01 +00:00
Andrey A. Chernov
0200080b60 YP/NIS code: remove unnecessary endgrent() calls which can cause fail on
next try over chroot (descriptor closed). getgrnam() used already handles
endgrent() properly and honors _gr_stayopen. Automatically call
setgroupent(1) when _pw_stayopen is set (for YP/NIS code).
1999-10-16 12:31:49 +00:00
Andrey A. Chernov
8b7690ea77 Fix longstanding bug "unused stayopen" introduced in rev1.11
PR:		14201
1999-10-16 11:50:37 +00:00
Marcel Moolenaar
075ff1d959 o Add $FreeBSD$ as a rcsid instead of in a comment
o  Remove bitrotted #undef directives
o  Actually set errno now and order the functions

Submitted by: bde
1999-10-02 19:37:14 +00:00
Marcel Moolenaar
3cf3c5d9dd sigset_t change (part 5 of 5)
-----------------------------

Most of the userland changes are in libc. For both the alpha
and the i386 setjmp has been changed to accomodate for the
new sigset_t. Internally, libc is mostly rewritten to use the
new syscalls. The exception is in compat-43/sigcompat.c

The POSIX thread library has also been rewritten to use the
new sigset_t. Except, that it currently only handles NSIG
signals instead of the maximum _SIG_MAXSIG. This should not
be a problem because current applications don't use any
signals higher than NSIG.

There are version bumps for the following libraries:
  libdialog
  libreadline
  libc
  libc_r
  libedit
  libftpio
  libss

These libraries either a) have one of the modified structures
visible in the interface, or b) use sigset_t internally and
may cause breakage if new binaries are used against libraries
that don't have the sigset_t change. This not an immediate
issue, but will be as soon as applications start using the
new range to its fullest.

NOTE: libncurses already had an version bump and has not been
      given one now.

NOTE: doscmd is a real casualty and has been disconnected for
      the moment. Reconnection will eventually happen after
      doscmd has been fixed. I'm aware that being the last one
      to touch it, I'm automaticly promoted to being maintainer.
      According to good taste this means that I will receive a
      badge which either will be glued or mechanically stapled,
      drilled or otherwise violently forced onto me :-)

NOTE: pcvt/vttest cannot be compiled with -traditional. The
      change cause sys/types to be included along the way which
      contains the const and volatile modifiers. I don't consider
      this a solution, but more a workaround.
1999-09-29 15:18:46 +00:00
Marcel Moolenaar
4c9d9fc620 Explicitly use sigemptyset to clear a sigset_t. Explicit
initialization of sa_flags allows us to lose the bzero.

$FreeBSD$ tag added.
1999-09-28 13:24:13 +00:00
Alexey Zelkin
73bc9316d7 Nuke dlopen.3 -> dlversion.3 link.
This function was removed by jdp in rev.1.5 of dlopen.3

Forgoten by: jdp
1999-09-23 13:26:41 +00:00
Alexey Zelkin
11d8c7ad68 Add links for errc.3, verrc.3, warnc.3, vwarnc.3.
PR:		docs/13222
Submitted by:	Ben Smithurst <ben@scientia.demos.co.uk>
1999-09-22 22:12:23 +00:00
Ruslan Ermilov
bd8beb9b80 If `who' was not specified, set the appropriate bits as the chmod(1)
manual page states.  `chmod +s foo' and `chmod +t foodir' now work.

PR:		13889
1999-09-22 13:02:50 +00:00
Alexey Zelkin
3a049969b5 mdoc(7)'fy
Reviewed by:	mpp
1999-09-21 19:39:27 +00:00
Alexey Zelkin
c6d6e7726f Correct spelling : ascii -> ASCII
PR:		docs/13702
Submitted by:	Stephen J. Roznowski <sjr@home.com>
Reviewed by:	mpp
1999-09-20 09:15:23 +00:00
Ruslan Ermilov
406bc24462 - add reference to siginterrupt(3)
- mdoc(7) fixes
1999-09-06 15:15:51 +00:00
Dag-Erling Smørgrav
ecab1f6824 Don't forget to reset _pw_stepping_yp to 0 before returning. Fixes a bug
where getpwent() would ignore wildcard entries that followed a netgroup
entry.

PR:		misc/12999
Submitted by:	David Hedley <david@inty.net>
1999-09-06 08:04:43 +00:00
Warner Losh
f183d53e63 Fix the root cause of the fts buffer overflow. This is a temporary
patch to stop the core dumps while others come up with a better
reviewed patch which may also fix other problems.  We do illegal
pointer arithmetic, but it should be OK since FreeBSD only supports
machines with flat address spaces.

Submitted by: bde
1999-09-02 07:45:07 +00:00
Sheldon Hearn
33d37c13fc Back out previous commit. I mistook passing commentary from bde for
review.

Requested by:	bde
1999-08-31 13:11:39 +00:00
Sheldon Hearn
8559ed58e8 Only issue a warning for the first occurrence of a UID > USHRT_MAX and
the first occurrence of a GID > USHRT_MAX.

PR:	13344
Reviewed by:	bde
1999-08-30 09:55:42 +00:00
Peter Wemm
a1a4f1a0d8 $Header$ -> $FreeBSD$ 1999-08-28 05:11:36 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Brian Feldman
fa62586ae7 This is the addition of a syslog(3) security.* top-level category. This
should be used from now on for anything security but not auth-related.
Included are updates for all relevant manpages and also to /etc files,
creating a new /var/log/security. Nothing in the system logs to
/var/log/security yet as of the time of this commit.

Reviewed by:	rgrimes, imp, chris
1999-08-21 18:24:29 +00:00
Peter Holm
91289ebc39 Reverted to revision 1.8 as previous fix causes fts_open with with a
path name argument with a trailing '/' to fail.

Reviewed by:	phk
1999-08-15 19:21:29 +00:00
Mike Pritchard
74804d58a0 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
Peter Holm
82f712dfaf Reviewed by: phk
When fts_open is used with option FTS_NOCHDIR the full
path entry of type FTS_DP is returned with a trailing
'/' if the final directory is empty.
This fix coresponds to netbsd's __fts13.c v. 1.16
1999-08-14 12:19:40 +00:00
Chris Costello
b21e4aed42 Bad reference of sysctl(1) changed to sysctl(8) 1999-08-14 07:46:50 +00:00
Chris Costello
b07158f71c Fix some bad references:
fopen(2) -> fopen(3)
  fclose(2) -> fclose(3)
1999-08-14 07:07:46 +00:00
Mike Pritchard
6a8edfca23 Use the .At macro when referencing versions of AT&T UNIX.
Note: you need to install the current groff tmac macros for these
man pages to format correctly.  Specifically, rev 1.21 of
contrib_groff/tmac/doc-syms in -current, or rev 1.17.24 for 3.2-stable
1999-07-30 12:45:20 +00:00
Sheldon Hearn
c4cebec42e Add missing cause for an EINVAL return (msgtype < 1).
PR:	12783
Submitted by:	Kevin Day <toasty@dragondata.com>
1999-07-26 11:39:02 +00:00
Bruce Evans
6b288cfa64 Backed out previous commit. devname.3 and devname.c were broken in Lite1
(devname() returned "??" when the lookup failed, but callers expected it
to return NULL).  This was fixed in Lite2, but until recently the changes
were only merged into devname.3.  A day or two after devname.c was fixed,
devname.3 was made inconsistent again by backing out most of the Lite2
changes.
1999-07-24 00:33:27 +00:00
Nik Clayton
d4cd00eae1 Correct the information about the return value when no device matches
(or no information is available).

PR:             docs/12707
Submitted by:   Chris Costello <chris@calldei.com>
1999-07-20 20:48:40 +00:00
Poul-Henning Kamp
9d4ee2f2ef Make devname(3) return something more intelligent than NULL if it doesn't
find anything in the database.
1999-07-18 10:19:48 +00:00
Nik Clayton
fbc400a67a 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
Steve Price
e71d2b8ee3 Spell isinf(3) correctly.
PR:		11974
1999-06-07 02:42:31 +00:00
Bill Paul
a180d48db0 Apply patch for PR #12008: remember to reset _yp_enabled flag in
endpwent() so we don't trip over a NULL db pointer later.

PR: 12008
Submitted by: Valentin Netchayev <netch@lucky.net>
1999-06-04 02:27:35 +00:00
Jean-Marc Zucconi
e1e705c5b5 Chflags was clearing all flags supplied on the command line after a
clearing flag like dump or noschg, etc.

PR:		bin/10071
Submitted by:	Andreas Klussmann <andreas@infosys.heitec.net>
1999-05-21 17:04:13 +00:00
Bruce Evans
a425c38dfd Fixed disordering and duplication of MLINKS in previous commit to
libc/string/Makefile.inc.  psignal.3 doesn't live in libc/string.
1999-05-19 06:32:00 +00:00
Peter Wemm
78121e79aa Add a strsignal(3) (like strerror(3)) for libc compatability with other
systems. NetBSD, Linux, SVR4 etc all have it.
1999-05-18 04:48:58 +00:00
Kris Kennaway
ee3afcaf3b More typos. 1999-05-09 13:46:31 +00:00
Kris Kennaway
80bdfd1362 Typo.
Obtained from:	OpenBSD
1999-05-09 13:41:19 +00:00
Poul-Henning Kamp
00c7dcf63e Add missing strings.
PR:		11285
Submitted by:	Chris Costello <chris@calldei.com>
Reviewed by:	phk
1999-04-24 18:28:24 +00:00
John Polstra
6d30b16752 Back out my change from 6 April PDT that added a new dlversion()
function.  It was an ill-considered feature.  It didn't solve the
problem I wanted it to solve.   And it added Yet Another Version
Number that would have to be maintained at every release point.
I'm nuking it now before anybody grows too fond of it.
1999-04-22 01:54:38 +00:00
Guy Helmer
ec407dbb0d Revise for KLD's.
Prompted-By:	Nathan Ahlstrom <nrahlstr@winternet.com>
1999-04-20 20:36:36 +00:00
Peter Wemm
f4e6d58dca vfsload maps into kldload only now, no more fork/exec of modload(8). 1999-04-19 14:28:45 +00:00
John Polstra
a35ed6d00d Add manpage link for dlversion(3). 1999-04-07 02:59:47 +00:00
John Polstra
14f5fa0596 Add a new function dlversion() which returns the version number of
the dynamic linker in the same form as __FreeBSD_version.  This is
mainly intended for checking the dynamic linker version during a make
world.
1999-04-07 02:43:11 +00:00
Dag-Erling Smørgrav
9b030d1073 Partial fix for the forking problem: if we can't access the master maps,
try again with the unrestricted map.

PR:		bin/10821
1999-03-27 21:51:33 +00:00
Peter Wemm
5fe5a4dd73 Fix a (relatively harmless) braino. I confused myself over the for() loop
that counted the number of elements in argv.  The counter is incremented
in the next-iteration section of the loop, not the body, so at termination
it's already "counted" the element that failed the continuation test - in
this case the NULL argv terminator.

Noted by:  bde
1999-03-24 02:43:05 +00:00
Peter Wemm
ce04fea445 Remove last remaining references to malloc/realloc and functions that
call them.  All the execX() libc functions should be vfork() safe now.
Specifically:
- execlp() does the argument count-and-build into a vector from alloca
    (like the others) - buildargv() is no longer used (and gone).
- execvp() uses alloca/strcpy rather than strdup().
- the ENOEXEC handler uses alloca rather than malloc.
- a couple of free() calls removed - alloca works on the local stack and
    the allocations are freed on function exit (which is why buildargv
    wasn't useful - it's alloca() context would disappear on return).
Along the way:
- If alloca() fails (can it?), set errno = ENOMEM explicitly.
- The ENOEXEC recovery routine that trys again with /bin/sh appeared to
    not be terminating the new argv[] array for /bin/sh, allowing it to
    walk off the end of the list.

I dithered a bit about using alloca() even more as it's most commonly
associated with gcc.  However, standalone portable (using malloc) and
machine-specific assembler alloca implementations appear to be available
on just about all the architectures we're likely to want to port to.
alloca will be the least of our problems if ever going to another compiler.
1999-03-23 16:40:34 +00:00
Joseph Koshy
f5a7833449 Typo fix.
PR:		docs/10733
Submitted by:	Steve Coltrin <spcoltri@io.com>
1999-03-23 05:01:11 +00:00
Warner Losh
43b4fd733d Don't be so selective about which errors cause us to continue and
which ones cause us to fail.  Now all open errors on the databse file
will cause the next file in the list to be tried.

Submitted by: Arne Henrik Juul <arnej@math.ntnu.no>
PR: 4585
1999-03-21 03:45:58 +00:00
Alexander Langer
ee28fadec0 EACESS -> EACCES 1999-03-15 00:14:57 +00:00
Bruce Evans
6da7e7c6fb Don't bogotify the synopsis by attempting to describe err_set_file() there.
Fixed some disorder.
1999-03-05 15:36:23 +00:00
Poul-Henning Kamp
c40956e25d Use sysctlbyname() instead of sysctl(). 1999-03-05 10:01:24 +00:00
Joseph Koshy
f28529d798 Add a note about ELF executables requiring to be linked with -export-dynamic
for dlsym() searches inside the executable to work.
1999-02-17 02:41:04 +00:00
Dag-Erling Smørgrav
a135bdb9a0 Use the correct type for uid and gid in struct passwd. Document it. 1999-01-18 02:14:20 +00:00
Dag-Erling Smørgrav
eec1dbe6ce Make the implementation and documentation agree. Specifically:
- document that sysctl() and sysctlbyname() return 0 on success

 - if the provided buffer is too small, set errno to ENOMEM and return -1
   instead of returning ENOMEM.
1999-01-06 18:11:53 +00:00
Bruce Evans
2e4513990b Ignore the fs_spec entry for "/" in /etc/fstab if the device which
is actually mounted on "/" can be determined using statfs() and is
in /dev.  This fixes fsck operating on the wrong device when the
fs_spec entry is only an alias.  The aliased case became more
dangerous when the ROOTSLICE_HUNT hack was committed in mount(8).
ROOTSLICE_HUNT may be unnecessary now.
1999-01-01 14:14:44 +00:00
Eivind Eklund
630dc76f4e Restore old semantics (broken in rev 1.47's buffer overflow fix). 1998-12-17 16:31:02 +00:00
Bruce Evans
d529713846 Adjust for kern.ps_strings and PS_STRINGS not being a pointer. This is
an unimprovement here.  I thought it would be an improvement, as in libkvm,
but here we can access the strings directly.

Use sysctlbyname() instead of sysctl() and trust it to give a nonzero
address if it succeeds.
1998-12-16 17:34:05 +00:00
Warner Losh
81e4e6a2d6 Add reminder to return memory allocated by this call.
Obtained from: OpenBSD
1998-12-16 04:39:23 +00:00
Matthew Dillon
9a0d08d599 PR: docs/9050
Add reference to required include file #include <stdlib.h> for
    getloadavg(3) function call.
1998-12-13 02:34:56 +00:00
Bruce Evans
0fe8d9f3dd Removed unused include of <kvm.h>. It was alarming for libc to apparently
depend on libkvm.

Removed obsolete `#define _NEW_VFSCONF'.
1998-12-07 11:26:28 +00:00
Joseph Koshy
bee0365a4a Fix a .Nm -> .Fn fix that was missed in the previous commit.
Pointed-out-by:	Bruce Evans
1998-11-09 06:52:46 +00:00
Joseph Koshy
41a3e3b022 Update manual page to reflect changes in rev 1.12 of
"src/lib/libc/gen/popen.c" --- popen() in the child
now closes any copies of popen()'ed descriptors in the parent.
1998-11-06 07:09:22 +00:00
Peter Wemm
86854f0360 A feeble attempt at kld compatability. The mount_* programs assume that
they cannot mount a filesystem that they cannot see in getvfsbyname().
Part 1 of this is a hack, make vfsisloadable() always return true - the
ultimate decider of whether it's loadable or not is kldload() or mount().
Part 2 of this is to have vfsload() call kldload(2) and return success if
it works.  This means that we will use a viable kld module in preference
to an LKM!
Ultimately, the thing to do is remove the hacks to do a vfsload in all the
mount_* commands and let the kernel do it by itself in mount(2).
1998-11-03 15:02:29 +00:00
Mike Smith
ebed2088fe Prevent buffer overflow in getpwnam()
PR:		bin/8176
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-10-29 23:16:24 +00:00
Robert Nordier
30af884929 Clarify processing of the string argument by psignal(). 1998-10-29 22:17:46 +00:00
Robert Nordier
d223b5868e The man page implies that the string argument to psignal() may be
NULL, in line with perror(3).  However, the code presently checks only
for a zero-length string.  Check for both.
1998-10-29 11:39:39 +00:00
John Polstra
76a2643efb Handle ELF symbols better. This fixes "vmstat -i" for the case
where "/var/db/kvm_kernel.db" doesn't exist.
1998-10-28 06:37:49 +00:00
Bill Fenner
551677729e ('): and ('); -> (:') and (;') 1998-10-26 19:36:38 +00:00
David E. O'Brien
2100aed918 Slight style police.
Add some content from objformat(1).
1998-10-25 13:29:57 +00:00
Dag-Erling Smørgrav
af806462dc Fix style issues in execl(), and make execle() vfork()-safe.
Reviewed by:	bde
Approved by:	jkh
1998-10-15 17:14:15 +00:00
Mike Smith
26c51fb453 Conform to POSIX and close any copies of popen() descriptors inherited by a
popen()ed child.

PR:		misc/7810
Submitted by:	Wayne Scott <wscott@ichips.intel.com>
1998-10-15 01:47:40 +00:00
Dag-Erling Smørgrav
7ea577e550 Correct braino in previous commit. I get the pointy hat again. 1998-10-14 20:23:40 +00:00
Dag-Erling Smørgrav
dea625c872 Make execl() vfork()-safe. This should fix potential bugs in rcp,
telnet and tip, and probably a few other apps.

Reviewed by:	bde
Approved by:	jkh
1998-10-14 18:53:36 +00:00
Peter Wemm
0c372549f6 Avoid the need for calling functions that malloc after a vfork(). 1998-10-11 14:11:51 +00:00
Bruce Evans
0890dc6f44 vfork -> fork. The child calls execl() which calls malloc(), so
vfork() can't be used.  We could use alloca() in execl() so that
it can be called between vfork() and execve(), but a "portable"
popen() shouldn't depend on this.  Calling execle() instead of
execl() should be fairly safe, since execle() is supposed to be
callable from signal handlers and signal handlers can't call
malloc().  However, execle() is broken.
1998-10-10 19:30:45 +00:00
Julian Elischer
29595ffd90 Fix a memory leak
PR: 7923
Submitted by: Archie Cobbs <archie@whistle.com>

        The scandir() function returns -1 if it fails.
	In many cases when this happens, it does not free
	the memory that it allocated, resulting in a memory
	leak, or close the directory opened with opendir().
	BAD DOG, BAD!
1998-10-07 01:30:02 +00:00
Joseph Koshy
7669e9013b `kern.maxproc' is not changeable from sysctl(8).
Reminded by:	Bruce Evans <bde@zeta.org.au>
1998-09-29 05:16:45 +00:00
Doug Rabson
f0a3692000 Don't cast int pointers to long pointers when reading labels from
/etc/disktab.
1998-09-26 14:44:06 +00:00
Joseph Koshy
0a843f2afb Sort table and descriptions.
Pointed out by: bde
1998-09-16 07:25:34 +00:00
Warner Losh
e8420087b0 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
Dmitrij Tejblum
b5acd0014e Don't initialize NIS until it is really necessary. Now, in case of network
or NIS server problems, local user can login without a pause.

Also, -Wsomething cleanup.
1998-09-15 16:22:30 +00:00
Joseph Koshy
61a4defd54 Turn off replies to ICMP echo requests for broadcast and multicast
addresses by default.

Add a knob "icmp_bmcastecho" to "rc.network" to allow this
behaviour to be controlled from "rc.conf".

Document the controlling sysctl variable "net.inet.icmp.bmcastecho"
in sysctl(3).

Reviewed by: dg, jkh
Reminded on -hackers by: Steinar Haug <sthaug@nethelp.no>
1998-09-15 10:49:03 +00:00
Garrett Wollman
75a21a3859 Replace accidentally-deleted `x' which caused warnx() to misbehave. 1998-09-15 01:49:32 +00:00
Joseph Koshy
6e2affc98f Correct a typo that I noticed. 1998-09-15 00:24:19 +00:00
Garrett Wollman
b4b4fb871e A small last-minute iitem for 3.0:
- Fix some style errors I made back in 1995.

- Add a new flavor of the err(3) family, which takes an explicit
  errno argument rather than implicitly examining errno.  This
  will make it easier to use these functions in conjunction with
  modern library interfaces that return an errno value explicitly.
1998-09-12 21:02:22 +00:00
Guy Helmer
b697833cb3 Document a number of VM sysctl variables with help from old emails
written by John Dyson.
1998-09-09 18:36:14 +00:00
John Polstra
cfa4d73988 Add a new library function getobjformat(). It checks all the
standard places ("/etc/objformat", ${OBJFORMAT}, argv) for an
indication of the user's preferred object file format.  This
consolidates some code that was starting to be duplicated in more
and more places.

Use the new function in ldconfig.

Note: I don't think that gcc should use getobjformat(), even though
it could.  The compiler should limit itself to functions that are
widespread, to ease porting and cross-compilation.
1998-09-09 01:21:25 +00:00
Andrey A. Chernov
7f41a65ede restore rev 1.23 to give clear SIGALRM handling example, 68 years
are too long to affect real code
1998-09-08 09:44:46 +00:00
Matthew Dillon
49d6409ac7 Reviewed by: Andrey A. Chernov <ache@nagual.pp.ru>, Doug Rabson <dfr@nlsystems.com>
Rewrote sleep() to remove int/long typing assumptions between the argument
    to the function and the timespec structure.
1998-09-06 09:11:06 +00:00
John Birrell
ae59c2591e Use INT_MAX instead of LONG_MAX since the variable being compared
is an int, not a long.
1998-09-05 08:01:26 +00:00
Wolfram Schneider
acd8019083 Sort cross references. 1998-08-31 16:41:09 +00:00
Doug Rabson
744857bc1c Update to use the new elf headers. 1998-08-17 08:47:19 +00:00
Bruce Evans
8023e3dd93 isnetworktty -> isnettty. ttyent.h has already gone through 3
revisions to match the confusing spelling in getttyent.c (1 to
break it to match the man page and 1 in each of 2 branches to fix
it).  This function seems to be orphaned and unused.
1998-08-03 15:35:41 +00:00
Bruce Evans
92f896a9cc Fixed printf format errors. 1998-08-02 14:41:34 +00:00
Dmitrij Tejblum
9b003a4c74 Add lockf(). 1998-07-08 15:42:57 +00:00
Dmitrij Tejblum
abe2fe8a8b Make this look more FreeBSDish. 1998-07-08 15:38:06 +00:00
Dmitrij Tejblum
f1f57565d4 This commit was generated by cvs2svn to compensate for changes in r37510,
which included commits to RCS files with non-trunk default branches.
1998-07-08 15:28:56 +00:00
Dmitrij Tejblum
6975deff55 An implementation of lockf() function call.
Obtained from:	NetBSD (author: Klaus Klein)
1998-07-08 15:28:56 +00:00
Poul-Henning Kamp
8a507b98ab fts_close calls free(sp), the ISSET(FTS_NOCHDIR) which is a macro that
references sp. The free needs to follow ISSET

PR:		7148
Reviewed by:	phk
Submitted by:	Ken Mayer <kmayer@freegate.com>
1998-07-03 08:21:05 +00:00
Eivind Eklund
38cf631922 Cross-reference to sysconf(3). 1998-06-30 22:56:39 +00:00
Bruce Evans
a7f8e53079 Fixed printf format errors. 1998-06-30 17:30:22 +00:00
Peter Wemm
f3f4b57ac9 Make nlist() understand elf unconditionally 1998-06-12 15:02:03 +00:00
John Polstra
63b7c21cc3 Move ftok() from libcompat to libc, so that it can be closer to its
friend shmget().

PR:		closes misc/6763
1998-06-10 16:20:21 +00:00
John Polstra
363e8996d7 This is a null commit to log the fact that I have done a repository
copy to bring these files into libc from libcompat.  I will enable
them and kill off the libcompat versions on the main branch soon.

PR:		step one toward closing misc/6763
1998-06-10 04:24:21 +00:00
John Birrell
86af3ff9b0 Implement compile time debug mode for thread locks. 1998-06-09 08:32:23 +00:00
Steve Price
e110cb41dd Fix this so that it compiles in the !__STDC__ case.
Also be consistent about usage of #if ...

Pointed out by:	bde
1998-06-06 18:52:43 +00:00
Joseph Koshy
5239c0a5dd Mention that tftpd(8) also uses syslog(3). 1998-06-05 09:20:19 +00:00
Joseph Koshy
70e8940332 Correct wrong claim about `telldir()' cookie lifetimes.
PR: 4043
Submitted by: Joe Orthoefer <j_orthoefer@tia.net>
1998-06-03 06:54:24 +00:00
Mike Smith
d4a7e4ca5d Add a trivial mechanism for returning a useful default value if one is
available and the kernel MIB setting is zero.

Return the result from getpagesize() if the p1003_1b.pagesize MIB
value is zero.

Suggested by:		Joerg Schilling <schilling@fokus.gmd.de>
1998-06-01 20:58:03 +00:00
Steve Price
3f58cad638 Several sources including Unix98 say that semctl's fourth
parameter is optional except where:
	cmd == {IPC_SET || IPC_STAT || GETALL || SETVAL || SETALL}

PR:		2448
Reviewed by:	bde
Submitted by:	Tim Singletary <tsingle@sunland.gsfc.nasa.gov>
Minor tweaks by: steve
1998-05-31 04:09:09 +00:00
Steve Price
5b32180784 Remove references to getvfsbytype. Also remove getvfsbyname
as it has its own manpage.

Discussed with:	bde
1998-05-30 18:20:37 +00:00
Steve Price
14d8151513 Remove a couple style bugs from the code snippet that
slipped in on the previous commit.

Submitted by:	bde
1998-05-26 02:53:06 +00:00
Steve Price
de285a13cc Update code example to reflect current practice. 1998-05-25 21:42:51 +00:00
John Birrell
efda37108b NetBSD doesn't have a __getcwd syscall, so set have__getcwd to `no'
when building libc with NetBSD syscalls.
1998-05-15 11:59:00 +00:00
John Birrell
e659da100d Remove extern int errno and #include <errno.h> to get the proper definition. 1998-05-05 22:04:13 +00:00
Brian Somers
8d41a9efa3 Go back to version 1.16 - it was correct the way it was.
Pointed out by:	bde
1998-05-01 19:41:12 +00:00
Brian Somers
e79dc52bbf connect() returns -1 on error - not 0. 1998-05-01 01:16:39 +00:00
John Birrell
f0f62729ee Stubs are required in libc so that it can be used with libpthread
(and kernel threads), but weak symbols and non-weak symbols of the
same name built into libc_r result in unpredictable linking.
1998-04-29 09:02:16 +00:00
David Greenman
ec3a3b4594 Oops, revert part of a diff that wasn't supposed to have been committed. 1998-04-28 07:02:33 +00:00
David Greenman
214bed53a2 Cache the results of the ps_strings sysctl so that it doesn't have to be
redone for every call of setproctitle().
1998-04-28 06:59:14 +00:00
Robert Nordier
ac51e2822d Improve description.
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
1998-04-22 19:59:55 +00:00
Brian Somers
5c570787fc Typo police 1998-04-17 00:59:15 +00:00
John Birrell
5a2f1fed77 Change in name of the static initializer define. 1998-04-04 11:03:07 +00:00
Peter Dufault
8a6472b723 Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work.  Changes:

Change all "posix4" to "p1003_1b".  Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.
1998-03-28 11:51:01 +00:00
Bruce Evans
73de262e04 Fixed bitrot in synopsis. Didn't fix bitrot elsewhere. 1998-03-23 13:02:37 +00:00
Philippe Charnier
a5941fc2aa .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
John Birrell
196c0ee373 Change MACHINE to MACHINE_ARCH.
Add _spinlock.c (stubs) to sources.

Nuke tahoe and vax.
1998-03-09 06:48:25 +00:00
John Birrell
1b5fef40c7 Stub functions for thread locking with weak symbols so that they are
only linked when not linking an application against libc_r or libpthread.
1998-03-09 06:46:21 +00:00
John Birrell
e91bce7ac7 NetBSD implements semctl using a __semctl syscall instead of the
semsys syscall that FreeBSD kernels use. Grumble. So make the call
dependent on if __NETBSD_SYSCALLS is defined.
1998-03-09 04:39:13 +00:00
John Birrell
ee51c92b78 getvfsbyname() doesn't existing NetBSD, so return ENOSYS if compiled
into a library with __NETBSD_SYSCALLS defined.
1998-03-09 04:36:07 +00:00
John Birrell
59fe2e5fd0 Change a variable to type size_t to suit the sysctl prototype.
Add #include <string.h> to get prototypes.
1998-03-09 04:34:16 +00:00
John Birrell
84d6500535 Cast pointer to a long instead of an int to keep a 64-bit compiler
happy. The code works either way, but I like a clean compile.
1998-03-09 04:29:00 +00:00
Peter Dufault
aac4ad2c99 Reviewed by: bde
Changes to support building with _POSIX_SOURCE set to 199309L:

1. Add sys/_posix.h to handle those preprocessor defs that POSIX
says have effects when defined before including any header files;

2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE

3. Add _POSIX4_VISIBLE_HISTORICALLY for pre-existing BSD features now
defined in POSIX.  These show up when:

_POSIX_SOURCE and _POSIX_C_SOURCE are not set or
_POSIX_C_SOURCE is set >= 199309L

and vanish when:

_POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L.

4. Explain these in man 9 posix4;

5. Include _posix.h and conditionalize on new feature test.
1998-03-08 17:25:38 +00:00
John Polstra
1ab7c6cc77 Add support for ELF.
Switch to ANSI-style function definitions.
1998-03-07 19:57:05 +00:00
Brian Somers
0b3b961e55 We don't need to NUL terminate our sun_path.
Pointed out by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
1998-03-06 03:10:49 +00:00
Brian Somers
0d41e7b820 Nul terminate sockaddr_un::sun_path
Suggested by: Theo de Raadt <deraadt@openbsd.org>
1998-03-06 02:12:02 +00:00
Brian Somers
d584948ecd Make SyslogAddr a sockaddr_un rather than a sockaddr.
This wasn't a problem in practice as PATH_LOG and PATH_OLDLOG
are both < sizeof sockaddr::sa_data.
1998-03-05 22:17:59 +00:00
Peter Dufault
917e476dad Reviewed by: msmith, bde long ago
POSIX.4 headers and sysctl variables.  Nothing should change
unless POSIX4 is defined or _POSIX_VERSION is set to 199309.
1998-03-04 10:27:00 +00:00
Steve Price
f48bc66239 Replace previous commit with a check disallowing ptr from running
off the end of the list variable.

PR:		5345, 5610
Submitted by:	nagao@cs.titech.ac.jp
1998-03-01 18:49:37 +00:00
James Raynard
df37b71c14 Strings are terminated by NUL, not NULL. 1998-02-28 18:05:42 +00:00
Steve Price
f2328ab40a Remove the config_* routines with permission from Poul-Henning Kamp,
the original author.

PR:		5834
Discussed with:	phk, jkh
1998-02-28 03:57:05 +00:00
John Birrell
dc2c8572e9 The NetBSD getlogin syscall has a different name. 1998-02-20 08:07:40 +00:00
John Birrell
6abbaf17ac Fix a bogus cast for a bogus pointer check. This only checks if the
pointer is 4-byte aligned. On a 64-bit machine it probably should
check that the pointer is 8-byte aligned (eh, Bruce?) 8-)
1998-02-20 08:00:01 +00:00
John Birrell
9fcbcd0217 NetBSD kernels don't have issetugid(), so #ifdef this out when
building FreeBSD's libc to run with a NetBSD kernel. We'll get to
the alpha kernel later, I promise. 8-)
1998-02-20 07:54:56 +00:00
Steve Price
1cd25b46da Need to #include <unistd.h> for nice(3).
PR:		5782
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
1998-02-18 18:34:17 +00:00
Julian Elischer
39a9295edc Submitted by: Jeremy Allison (jallison@whistle.com)
fix a slight confusion about which draft of threads we are supporting.
this allows something as big and ugly as samba to be compiled with libc_r
and still work!  our user-level pthreads seems amazingly robust!
1998-02-18 01:20:33 +00:00