Commit Graph

2292 Commits

Author SHA1 Message Date
jb
e75a9bf58b Add sched_yield() witch is the draft 10 equivalent of pthread_yield()
from draft 4. Move some of the schedule definitions to sched.h which
is a POSIX header.
1998-03-08 02:37:27 +00:00
jdp
da474338f7 Enable csu/i386-elf under the appropriate conditions. 1998-03-07 20:30:18 +00:00
jdp
883194289c This commit was generated by cvs2svn to compensate for changes in r34198,
which included commits to RCS files with non-trunk default branches.
1998-03-07 20:27:11 +00:00
jdp
db1480afd7 Import C startup files for ELF support.
Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 20:27:11 +00:00
jdp
5a744a4713 Import C startup files for ELF support.
Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 20:27:11 +00:00
jdp
0be3e5f043 Add support for ELF.
Switch to ANSI-style function definitions.
1998-03-07 19:57:05 +00:00
ache
946b6b0c98 Add primary fat-32 1998-03-07 08:45:46 +00:00
wpaul
f7d07a4564 Fix resource allocation problems:
- Completely recoded the ypmatch cache code. The old code could leak
  memory: it would allow the cache to grow, but never
  shrink. The new code imposes the following limits:

	o The cache is capped at a limit of 5 entries.
	o Each entry expires after five seconds, at which point
	  its slot is freed.
	o If an insertion is to be done and all five slots
	  are filled, the oldest entry is forcibly expired
	  to release its slot.

  Also, the cache is implemented on a per-binding basis rather than
  having a global cache covering all bindings. This means that each
  bound domain has its own 5 slot cache.

- Changed clntudp_create() to clntudp_bufcreate() so that the
  xmit/recv message buffer sizes can be set explicitly. NIS transactions
  are rarely much larger than 1024 bytes since YPMAXRECORD is 1024.
  The defaults chosen by clntudb_create() are actually much larger
  than needed. I set the xmit buffer to a little over 1024 and the
  recv buffer to a little over 2048. This saves a few Kbytes for each
  NIS binding.

- Add my name to the copyright. I think I've made enough changes to
  this file to merit it. :)

Note: these changes should go into the 2.2.x branch, but I'm waiting
on feedback from a tester to see if the cache fixes solve the reported
memory leak problem.
1998-03-07 05:06:10 +00:00
bde
e95376539a Use the standard method for avoiding concurrent builds of multiple targets
built by a single rule (.ORDER: foo.c foo.h ...).
1998-03-06 13:44:12 +00:00
bde
dd1bebc58e Fixed building with `make -jN'. Put ss_err.h in SRCS so that recent
changes to bsd.lib.mk can handle building it early enough.  Don't
use the same rule for ss_err.h and ss_err.c, else `make -jN' would
run the rule twice concurrently.  Don't put ss_err.c out of order
in SRCS; doing so was a kludge to get ss_err.h built early enough
for plain `make'.

Don't put a non-generated file in CLEANFILES.
1998-03-06 08:26:00 +00:00
brian
0e30a8041e 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
b97852dd8d Nul terminate sockaddr_un::sun_path
Suggested by: Theo de Raadt <deraadt@openbsd.org>
1998-03-06 02:12:02 +00:00
brian
112fd47a26 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
obrien
de9fafafa5 Reconized OpenBSD partitions. 1998-03-05 03:08:16 +00:00
dufault
41966d30a6 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
bde
5a6868d27f Fixed uninitialized pointer in previous commit. mktemp() was broken.
I noticed cvs core dumps and uncleaned cvs temporary files in /tmp.

Fixed ANSIisms.
1998-03-03 14:38:36 +00:00
steve
bd1710d939 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
jraynard
5f4611ed29 Strings are terminated by NUL, not NULL. 1998-02-28 18:05:42 +00:00
ache
71f2126865 Install manpage too 1998-02-28 10:41:01 +00:00
steve
a8457533c2 foo.gz is created by 'make test' so add it to CLEANFILES. 1998-02-28 06:27:59 +00:00
steve
627fdefb0a algorithm.doc renamed to algorithm.txt in new distribution. 1998-02-28 06:10:08 +00:00
steve
1aa9cca905 Merge conflicts. 1998-02-28 06:08:17 +00:00
steve
541ae4457c This commit was generated by cvs2svn to compensate for changes in r33904,
which included commits to RCS files with non-trunk default branches.
1998-02-28 06:04:26 +00:00
steve
4e1bfc0123 Initial import of zlib-1.1.1
PR:		5869
Reviewed by:	jdp
1998-02-28 06:04:26 +00:00
steve
5f33767f6b 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
brian
788c370371 1) in CleanupAliasData, don't nullify entry in linkTableOut
since there might be permanent entries still left after
   calls to DeleteLink (it will be nullified by DeleteLink
   if all entries are deleted, won't it ?)

2) in PacketAliasSetAddress, set the aliasing address
   even when PKT_ALIAS_RESET_ON_ADDR_CHANGE is in effect.
   Just don't clean up links in this case.

Submitted by: Ari Suutari <ari@suutari.iki.fi>
         via: Charles Mott <cmott@srv.net>
PR: 5041
1998-02-27 23:07:07 +00:00
pst
9a47d0a21f Compile under -W -Wall -Werror.
Fix API - keycrunch takes const char's, not chars.
1998-02-27 22:36:51 +00:00
bde
0d1bd54492 Don't add non-generated sources to CLEANFILES. There was no problem
in practice, even if there is no obj directory, because the sources
are not in ${.CURDIR} and the full path to them was not added.
1998-02-25 01:30:05 +00:00
bde
f645803bdd Don't add OBJS to CLEANFILES. bsd.obj.mk does it. Some objects were
duplicated.
1998-02-25 01:20:27 +00:00
fenner
043c465f01 Change tty-related capability names to match the implementation ("ttys.",
not "tty.").
1998-02-21 23:29:59 +00:00
jb
e8ea46b408 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:41:46 +00:00
jb
c4837678a1 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:23:55 +00:00
jb
3371b26256 Add #include <string.h> to get prototypes. 1998-02-20 08:13:51 +00:00
jb
e4130772c6 The NetBSD getlogin syscall has a different name. 1998-02-20 08:07:40 +00:00
jb
4bee63cac4 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
jb
13f2c4dd4c 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
jb
98900e96c3 Add alpha support. m68k crept in too. Oops. 8-) 1998-02-20 07:44:29 +00:00
jb
0d0b8ba135 Avoid an uninitialised variable warning from gcc. I bet some people
don't like me doing this, but I want to see clean compiles. 8-)
1998-02-20 07:40:22 +00:00
steve
c812d4dffe 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
jkh
36a58a34a2 MF22: add login_auth.3 to man page list. 1998-02-18 05:29:07 +00:00
julian
91e1eaeae8 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
jkh
c5b5ef354a correct a typo I just noticed. 1998-02-17 19:41:53 +00:00
jkh
5fd681d4a9 Mention when bidirectional features first appeared. 1998-02-17 16:36:48 +00:00
jb
0f0123a844 signal() returns SIG_ERR, not just -1. The sys/signal.h header file
provides the cast from -1 to the signal() return type, so no further
casting by programmers should be required.

Pointed out by: bde (of course).
1998-02-15 00:46:47 +00:00
steve
40b375fbd6 Note that '+' and '?' are not special characters in basic REs but they
can be simulated using bounds.

PR:		5708
Submitted by:	Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
1998-02-14 18:26:29 +00:00
steve
0ec5ed6c45 Correctly document h and m modifiers to the time format.
PR:		5739
Submitted by:	Matthew Cashdollar <mattc@rfcnet.com>
1998-02-14 16:12:53 +00:00
bde
3ad0c082de Describe signal handling. Don't describe the old implementation. Don't
define `microsecond'.  Cleaned up English.

Obtained from:	mostly from sleep.3
1998-02-13 04:44:49 +00:00
bde
6ad2429228 Describe signal handling. Don't describe the old implementation. Cleaned
up English.

Obtained from:	mostly from NetBSD
1998-02-13 03:34:11 +00:00
imp
d3d77c0779 Many security improvements from OpenBSD:
implement mkdtemp
	improve man page for mk*temp
	use arc4random to seed extra XXX's randomly
	Optionally warn of unsafe mktemp uses
From various commits by theo de raadt and Todd Miller.
Obtained from: OpenBSD

This should go into 2.2 after a testing period.
1998-02-13 02:13:24 +00:00
julian
f0af3bec3a Fixes from Jeremy Allison and Terry Lambert for pthreads:
specifically:
uthread_accept.c: Fix for inherited socket not getting correct entry in
                  pthread flags.
uthread_create.c: Fix to allow pthread_t pointer return to be null if
                  caller doesn't care about return.
uthread_fd.c: Fix for return codes to be placed into correct errno.
uthread_init.c: Changes to make gcc-2.8 thread aware for exception stack
                frames (WARNING: This is #ifdef'ed out by default and is
		different from the Cygnus egcs fix).
uthread_ioctl.c: Fix for blocking/non-blocking ioctl.
uthread_kern.c: Signal handling fixes (only one case left to fix,
                that of an externally sent SIGSEGV and friends -
		a fairly unusual case).
uthread_write.c: Fix for lock of fd - ask for write lock, not read/write.
uthread_writev.c: Fix for lock of fd - ask for write lock, not read/write.

Pthreads now works well enough to run the LDAP and ACAPD(with the gcc 2.8 fix)
sample implementations.
1998-02-13 01:27:34 +00:00
bde
acbf52957c Fixed disordering of MLINKS in previous commit. Fixed old disorder in
MLINKS.
1998-02-12 23:52:23 +00:00
wpaul
e468bbc1ec Fix _listmatch() again so that it works with group lists containing only
one group. Thanks to Dirk Froemberg for supplying a patch for this. I will
be closing out the PR and moving this to the 2.2.5 branch later: my login
sessions to freefall from Columbia are ridiculously spotty today.

PR:	5610
Submitted by:	Dirk Froemberg <ibex@physik.TU-Berlin.DE>
1998-02-12 19:29:05 +00:00
nate
3f99173c63 - Bump the minor # due to the addition of the stringlist functions.
Reviewed by:	asami
1998-02-12 01:44:53 +00:00
jdp
869c15e6f9 Remove the include of <dlfcn.h> from crt0.c; it is not needed now
that the dl* trampolines have been moved into libc.

Move dlfcn.h from src/lib/csu/i386 into src/include.  Nothing in
src/lib/csu/i386 uses it any more.
1998-02-11 04:57:25 +00:00
guido
406f69d1f2 Do signal handlig he Posix way
Obtained from: NetBSD (after complains from Bruce)
1998-02-10 20:05:15 +00:00
jkh
99d9b60dd4 Be more verbose if we can't determine device major/minor. 1998-02-10 17:19:12 +00:00
jkh
5689fa645e environment variables missing from ftpio(3) man page
PR:		5691
Submitted by:	archie@whistle.com
1998-02-10 07:01:51 +00:00
jdp
8b451a66ac Move the trampolines for dlopen and related functions from crt0.o
into libc.  This reduces the size of every dynamically linked
executable by 248 bytes, and it reduces the size of static executables
by a lesser amount.  It also eliminates some global namespace
pollution.

With this change in place, the source for dlfcn.h should probably
be moved to "/usr/src/include".  I'll save that for another day.

Compatibility note:  Programs which use dlopen, if compiled on
systems with this change, will not run on systems with a libc from
prior to this change.  Very few programs use dlopen, so I think
that is OK.
1998-02-09 06:05:25 +00:00
jdp
a1b356b0ca Implement dladdr. 1998-02-06 16:46:46 +00:00
julian
601aea7c6d slight cleanup in handling sockets and file descriptors.
Same fix already applied to other types of fds. This one was apparently missed.
1998-02-05 21:16:52 +00:00
jlemon
3f976fc173 Document the fpgetprec/fpsetprec functions in their man page.
Add cross-references to the elusive fpsetmask() function to various other
man pages.
Reviewed by:	bde
1998-02-04 22:30:20 +00:00
steve
334de736ab Cleanup the manpage now that setpwent has a void return type. 1998-02-01 17:13:12 +00:00
steve
93b158108e XOpen says the void setpwent(void) is correct. Also call setpassent(0)
instead of duplicating code, albeit trivial (inspired by NetBSD).

PR:		5524
1998-02-01 06:16:08 +00:00
imp
4f04f9d730 Kill lfs files that were causing make world to fail. 1998-01-31 05:53:57 +00:00
danny
776a313a18 PR: 5573
Submitted by:	garbanzo@hooked.net
Add strncasecmp, strncmp to NAME field.
1998-01-27 07:01:09 +00:00
jb
dead0de6f9 Fix a cast from a pointer to a long instead of an int which was enough
to ruin a 64-bit day.
1998-01-24 20:57:38 +00:00
helbig
6dbdb23803 Don't swap carriage return and new line in quoted mode (after ^V). 1998-01-22 07:37:10 +00:00
imp
69e8633347 Eliminate sprintf
Obtained from:OpenBSD (theo de raadt)
1998-01-21 21:46:36 +00:00
bde
260d71f280 Fixed #includes in the synopsis and in an example. <sys/socket.h>
isn't a prerequisite, since it isn't required for the prototypes
and isn't always needed to call the functions (the address family
might be a variable).
1998-01-20 11:03:15 +00:00
bde
d5495621be Moved most of the (source-level) compatibility hacks for the vfsconf
interface from sys/mount.h to libc/getvfsent.c  The new interface is
now the default.
1998-01-20 10:36:24 +00:00
alex
d0b6832ba6 Added cross references to mincore(2) and minherit(2).
Obtained from:	OpenBSD
1998-01-20 03:59:07 +00:00
alex
4eb1db1944 Added #include <sys/types.h> to synopsis.
Obtained from:	OpenBSD
1998-01-20 03:52:49 +00:00
bde
bb8e875adb Started getting rid of the compatibility cruft for the Lite1 mount()
and the pre-Lite2 vfsconf interfaces.

For getvfsent.c, just define _OLD_VFSCONF.  This will give the
current default macro hacks in <sys/mount.h> when the default is
reversed.  This is an intermediate step.
1998-01-17 16:32:14 +00:00
bde
af77aa9258 Don't install the tcl implementation headers. The tcl distribution
makefile doesn't install them, and they couldn't be used without
lots of undocumented -I's in CFLAGS.  tcl.h is still installed in
/usr/include/tcl/.  Note that rev.1.24 of tcl_bmake/mkMakefile.sh
broke all the section 3 tcl man pages by putting it there instead
of in /usr/include.
1998-01-17 15:52:32 +00:00
bde
91bb73570d Updated shlib version to 80.4 in the correct place.
Regenerated libtcl/Makefile.  This adds -DHAVE_ST_BLKSIZE=1 to CFLAGS.
It was broken by direct editing in rev.1.25.
1998-01-17 15:49:55 +00:00
bde
fd68a9a4e2 Fixed bitrot in the prototype for logwtmp(). 1998-01-16 16:53:30 +00:00
bde
ac7024beac Fixed bugs in the conversion of kvm to to use procfs in rev.1.3. All
are in kvm_uread():
- the setting of errno before checking it in the lseek() was lost.
- EOF handling was lost.  kvm_uread() retried forever on EOF.  EOF is
  not really an error, but report it one as in rev.1.2.
- reporting of errno after a read error was lost.

Fixed style bugs in rev.1.3 and rev.1.12.

Not fixed: errno is not reported after lseek() failures.
1998-01-16 16:45:05 +00:00
bde
e0900ea8b7 Fixed wrong prototype for history().
Don't (mis)use .Fd outside of the synopsis.
1998-01-16 14:33:47 +00:00
bde
8854773755 Fixed missing #include in synopsis. 1998-01-16 13:41:28 +00:00
bde
537cf546ce Fixed wrong prototype for clock_getres(). 1998-01-16 13:39:49 +00:00
bde
1368257905 Fixed wrong prototypes. Most of the prototypes had missing return types,
or missing const's or `short *' instead of `[ug]id_t *' in argument types.
1998-01-16 13:33:09 +00:00
bde
4a1bdb147e Fixed missing return type in a prototype. 1998-01-16 13:10:18 +00:00
bde
ca34bdb372 Fixed a missing #include in the synopsis.
Fixed some wrong prototypes.
Fixed a misspelled function name.

The owner of this file should add a copyright and an Id.
1998-01-16 13:02:58 +00:00
bde
6a7d09c6e3 Added prototypes for functions that were documented in libalias.3
but not prototyped here.
1998-01-16 12:56:07 +00:00
jkh
7afbd8f11b Non-intrusive changes to support Justin's CAM stuff. 1998-01-16 12:50:36 +00:00
danny
721d9998e8 PR: 5489
Submitted by:	Steve G. Kargl <kargl@troutmask.apl.washington.edu>
Repair corrupted text.
1998-01-15 23:28:18 +00:00
mckay
90c92913db Return the correct errno from getcwd() even if free() or closedir()
overwrites it.  This actually showed up when running under an old
kernel when free() called the madvise() stub which set errno, causing
getcwd() to return EOPNOTSUPP instead of ERANGE.
1998-01-15 13:52:55 +00:00
jb
f8f0bef69d Add #ifndef __NETBSD_SYSCALLS around calls to issetugid() which
do not exist in NetBSD 1.3.
1998-01-15 09:58:08 +00:00
alex
c3a80ae38d Typo fix.
Added EOPNOTSUPP and EMLINK to errors section.
Added symlink(2) xref.

Obtained from:	OpenBSD
1998-01-15 04:31:28 +00:00
jb
55eaed8556 Include string.h for memcpy function prototype. 1998-01-14 08:14:56 +00:00
brian
a752101457 Remove __libalias_version. Ppp no longer uses it. 1998-01-14 01:24:49 +00:00
alex
75c9bb7007 Consistently reference init as .Xr init 8.
Obtained from:	OpenBSD
1998-01-13 05:09:16 +00:00
alex
e85fb8c9c6 Return type and argument to sleep are unsigned int. 1998-01-13 04:32:00 +00:00
jb
eaf5a5de99 When printf'ing the result of pointer arithmetic, cast the result to
long and use %ld, not %d.

We're going to need an abbreviation for this comment 'cause it's going
to be used a lot from now on.
1998-01-13 03:07:10 +00:00
alex
c9c6d0d069 Dump the constant NGROUPS in favor of the POSIX way:
sysconf(_SC_NGROUPS_MAX).

Submitted by:	bde
1998-01-13 01:30:17 +00:00
alex
76547252a0 Use .Fn for sysconf(_SC_CLOCK_TCK) reference.
Added $Id$.
1998-01-13 01:21:19 +00:00
eivind
0cbd294747 ${TARGET} -> ${.TARGET}
Tiny pointed hat goes to:	Our Makefile-meister.
1998-01-12 18:29:02 +00:00
alex
2bb65359f9 Formatting fix & improved comment for struct timeval.
Obtained from:	OpenBSD
1998-01-11 22:28:56 +00:00
alex
7613adfefd Fixed brk(2) xref.
Obtained from:	OpenBSD
1998-01-11 22:22:50 +00:00
alex
a110c56fa5 Added sys/types.h to synopsis as per POSIX.
Obtained from:	OpenBSD
1998-01-11 22:16:11 +00:00
alex
8bffd27242 Replace sys/param.h with sys/types.h as per POSIX.
Document the special case of gidsetlen == 0.

Partially obtained from: OpenBSD
1998-01-11 22:01:20 +00:00
alex
2ec1938b87 Document that arg max is controllable via sysctl. 1998-01-11 21:43:38 +00:00
eivind
5a3683e8c8 Remove use of <osreldate.h>.
Screwed up by: myself
1998-01-11 18:34:38 +00:00
alex
6ebef43b6e Formatting fix.
Obtained from:	OpenBSD
1998-01-11 17:49:51 +00:00
alex
838cb92667 Added EMFILE and ENFILE to errors section.
Obtained from:	OpenBSD
1998-01-11 17:07:20 +00:00
alex
5b7434b5b4 .Xr sigvec --> sigaction
Obtained from:	OpenBSD
1998-01-11 16:56:01 +00:00
alex
d976951af1 Add <sys/types.h> to synopsis.
Correct a grammatical error.
Add cross-reference to setrlimit(2).

Obtained from:	OpenBSD
1998-01-11 16:51:49 +00:00
cvs2svn
4b349d543c This commit was manufactured by cvs2svn to create branch 'jb'. 1998-01-11 03:30:40 +00:00
jb
4decdee57e CSU source for Alpha obtained from NetBSD. The makefile will require
more work when we get a half-way usable libc (which is next).
1998-01-11 03:30:39 +00:00
cvs2svn
bb3dd863de This commit was manufactured by cvs2svn to create branch 'JB'. 1998-01-10 23:00:07 +00:00
jb
fd532d0d39 We can now build libm on Alpha. There is very little MD alpha code. 1998-01-10 22:51:51 +00:00
jb
85602d94e1 This is the only alpha math source that NetBSD has. 1998-01-10 22:17:24 +00:00
steve
f40e1761fd Put back __libalias_version so ppp(8) build again. 1998-01-10 19:37:19 +00:00
alex
c9169ceff6 Sync with ipfw interface change: fw_pts is now part of a union (a
necessary evil due to the 108 byte setsockopt() limit).
1998-01-10 16:14:18 +00:00
jkh
8c5510b6ac include <net/if.h> and restore this to sanity. 1998-01-10 15:04:06 +00:00
jb
a3a4d14924 Bruce says that ${.CURDIR}/csu/${MACHINE} will prevent finding a
stale obj directory and we wouldn't want to do that! I trust he knows
what he's talking about. 8-)

Also avoid building libm at all until the NetBSD asm code is imported.
I wrongly commented this out last time. Oops.
1998-01-10 09:09:24 +00:00
jb
78b8de0821 Allow this to compile with NetBSD tools. 1998-01-09 23:51:04 +00:00
eivind
84790d5677 Teach libalias to work with IPFW firewalls (controlled by a flag).
Obtained from: Yes development tree (+ 10 lines of patches from
	Charles Mott, original libalias author)
1998-01-09 21:13:35 +00:00
jb
87b8c3dd13 Don't build libc, libc_r or libm on Alpha yet. We'll do the other
libraries first and use NetBSD's libc/libm for now.
1998-01-09 19:46:30 +00:00
jb
6bea153fe3 Make a couple of the stat flags dependent on the sys/stat.h header file
that this source is compiled against. This source is referenced by
install which is needed as a build tool and must be able to compile
against NetBSD headers and libraries if we have a hope of supporting
another architecture.

With this change, that's two working programs down and 3945 (?) to go.
The other one was make, but that didn't need any changes to work under
FreeBSD/Alpha. 8-)
1998-01-09 06:14:59 +00:00
jb
f22d2235c2 Build lib/csu/${MACHINE} only if it exists so that when porting FreeBSD
to another architecture (in this case the Alpha) we can continue to use
the host csu objects (from NetBSD). This should be a non-function change
to FreeBSD/i386.
1998-01-09 05:37:41 +00:00
imp
3dfffd9a4a handle long usernames more carefully
Reviewed by:	guido
Obtained from:	OpenBSD (Theo de Raadt)
1998-01-07 00:28:36 +00:00
charnier
579b328c35 Convert to mdoc format. 1998-01-05 07:12:16 +00:00
ache
fad7afe353 size_t -> unsigned
in arguments length INT_MAX overflow check
Suggested-by: bde
1998-01-04 22:28:47 +00:00
alex
98c758e7db Expanded cross references. 1998-01-02 19:22:52 +00:00
ache
98933e6b0c Remove unneeded code left from testing 1998-01-02 05:05:20 +00:00
ache
2ddac28656 1) Redo internal interface to be more latest ncurses-like
2) Fix winsdel called in last line of the window (nothing happens in
   old variant)
3) Add range checks to wscrl() and internal soft scroll function
1998-01-02 04:36:51 +00:00
steve
eacad4deed Fix another problem with clearing the last line of the
display.

Submitted by:	Kouichi Hirabayashi <kh@mogami-wire.co.jp>
1998-01-01 23:27:10 +00:00
ache
e26e31bc30 1. EOF was returned when the buffer size was larger than INT_MAX. This
case has very little to do with the output size being larger than
   INT_MAX.
2. The new #include of <limits.h> was disordered.
3. The new declaration of `on' was disordered (integer types go together).
4. Testing an unsigned value for > 0 was fishy.

Submitted by: bde
1998-01-01 20:15:58 +00:00
alex
3e32f625d1 Drop the use of caddr_t in conjunction with mmap(2). 1997-12-31 03:15:06 +00:00
alex
e57827e700 Convert caddr_t --> void * for sys/mman.h functions.
mlock, mmap, mprotect, msync, munlock, and munmap are defined by
POSIX as taking void *.  The const modifier has been added to
mlock, munlock, and mprotect as the standard dictates.

minherit comes from OpenBSD and has been updated to conform with
their recent change to void *.

madvise and mincore are not defined by POSIX, but their arguments
have been modified to be consistent with the POSIX-defined functions.
mincore takes a const pointer, but madvise does not due to the
MADV_FREE case.

Discussed with:	bde
1997-12-31 01:22:01 +00:00
alex
bb3c326366 Fixed formatting of the MADV_FREE flag description.
Pointed out by:	bde
1997-12-30 05:17:33 +00:00
alex
9179f52012 Typo fix. 1997-12-30 04:05:47 +00:00
alex
32937e2ca1 Document MS_SYNC. 1997-12-30 03:26:15 +00:00
steve
3690792b75 Handle the condition where BS is typed while the cursor is
at the first position on either of the last two lines of the
screen.  Ie. append contents of current line to the previous
line and scroll the next line's contents up.

PR:		5392
Submitted by:	Kouichi Hirabayashi <kh@mogami-wire.co.jp>
1997-12-29 03:29:29 +00:00
wosch
1fc752bc49 The terminating character in strings is NUL', not NULL'. 1997-12-28 12:06:29 +00:00
hoek
25d7673de7 fork() checks RLIMIT_NPROC, not RLIMIT_NOFILE.
pr:		docs/5260
submitted-by:	Niall Smart [3]njs3@doc.ic.ac.uk
1997-12-26 16:11:49 +00:00
alex
1707c1170c Changed pthread_detach to conform to POSIX, i.e. the single argument
provided is of type pthread_t instead of pthread_t *.

PR:		4320

Return EINVAL instead of ESRCH if attempting to detach an already
detached thread.
1997-12-25 05:07:20 +00:00
alex
c6178eb74c Removed unnecessary initialization of hp in gethostbyaddr_r. 1997-12-25 04:21:08 +00:00
ache
2ed6ef512c Add overflow checks: if output size becomes bigger than INT_MAX,
just return EOF
1997-12-25 00:32:17 +00:00
ache
6d6e016701 Correct type of stored argument place (from previous fix) 1997-12-24 23:54:19 +00:00
ache
80277e50eb 1) Restore back comment about snprintf()
2) Optimize string buffer copy to call memcpy() and update pointers
only for count > 0, it makes snprintf(NULL, 0, ...) more efficient
1997-12-24 23:23:18 +00:00
ache
f54c0bca35 Return back to BSD snprintf semantics which recent C9x standard adopts
instead of Singe Unix, thanx Bruce for explaining, I am not realize
standards war was there.

But now, fix n == 0 case to not return error and fix check for too
big n.

Things left to do: check for overflow in arguments.
1997-12-24 23:02:47 +00:00
ache
aca1242199 1) Oops! Insert again if (n == 0) return 0.
Final word is Bruce's quote:

C9x specifies the BSD4.4-Lite behaviour:

       [#3] ...   Thus,  the
       null-terminated  output  has  been completely written if and
       only if the returned value is less than n.

It means that if we not have any null-terminated output as for n == 0
we can't return value less than n, so we forced to return value
equal to n i.e. 0

The next good thing is glibc compatibility, of course.

2) Do check for too big n in machine-independent way.
3) Minor optimization assuming EOF is < 0
1997-12-24 20:24:08 +00:00
ache
42a7fea93b Back out part related to "return 0 if n == 0" and return EOF as before.
The main argument is that it is impossible to determine if %n evaluated or not
when snprintf return 0, because it can happens for both n == 0 and n == 1.
Although EOF here is good indication of the end of process, if n is
decreased in the loop...
Since it is already supposed in many places that EOF *is* negative, f.e.
from Single Unix specs for snprintf
"return ... a negative value if an output error was encountered"
this not makes situation worse.
1997-12-24 14:32:40 +00:00
ache
e73e3ecc2a Fix snprintf(...%n...)
to pass not more than buffer size to %n agrument, old variant
always assume infinite buffer.
%n is for actually transmitted characters, not for planned ones.
1997-12-24 13:47:13 +00:00
ache
4838495a16 Remove wrong comment about snprintf:
"return the number of bytes needed, rather the number used"

According to Single Unix specs:

Upon successful completion, these functions return the number of bytes
transmitted excluding the terminating null
1997-12-24 13:17:13 +00:00
ache
2b84b675bc snprintf return value fixes to conform Single Unix specs:
1) if buffer size is smaller than arguments size, return buffer
size, not arguments size as before.

2) if buffer size is 0, return 0, not EOF as before.
(now it is compatible with Linux and Apache implementations too).

NOTE: Single Unix specs says:

If the value of n {buffer size} is zero on a call to snprintf(), an
unspecified value less than 1 is returned.

It means we can't return EOF since EOF can take *any* value in general
not especially < 1. Better variant will be return -1 (it is less then
1 and different with n == 1 case) but -1 value is already occuped by
EOF in our implementation, so we can't distinguish true IO error
in that case. So 0 here is only possible case still conforming
to Single Unix specs.
1997-12-24 12:31:32 +00:00
jb
d9ede58894 Change errno usage as a field in a structure and as an argument to a
function from 'errno' to 'error' so that there is no conflict with the
thread-safe definition of errno in errno.h.
1997-12-20 04:06:06 +00:00
bde
02c0ec1552 Fixed the termcap 3.0 hacks. They were very broken in my configuration
where shared libraries are in /lib and almost everything is linked
shared.  First, they removed the old shared library before installing
the new one.  Second, they attemped a cross-device link from /lib
to /usr/lib/compat.
1997-12-19 22:11:29 +00:00
bde
92e89fbf9c Comment that long double is poorly implemented, not that it is unimplemented. 1997-12-19 21:59:22 +00:00
bde
f947885ff6 Put the .PATH statement first as in all other libc Makefile.inc's. 1997-12-19 21:56:38 +00:00
bde
8a86006287 Format the MLINKS statement the same as in most other libc Makefile.inc's. 1997-12-19 21:53:35 +00:00
jb
ffe51a5e26 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
helbig
4f734e3cc7 Delete "typedef ... date" (see style(9)).
In the man page Use ".Pp" instead of blank lines, adopt English
and stress that the Julian->Gregorian switch took place at
different dates in different countries.
Suggested by: Garrett.
1997-12-13 11:51:16 +00:00
helbig
0f5884f197 Added easterog() and easteroj() which compute orthodox easter for
Gregorian and Julian Calendar.
Suggested by: Andrey
1997-12-07 19:04:14 +00:00
helbig
38910745f6 Add libcalendar. 1997-12-04 10:48:14 +00:00
helbig
57d7a4f2c2 This commit was generated by cvs2svn to compensate for changes in r31529,
which included commits to RCS files with non-trunk default branches.
1997-12-04 10:41:49 +00:00
helbig
2508061a28 Provides date of easter and other calendar related arithmetic. 1997-12-04 10:41:49 +00:00
peter
76345d24d4 "un-bump" the major number for libtermcap.so. This brings -current back
to the same version numbers as 2.2.x.
The problem with the way things were was:
 - if you took a 2.2.x binary, it either wouldn't run on -current or
   if you had the old -current version of libtermcap.so.2.1 then it could
   potentially be a security problem.
 - the alternative is to start a compat22 tree dist for -current with a
   uuencoded binary.  This makefile hack is less cost.
libtermcap.so.3.0 is provided via /usr/lib/compat to avoid transition
problems.
1997-12-02 11:56:36 +00:00
peter
846e55f5e5 s/geteid/geteuid/ - it's lucky I have a large supply of left-over pointy
hats from Tristan's last birthday party. :-]
1997-11-29 11:39:31 +00:00
peter
445c5a8e96 Work around the problems caused by calling issetugid() in libtermcap in
a similar way to libc. Sigh.  This is not pretty but seems to work.
Somthing like this was needed in preference to bogusly bumping the major
library number here.

The syscall(SYS_issetugid) idea is originally Bruce's.
1997-11-29 11:30:57 +00:00
pst
ec28a1a097 Upgrade minor version 1997-11-27 20:52:28 +00:00
alex
53a1e6bd26 Modify the return values to comply with POSIX. Previously these
functions would return -1 and set errno to indicate the specific error.
POSIX requires that the functions return the error code as the return
value of the function instead.
1997-11-25 01:29:16 +00:00
alex
7beab17b20 Added missing source file uthread_sigwait.c.
Submitted by:	Daniel M. Eischen <deischen@iworks.InterWorks.org>
1997-11-24 23:04:29 +00:00
alex
fd31bae6f0 Correct the return value from pthread_cond_timedwait when a timeout
occurs (was EAGAIN, is now ETIMEDOUT).

Submitted by:	Daniel M. Eischen <deischen@iworks.InterWorks.org>
1997-11-23 22:58:26 +00:00
bde
74b31032f5 Fixed spelling of EACCES. 1997-11-23 17:58:55 +00:00
bde
82e1e72dbf Fixed long double formats. They were mostly not implemented except
on systems where long doubles are just doubles.  FreeBSD hasn't
been such a system since it started using gcc-2.5 many years ago.
The fix is of low quality.  It loses precision.

scanf() of long doubles doesn't seem to be used much, but gdb-4.16
uses %Lg format in its expression parser if it thinks that the
system supports printf'ing of long doubles.  The symptom was that
floating point literals were usually interpreted to be 0.0.
1997-11-23 06:02:47 +00:00
brian
e379383589 const correctness for dl*() 1997-11-22 03:34:46 +00:00
jraynard
f267ee9f03 Fix bit-twiddling in sigismember(3).
Note this ONLY affects the function version - the macro version is always
used unless for some reason you put #undef sigismember in your code before
calling it.
PR:		3615
Submitted by:	Nanbor Wang <nw1@cs.wustl.edu> (slightly amended patch)
1997-11-21 23:18:05 +00:00
bde
17b46b35a6 Don't check for the unlikely case of useconds == 0 here. The kernel
checks it.

Fixed a style bug.
1997-11-20 15:13:20 +00:00
bde
4d5ac0e1b1 stat() the correct file in execvp() so that the fine tuned errno handling
actually works.
1997-11-20 15:09:38 +00:00
jdp
d83073a6b8 Fix erroneous format string. 1997-11-18 05:34:45 +00:00
jdp
5c30d8407f Add cross-references to rfork(2). 1997-11-18 03:59:30 +00:00
wpaul
127104a002 Close PR #4867: improve _listmatch() to avoid returning false positives.
PR: 4867
1997-11-16 03:02:39 +00:00
julian
857944f486 Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
1997-11-13 00:28:51 +00:00
julian
ac07cf2063 Reviewed by: various.
Ever since I first say the way the mount flags were used I've hated the
fact that modes, and events, internal and exported, and short-term
and long term flags are all thrown together. Finally it's annoyed me enough..
This patch to the entire FreeBSD tree adds a second mount flag word
to the mount struct. it is not exported to userspace. I have moved
some of the non exported flags over to this word. this means that we now
have 8 free bits in the mount flags. There are another two that might
well move over, but which I'm not sure about.
The only user visible change would have been in pstat -v, except
that davidg has disabled it anyhow.
I'd still like to move the state flags and the 'command' flags
apart from each other.. e.g. MNT_FORCE really doesn't have the
same semantics as MNT_RDONLY, but that's left  for another day.
1997-11-12 05:42:33 +00:00
kato
7681e43f8e Describe MNT_NOCLUSTER{R,W} flags.
Pointed out by:		bde
1997-11-09 03:36:26 +00:00
jmg
0e4c97ea1b changed prototype to match text
changed sysctl to lsvfs as "sysctl vfs" doesn't return a listing of
possible filesystem names
1997-11-05 10:09:33 +00:00
steve
a6fcb6fcda Correct description of which runes are encoded as two bytes.
PR:		4555
Submitted by:	Dmitrij Tejblum <tejblum@arc.hq.cti.ru>

[0x0400 - 0xffff] [bbbbbbbb.bbbbbbbb] -> 1110bbbb, 10bbbbbb, 10bbbbbb
.Ed
.Pp
If more than a single representation of a value exists (for example,
0x00; 0xC0 0x80; 0xE0 0x80 0x80) the shortest representation is always
used (but the longer ones will be correctly decoded).
.Pp
The final three encodings provided by X-Open:
.Bd -literal
[00000000.000bbbbb.bbbbbbbb.bbbbbbbb] ->
	11110bbb, 10bbbbbb, 10bbbbbb, 10bbbbbb

[000000bb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
	111110bb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb

[0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
	1111110b, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
.Ed
.Pp
which provides for the entire proposed ISO-10646 31 bit standard are currently
not implemented.
.Sh "SEE ALSO"
.Xr mklocale 1 ,
.Xr setlocale 3
@


1.4
log
@Don't use hardcoded *roff font change requests.  Do it
via mdoc macros instead.
@
text
@d37 1
a37 1
.Dd "June 4, 1993"
@


1.3
log
@Very minor mdoc cleanup.
@
text
@d44 2
a45 1
\fBENCODING "UTF2"\fP
@


1.2
log
@Another round of various man page cleanups.
@
text
@d65 1
a65 1
.sp
d81 1
a81 1
.sp
@


1.2.2.1
log
@YAMFC:

Commit all of the -current changes that apply to 2.2.  These fall into
several categories:

- Cosmetic/mdoc changes.  They don't really afect the output
  at all, but having them in 2.2 will make it easier to diff the man
  pages later when looking for real changes.
- Update some man pages to reflect the current 2.2 header files.
- Sort xrefs.
- A few typo fixes.
- And a few changes that actualy added text to the man page that should
  be reflected in 2.2.
- Add some missing MLINKS.

Requested by: bde
@
text
@d44 1
a44 2
.Nm ENCODING
.Qq UTF2
d65 1
a65 1
.Pp
d81 1
a81 1
.Pp
@


1.2.2.2
log
@MFC:  Just the locale fixes (small doc tweaks for the most part)
and the new strptime(3) call.  Having added something, does this
require a version bump?  Haven't we bumped once already?

There are a *LOT* of additional 3.0 changes to be merged but I'm not
entirely comfortable with some of them so I'll take the conservative
(read: cowardly :) way out and just merge this much.
@
text
@d37 1
a37 1
.Dd June 4, 1993
@


1.1
log
@Initial revision
@
text
@d41 1
a41 1
.Nm UTF2
@


1.1.1.1
log
@BSD 4.4 Lite Lib Sources
@
text
@@


1.1.1.1.6.1
log
@Phase 2 of merge - also fix things broken in phase 1.
Watch out for falling rock until phase 3 is over!

libc completely merged except for phkmalloc & rfork (don't know if David
wants that).

Some include files in sys/ had to be updated in order to bring in libc.
@
text
@d41 1
a41 1
.Nm utf2
@


1.1.1.1.6.2
log
@This 3rd mega-commit should hopefully bring us back to where we were.
I can get it to `make world' succesfully, anyway!
@
text
@d41 1
a41 1
.Nm UTF2
@
1997-11-05 04:18:42 +00:00
steve
fa416abedc Make the login_getclassbyname prototype match reality.
PR:		4838
1997-11-05 04:03:05 +00:00
joerg
e11ed07062 Typo.
Submitted by:	peter@rhiannon.clari.net.au (Peter Hawkins)
1997-10-28 07:46:27 +00:00
charnier
0434878496 Statisize usage(). 1997-10-27 07:53:22 +00:00
wpaul
f4007fa3c5 In clntudp_call(), it is possible that xdr_replymsg() might fail
partway through its attempt to decode the result structure sent by
the server. If this happens, it can leave the result partially
populated with dynamically allocated memory. In this event, the
xdr_replymsg() failure is detected and RPC_CANTDECODERES is returned,
but the memory in the partially populated result struct is not
free()d.

The end result is that memory is leaked when an RPC_CANTDECODERES
error occurs. (This condition can occur if a CLIENT * handle is created
using clntudp_bufcreate() with a receive buffer size that is too small
to handle the result sent by the server.)

Fixed by setting reply_xdrs.x_op to XDR_FREE and calling
xdr_replymsg() again to free the memory if an RPC_CANTDECODERES error
is detected.

I suspect that the clnt_tcp.c, clnt_unix.c and clnt_raw.c modules
may ha a similar problem, but I haven't duplicated the condition with
those yet.

Found by: dbmalloc
1997-10-26 18:47:31 +00:00
helbig
9831b5e7b6 Typo. 1997-10-26 10:37:35 +00:00
jdp
4a1714d904 Change L_SET to SEEK_SET for POSIX compliance.
Submitted by:	Dean Gaudet <dgaudet@arctic.org>
1997-10-26 00:41:51 +00:00
jraynard
812dc42a7e Fix a few typos. 1997-10-22 23:12:27 +00:00
ache
b41073c616 Back out part of OpenGroup specs about limiting max arg since it may break
compatibility.
1997-10-22 12:04:49 +00:00
ache
32a4ecb1f4 Reflect usleep code changes:
Limit max arg
Change return type to int
1997-10-22 11:27:20 +00:00
ache
057b21a8cd Changes in spirit of OpenGroup Singe Unix specs:
1) Limit max allowed argument to 1000000
2) Change return type from void to int to indicate premature termination
(by signal)
1997-10-22 10:55:49 +00:00
joerg
914ab5d893 Document EINVAL as a possible return value from open(2). 1997-10-22 07:29:13 +00:00
bde
5368c6cec2 Sorted lists. 1997-10-21 08:41:15 +00:00
ache
3db61f0e35 Remove terminfo manpage we don't have it 1997-10-20 17:53:55 +00:00
bde
6c388deaa6 Removed unused file. It just forces a return value of 0 on success
(no carry), but mount() in the kernel has returned 0 on success since
prehistoric times.
1997-10-18 13:59:48 +00:00
ache
664584be40 Add $Id 1997-10-17 09:40:08 +00:00
ache
843393784e Fix LONG_MAX overflowing
Return seconds if errno other than EINTR
Add $Id
Submitted by: bde with minor optimization by me
1997-10-17 09:35:50 +00:00
jdp
267d106184 Fix two bugs which caused various RPC programs (mountd, nfsd, ...)
to fail under certain circumstances.

1. In one spot, the ifr_flags member was being examined in the
wrong structure, thus it contained garbage.  On a machine in which
only the loopback interface was up, this caused everything that
wanted to talk to the portmapper to fail -- a particular problem
with laptops, where the pccard ethernet interface is likely to come
up long after the attempt to start mountd, nfsd, amd, etc.

2. Compounding the above problem, get_myaddress() returned a
successful status even though it failed to find an address that it
considered good enough.
1997-10-17 04:59:56 +00:00
ache
7bbe2d96d5 Copy time_to_sleep to time_remaining since it can be left
uninitialized if nanosleep returns early with agr error
1997-10-16 21:31:43 +00:00
bde
747da9047c 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
a523adad88 Removed bogus .PATH statement. 1997-10-16 14:41:25 +00:00