Commit Graph

2283 Commits

Author SHA1 Message Date
bde
ea126748df 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
e836f65855 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
efc99b1047 Nul terminate sockaddr_un::sun_path
Suggested by: Theo de Raadt <deraadt@openbsd.org>
1998-03-06 02:12:02 +00:00
brian
536dbcff68 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
f3f529e90a Reconized OpenBSD partitions. 1998-03-05 03:08:16 +00:00
dufault
e28788f2a4 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
b19f66b1ca 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
d3ce45cfa7 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
faf593c225 Strings are terminated by NUL, not NULL. 1998-02-28 18:05:42 +00:00
ache
2d52e6140b Install manpage too 1998-02-28 10:41:01 +00:00
steve
bbddf6eaf2 foo.gz is created by 'make test' so add it to CLEANFILES. 1998-02-28 06:27:59 +00:00
steve
27b056fb85 algorithm.doc renamed to algorithm.txt in new distribution. 1998-02-28 06:10:08 +00:00
steve
237ff31c6d Merge conflicts. 1998-02-28 06:08:17 +00:00
steve
8514318799 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
9f86c0bf8c Initial import of zlib-1.1.1
PR:		5869
Reviewed by:	jdp
1998-02-28 06:04:26 +00:00
steve
f68a7e4644 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
e33f0286b1 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
41b578bc9b Compile under -W -Wall -Werror.
Fix API - keycrunch takes const char's, not chars.
1998-02-27 22:36:51 +00:00
bde
71480980bc 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
c1b52b86d5 Don't add OBJS to CLEANFILES. bsd.obj.mk does it. Some objects were
duplicated.
1998-02-25 01:20:27 +00:00
fenner
52b9dae4bb Change tty-related capability names to match the implementation ("ttys.",
not "tty.").
1998-02-21 23:29:59 +00:00
jb
7bfcc9edbb Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:41:46 +00:00
jb
bdf0841be6 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:23:55 +00:00
jb
5860dff332 Add #include <string.h> to get prototypes. 1998-02-20 08:13:51 +00:00
jb
3369620301 The NetBSD getlogin syscall has a different name. 1998-02-20 08:07:40 +00:00
jb
c72033468c 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
f80a6bb91d 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
d4dd404bc1 Add alpha support. m68k crept in too. Oops. 8-) 1998-02-20 07:44:29 +00:00
jb
f12b4c9703 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
c8d39d3d21 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
4430df5b84 MF22: add login_auth.3 to man page list. 1998-02-18 05:29:07 +00:00
julian
6d639f103c 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
62e49a374e correct a typo I just noticed. 1998-02-17 19:41:53 +00:00
jkh
fbff114b3b Mention when bidirectional features first appeared. 1998-02-17 16:36:48 +00:00
jb
3317d38e22 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
623d77caec 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
71e81c1b84 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
85b6b2fc81 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
9a445ed5d6 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
9461b07207 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
b31dde27bf 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
0b6b54525f Fixed disordering of MLINKS in previous commit. Fixed old disorder in
MLINKS.
1998-02-12 23:52:23 +00:00
wpaul
52d2adbd3e 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
ec6f970a86 - Bump the minor # due to the addition of the stringlist functions.
Reviewed by:	asami
1998-02-12 01:44:53 +00:00
jdp
a73c0d4a85 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
746524c17b Do signal handlig he Posix way
Obtained from: NetBSD (after complains from Bruce)
1998-02-10 20:05:15 +00:00
jkh
ea609c7dcd Be more verbose if we can't determine device major/minor. 1998-02-10 17:19:12 +00:00
jkh
0960b03c1e environment variables missing from ftpio(3) man page
PR:		5691
Submitted by:	archie@whistle.com
1998-02-10 07:01:51 +00:00
jdp
4538098d0b 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
d5b09c81ec Implement dladdr. 1998-02-06 16:46:46 +00:00
julian
5b999ea00c 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
856becd843 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
21062993ed Cleanup the manpage now that setpwent has a void return type. 1998-02-01 17:13:12 +00:00
steve
82731c60fb 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
30147f6862 Kill lfs files that were causing make world to fail. 1998-01-31 05:53:57 +00:00
danny
3599f91c1d PR: 5573
Submitted by:	garbanzo@hooked.net
Add strncasecmp, strncmp to NAME field.
1998-01-27 07:01:09 +00:00
jb
58cb73a02b 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
f98c0d7ba5 Don't swap carriage return and new line in quoted mode (after ^V). 1998-01-22 07:37:10 +00:00
imp
ccb92f47cf Eliminate sprintf
Obtained from:OpenBSD (theo de raadt)
1998-01-21 21:46:36 +00:00
bde
69cc484699 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
8da50425fb 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
489fe3d6c2 Added cross references to mincore(2) and minherit(2).
Obtained from:	OpenBSD
1998-01-20 03:59:07 +00:00
alex
7dc5a7949c Added #include <sys/types.h> to synopsis.
Obtained from:	OpenBSD
1998-01-20 03:52:49 +00:00
bde
4f0b417265 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
6ac182269f 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
eae19c3a54 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
b0bfaa3eb2 Fixed bitrot in the prototype for logwtmp(). 1998-01-16 16:53:30 +00:00
bde
ff6b6a564b 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
6e4ebaa163 Fixed wrong prototype for history().
Don't (mis)use .Fd outside of the synopsis.
1998-01-16 14:33:47 +00:00
bde
368be21f4e Fixed missing #include in synopsis. 1998-01-16 13:41:28 +00:00
bde
fe076082af Fixed wrong prototype for clock_getres(). 1998-01-16 13:39:49 +00:00
bde
5fe4e36282 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
7c0f3e1c0b Fixed missing return type in a prototype. 1998-01-16 13:10:18 +00:00
bde
a38cdc5bd4 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
72fdc3c6eb Added prototypes for functions that were documented in libalias.3
but not prototyped here.
1998-01-16 12:56:07 +00:00
jkh
629cdf3415 Non-intrusive changes to support Justin's CAM stuff. 1998-01-16 12:50:36 +00:00
danny
3ea659a0cb PR: 5489
Submitted by:	Steve G. Kargl <kargl@troutmask.apl.washington.edu>
Repair corrupted text.
1998-01-15 23:28:18 +00:00
mckay
46ca486c3c 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
e400ec32db 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
56b67d203d 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
bde8299706 Include string.h for memcpy function prototype. 1998-01-14 08:14:56 +00:00
brian
07d18a334d Remove __libalias_version. Ppp no longer uses it. 1998-01-14 01:24:49 +00:00
alex
3eb57c0db4 Consistently reference init as .Xr init 8.
Obtained from:	OpenBSD
1998-01-13 05:09:16 +00:00
alex
180ee2b9ee Return type and argument to sleep are unsigned int. 1998-01-13 04:32:00 +00:00
jb
13fe177ca3 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
d53da9d8fe 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
99545301cb Use .Fn for sysconf(_SC_CLOCK_TCK) reference.
Added $Id$.
1998-01-13 01:21:19 +00:00
eivind
9d57fd98be ${TARGET} -> ${.TARGET}
Tiny pointed hat goes to:	Our Makefile-meister.
1998-01-12 18:29:02 +00:00
alex
57754dd13c Formatting fix & improved comment for struct timeval.
Obtained from:	OpenBSD
1998-01-11 22:28:56 +00:00
alex
fbef792c46 Fixed brk(2) xref.
Obtained from:	OpenBSD
1998-01-11 22:22:50 +00:00
alex
9817ffb802 Added sys/types.h to synopsis as per POSIX.
Obtained from:	OpenBSD
1998-01-11 22:16:11 +00:00
alex
92ed9ca312 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
8488139b2f Document that arg max is controllable via sysctl. 1998-01-11 21:43:38 +00:00
eivind
9389702192 Remove use of <osreldate.h>.
Screwed up by: myself
1998-01-11 18:34:38 +00:00
alex
86a038bcfc Formatting fix.
Obtained from:	OpenBSD
1998-01-11 17:49:51 +00:00
alex
c273a35b46 Added EMFILE and ENFILE to errors section.
Obtained from:	OpenBSD
1998-01-11 17:07:20 +00:00
alex
031c0d7914 .Xr sigvec --> sigaction
Obtained from:	OpenBSD
1998-01-11 16:56:01 +00:00
alex
4f17cd3e01 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
0506343883 This commit was manufactured by cvs2svn to create branch 'jb'. 1998-01-11 03:30:40 +00:00
jb
003a004c39 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
7c6e96080c This commit was manufactured by cvs2svn to create branch 'JB'. 1998-01-10 23:00:07 +00:00
jb
2275a9f910 We can now build libm on Alpha. There is very little MD alpha code. 1998-01-10 22:51:51 +00:00
jb
352812fcf2 This is the only alpha math source that NetBSD has. 1998-01-10 22:17:24 +00:00
steve
b2c4a494f5 Put back __libalias_version so ppp(8) build again. 1998-01-10 19:37:19 +00:00
alex
f4a6b5e087 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
310652e8b0 include <net/if.h> and restore this to sanity. 1998-01-10 15:04:06 +00:00
jb
2bb704b6f7 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
af0d6b074f Allow this to compile with NetBSD tools. 1998-01-09 23:51:04 +00:00
eivind
781f5bff10 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
7573e69242 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
2e1938f076 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
00b1a5e278 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
c15aab9144 handle long usernames more carefully
Reviewed by:	guido
Obtained from:	OpenBSD (Theo de Raadt)
1998-01-07 00:28:36 +00:00
charnier
00c06ed364 Convert to mdoc format. 1998-01-05 07:12:16 +00:00
ache
ee72d26c0d size_t -> unsigned
in arguments length INT_MAX overflow check
Suggested-by: bde
1998-01-04 22:28:47 +00:00
alex
410918fc30 Expanded cross references. 1998-01-02 19:22:52 +00:00
ache
776489e757 Remove unneeded code left from testing 1998-01-02 05:05:20 +00:00
ache
533db3b201 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
8a719f4f6a 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
1ecfa643a9 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
eac766f136 Drop the use of caddr_t in conjunction with mmap(2). 1997-12-31 03:15:06 +00:00
alex
fb5c76c176 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
a4d6911294 Fixed formatting of the MADV_FREE flag description.
Pointed out by:	bde
1997-12-30 05:17:33 +00:00
alex
ad5fb0b1ed Typo fix. 1997-12-30 04:05:47 +00:00
alex
1b7cba5f35 Document MS_SYNC. 1997-12-30 03:26:15 +00:00
steve
e40600458f 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
2608f479cc The terminating character in strings is NUL', not NULL'. 1997-12-28 12:06:29 +00:00
hoek
189dfbf9f0 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
370393763b 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
32ddc95d90 Removed unnecessary initialization of hp in gethostbyaddr_r. 1997-12-25 04:21:08 +00:00
ache
5d5e8db790 Add overflow checks: if output size becomes bigger than INT_MAX,
just return EOF
1997-12-25 00:32:17 +00:00
ache
e4ef30b29d Correct type of stored argument place (from previous fix) 1997-12-24 23:54:19 +00:00
ache
33cd251a1b 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
d6bcc605a0 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
7bbce1048f 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
1756dc5a15 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
b8a0fd9139 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
5d2bb2184a 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
46f0000bfe 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
c8b0e5ec7b 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
9b8ba91c4f 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
5aae0154c8 Comment that long double is poorly implemented, not that it is unimplemented. 1997-12-19 21:59:22 +00:00
bde
923afd2c18 Put the .PATH statement first as in all other libc Makefile.inc's. 1997-12-19 21:56:38 +00:00
bde
ffda342eac Format the MLINKS statement the same as in most other libc Makefile.inc's. 1997-12-19 21:53:35 +00:00
jb
da6ab2349a 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
b1f57417ba 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
0a7ec97b1d 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
50af0662d9 Add libcalendar. 1997-12-04 10:48:14 +00:00
helbig
2cfa91023d 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
b0d805ea88 "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
3d7b8e55f4 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
0f5c6ba2fe 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
702819e8e5 Upgrade minor version 1997-11-27 20:52:28 +00:00
alex
2d792e656e 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
674aa81547 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
b0aecb1c1e 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
77a5ba68eb Fixed spelling of EACCES. 1997-11-23 17:58:55 +00:00
bde
4037ac32c7 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
13d351d261 const correctness for dl*() 1997-11-22 03:34:46 +00:00
jraynard
3056e64ca3 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
ea4fadd311 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
9eee7eb270 stat() the correct file in execvp() so that the fine tuned errno handling
actually works.
1997-11-20 15:09:38 +00:00
jdp
a3a1ff9596 Fix erroneous format string. 1997-11-18 05:34:45 +00:00
jdp
77cf78afb6 Add cross-references to rfork(2). 1997-11-18 03:59:30 +00:00
wpaul
5a4ed48dff Close PR #4867: improve _listmatch() to avoid returning false positives.
PR: 4867
1997-11-16 03:02:39 +00:00
julian
c931d11d3f 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
ae22df605c 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
df791f575c Describe MNT_NOCLUSTER{R,W} flags.
Pointed out by:		bde
1997-11-09 03:36:26 +00:00
jmg
a0b51901be 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
0bd7d5d69a 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
cd48210a67 Make the login_getclassbyname prototype match reality.
PR:		4838
1997-11-05 04:03:05 +00:00
joerg
f3a46b4ff5 Typo.
Submitted by:	peter@rhiannon.clari.net.au (Peter Hawkins)
1997-10-28 07:46:27 +00:00
charnier
54e2b69a0f Statisize usage(). 1997-10-27 07:53:22 +00:00
wpaul
82b1cd0f1b 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
1433c9c29e Typo. 1997-10-26 10:37:35 +00:00
jdp
1d2927c9fa 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
c6dc890586 Fix a few typos. 1997-10-22 23:12:27 +00:00
ache
2e52ab6886 Back out part of OpenGroup specs about limiting max arg since it may break
compatibility.
1997-10-22 12:04:49 +00:00
ache
3cb44cbe93 Reflect usleep code changes:
Limit max arg
Change return type to int
1997-10-22 11:27:20 +00:00
ache
6591ace30d 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
1eff2f520c Document EINVAL as a possible return value from open(2). 1997-10-22 07:29:13 +00:00
bde
ea35ce8d73 Sorted lists. 1997-10-21 08:41:15 +00:00
ache
8e1cafde9c Remove terminfo manpage we don't have it 1997-10-20 17:53:55 +00:00
bde
ff0db5fdac 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
988fe95f98 Add $Id 1997-10-17 09:40:08 +00:00
ache
47a375370a 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
7484bbe28e 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
c726b4d4aa 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
d1bc3e7989 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
8306d4d37d Removed bogus .PATH statement. 1997-10-16 14:41:25 +00:00
bde
995cfe36a0 Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
1997-10-16 14:26:13 +00:00
bde
fd943454de Handle machine-dependent (m-d) (string) sources more automatically.
The names of m-d variants are now added (manually) to MDSRCS instead
of to SRCS, and the names of all machine-independent (m-i) variants
that can reasonably be replaced by an m-d variant are now added
(manually) to MISRCS instead of to SRCS, so that a simple substitution
can be used to discard the unused m-i variants.  MISRCS is potentially
all m-i sources, but the substitution is too simple to be fast, so
MISRCS should be kept reasonably small.

libc/Makefile.inc:
Do the substitution.

libc/i386/string/Makefile.inc:
Add to MDSRCS instead of to SRCS.  Add the names of all sources in this
directory, but no others.

libc/string/Makefile.inc
Add to MISRCS instead of to SRCS.  Add the names of all sources in this
directory.  Don't use (broken) explicit rules for special cases.
1997-10-16 13:46:50 +00:00
ache
892dc3af7f Reflect current sleep/usleep implementations state 1997-10-16 13:42:03 +00:00
ache
ac9461d96b Cleanup #includes 1997-10-16 13:35:25 +00:00
sos
efcfb5d9cd Fix a couble of typos.
Submitted by: "Vanill I. Shu" <vanilla@MinJe.com.TW>
1997-10-16 09:12:31 +00:00
max
eb3abddc56 Proper spacing in the Synopsis. 1997-10-16 01:19:15 +00:00
bde
2a42de02f4 Include the machine-dependent Makefile.inc for sys in the correct place. 1997-10-15 16:29:14 +00:00
bde
ef5c98dd45 Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
1997-10-15 16:16:41 +00:00
bde
50f061ebcd Added some 2-line source files to get a direct correspondence
between sources and objects.  This will be used to avoid messy
special cases in Makefile.inc.
1997-10-15 15:27:19 +00:00