Commit Graph

2878 Commits

Author SHA1 Message Date
dima
92d698a967 Cleanup. Make it compile on alpha. 1998-11-10 06:35:24 +00:00
jkoshy
7273a66285 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
des
32bb859dc0 fetch_err.h is a generated file, so don't look for it in ${.CURDIR}. 1998-11-07 08:59:38 +00:00
des
93ce759c73 Second of a series of cleanups to libfetch.
This commit introduces the following features:

 a) the fetchStat*() functions, which return meta-information for a
    document, such as size, modification time, etc.

 b) the use of the com_err(3) facilities to report errors.

It also fixes a bunch of style bugs and a few logic bugs and somewhat
improves the man page.

Changed files, in alphabetical order:

 Makefile:
  Don't generate macros in {ftp,http}err.c.

  Generate category fields for the error message lists.

  Compile the error table.

  Install fetch_err.h along with fetch.h.

 common.c:
  Remove the _netdb_errstring() macro, and add FETCH_ERR_NETDB to the
  error code in the _netdb_seterr() macro.

  Add categories to the _netdb_errlist table.

  Report errors through the Common Error library.

 common.h:
  Add the DEBUG macros.

  Add prototype for fetchConnect().

  Remove the prototype for _fetch_errstring(), which is local to common.c

  Add a categroy field to struct fetcherr, and define constants for
  error categories.

  Define macros for _{url,netdb,ftp,http}_seterr().

 errors.et: (new file)
  List error categories.

 fetch.3:
  Document the fetchStat*() functions.

  Move the "unimplemented functionality" comments from NOTES to BUGS.

  Document that applications which use libfetch must also use
  libcom_err, and list existing error codes.

  Undocument fetchLastErr{Code,String}.

  Remove the (empty) DIAGNOSTICS section.

  Mention Eugene Skepner in the AUTHORS section.

 fetch.c:
  Move the DEBUG macros to common.c

  Add fetchStat() and fetchStatURL().

  Generate error messages for URL parser errors, and fix a minor bug
  in the parser.

  Use 'struct url' instead of 'url_t'.

  Remove fetchLastErr{Code,String}.

 fetch.h:
  Use 'struct url' instead of 'url_t', and remove the typedef.

  Define struct url_stat (used by fetchStat()).

  Add prototypes for fetchStat*().

  Remove the declarations for fetchLastErr{Code,String}.

  Include fetch_err.h.

 fetch_err.et: (new file)
  Error table for libfetch.

 file.c:
  Add fetchStatFile().

  Use 'struct url' instead of 'url_t'.

 ftp.c:
  Add fetchStatFTP().

  Use 'struct url' instead of 'url_t'.

  Don't use fetchLastErrCode.

 ftp.errors:
  Add categories to all error messages.

 http.c:
  Add fetchStatHTTP().

  Use 'struct url' instead of 'url_t'.

  Don't use fetchLastErr{Code,Text}.

 http.errors:
  Add categories to all error messages.

Prompted by: jkh and Eugene Skepner
Numerous sugestions from: Garett Wollman and Eugene Skepner
1998-11-06 22:14:08 +00:00
dt
f2ceee9949 Don't call pthread_mutex_lock with _SPINLOCK held.
Made pthread_cond_wait() more similar to pthread_cond_timedwait().

PR:		8375
1998-11-06 21:04:02 +00:00
dg
d76c9ae77d Added info about non-blocking support. 1998-11-06 19:35:58 +00:00
jkoshy
27b8931a46 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
des
e958241739 First of a series of cleanups to libfetch. Changed files, in
alphabetical order:

 Makefile:
  Add common.c to SRCS.

  Make debugging easier by making 'CFLAGS += -DNDEBUG' conditional on DEBUG

  Don't declare struct {ftp,http}err in {ftp,http}err.c; use struct fetcherr
  instead.

 README:
  Remove the todo list, which is out of date anyway.

 common.c: (new file)
  Gather utility functions in this file.

  Merge the error reporting functions intp _fetch_errstring(),
  _fetch_seterr() and _fetch_syserr().

  Set fetchLastErrCode and fetchLastErrText appropriately when fetchConnect
  fails.

 common.h: (new file)
  Gather internal prototypes and structures in this files.

 fetch.3:
  Undocument fetchFreeURL().

  Document a few more known bugs.

  Document fetchLastErrCode and fetchLastErrText.

 fetch.c:
  Add descriptive comments to all functions that lacked them.

  Move fetchConnect() to common.c.

  Obviate the need for fetchFreeURL(), and remove it.

 fetch.h:
  Modify struct url_t so the document part is at the end.

 ftp.c:
  Remove code that is duplicated elsewhere.

 http.c:
  Remove code that is duplicated elsewhere.

Prompted by: jkh
1998-11-05 19:48:17 +00:00
dg
5f9efae0f8 Added a manual page for sendfile(2). 1998-11-05 14:43:29 +00:00
peter
e99e311d6b Remove stray .endif from previous commit (I hope this is right) 1998-11-04 12:49:31 +00:00
rnordier
6037124de3 Include mergesort() in description of errors. 1998-11-04 09:27:03 +00:00
rnordier
05e7da8d39 Drop unused labels. 1998-11-04 09:22:07 +00:00
rnordier
6ffb967233 Handle a zero elements argument.
PR:		8566
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-11-04 08:55:34 +00:00
msmith
e663a65541 Don't need this one anymore. 1998-11-04 07:40:05 +00:00
msmith
4674ed7cfb Well I never. Seems like _setjmp()/_longjmp() are just what the doctor
ordered.  This brings the Alpha back to parity, and should bring us
BootForth on both platforms.

Submitted by:	John Birrell (jb@freebsd.org)
1998-11-04 07:39:53 +00:00
msmith
dc1da60388 Improve the quality of isspace() to match expectations. This should make
the Ficl interpreter read its softwords array OK.
1998-11-04 07:04:00 +00:00
msmith
7294da4e68 Don't try to build (nonexistent) Alpha setjmp until we have one. 1998-11-04 00:32:08 +00:00
msmith
e29cc743ca Move setjmp/longjmp implementations here from libc; no signal handling
in libstand, only for i386 until I locate an alpha setjmp/longjmp.

Minimal 64-bit gcc integer support for i386.  This is kinda nasty, and
should be revisited once we decide whether the bootblocks need
quad arithmetic.
1998-11-04 00:23:18 +00:00
peter
c3fb5f8be1 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
msmith
f00eb1aa64 Add:
assert()
	setjmp()/longjmp()
	vsprintf()
1998-11-01 09:31:08 +00:00
msmith
e6108119c4 Add a new field to the devsw structure; dv_print, to print all valid units
etc. associated with the device entry.
Consider EOF an 'error' for fgetstr if we haven't read anything yet.

You *MUST* recompile and reinstall libstand before rebuilding the bootstrap.
1998-10-31 02:48:29 +00:00
jmz
02030ba04b Typo. 1998-10-30 23:50:48 +00:00
msmith
36c3e6804b Prevent buffer overflow in getpwnam()
PR:		bin/8176
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-10-29 23:16:24 +00:00
rnordier
4046cc96fe Clarify processing of the string argument by psignal(). 1998-10-29 22:17:46 +00:00
rnordier
6e547702d7 (Whoops: make it better instead of worse this time). Clarify
processing of the string argument by perror().
1998-10-29 22:08:59 +00:00
rnordier
d023e194f9 Clarify processing of the string argument by perror(). 1998-10-29 21:59:38 +00:00
rnordier
0f216504b5 Check for a zero-length as well as a NULL string argument. 1998-10-29 14:40:20 +00:00
rnordier
042df0ac22 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
jdp
d68c1863e9 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
msmith
877e8e9a78 Fixes for handling 'wfd' (and any other disk with a non-2-character name)
Submitted by:	Some from Satoh Junichi (junichi@astec.co.jp)
1998-10-27 21:14:03 +00:00
fenner
edf1f9d541 ('): and ('); -> (:') and (;') 1998-10-26 19:36:38 +00:00
obrien
1764c60776 Bogon I somehow inserted between compiling and commiting... 1998-10-26 13:33:39 +00:00
obrien
9c58f68181 Quiet many compiler warnings. Still fails -Wconversion in one case.
Required because:	-Werror is in Makefile
1998-10-26 11:54:36 +00:00
obrien
d34edc7ba7 Slight style police.
Add some content from objformat(1).
1998-10-25 13:29:57 +00:00
ache
2417749d83 fix unsigned overflow
PR: 8437
1998-10-25 05:06:42 +00:00
dima
98c5904a24 Fix types. 1998-10-21 09:48:35 +00:00
peter
d237d22534 Revert last change. mkstemp() wasn't to blame, it's nvi. However,
mkstemp() is not behaving as documented.
1998-10-20 15:33:21 +00:00
peter
6bb510cabe Stop mk*temp() from being pathologically stupid in the face of a umask(0);
There are other ways to fix this than wrapping _gettemp(), but this was
the most convenient.

Discovered by: bde
1998-10-20 12:36:36 +00:00
des
1c3787c6df Since vfork() was changed to fork(), we have to pass errno back from the
child to the parent somehow.

PR:		8353
Submitted by:	Andrew J. Korty <ajk@purdue.edu>
1998-10-20 11:34:11 +00:00
dfr
17c3d6ec94 Implement a hook to allow us to reclaim the memory used by the first stage
of the bootstrap (the bit which loads /boot/loader).
1998-10-19 09:08:40 +00:00
obrien
763d39061e To clarify last commit, msmith says:
The reason the Alpha has less room than the i386 is because the bootstrap
is given a 256K mapping by the firmware; to add more requires extra work.
1998-10-17 22:20:06 +00:00
msmith
2fb2fc3d2a Reduce the sbrk() increment from 64K to 4K. There's not much room on the
Alpha, and wasting potentially 64K-4 bytes of RAM just isn't an option.
1998-10-16 19:23:37 +00:00
des
3705233db0 Fix style issues in execl(), and make execle() vfork()-safe.
Reviewed by:	bde
Approved by:	jkh
1998-10-15 17:14:15 +00:00
msmith
59741c0a16 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
ken
68b03ab551 Fix a couple of potential buffer overrun cases.
Submitted by:	imp
1998-10-14 23:28:26 +00:00
des
ff71bd049b Correct braino in previous commit. I get the pointy hat again. 1998-10-14 20:23:40 +00:00
des
e907ba88d0 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
jkh
58669a215c correct prototype. 1998-10-14 11:04:36 +00:00
ken
995f109820 Add man pages for many of the functions in the CAM library. This covers
most of the open/close routines, and the buffer/cdb parsing routines
derived from the old scsi(3) library.

The cam_cdbparse(3) man page borrows from the old scsi(3) man page, so the
copyright and history section reflect that.

The many scsi_* functions and other functions that are pulled in from the
kernel aren't documented yet, but will be eventually.
1998-10-14 06:20:36 +00:00
bde
76eb0b95fa Updated library order and comments about it. This fixes libm not
being built before libf2c and libmd not being built before libatm.
1998-10-13 16:48:43 +00:00
des
3ca80efd3a Calls one or more of malloc(), warn(), err(), syslog(), execlp() or
execvp() in the child branch of a vfork(). Changed to use fork()
instead.

Some of these (mv, find, apply, xargs) might benefit greatly from
being rewritten to use vfork() properly.

PR:		Loosely related to bin/8252
Approved by:	jkh and bde
1998-10-13 14:52:33 +00:00
ken
9cc9919f68 Add a "dummy light" (actually two dummy lights) to catch people who don't
have the passthrough device configured in their kernel.

This will hopefully reduce the number of people complaining that they can't
get {camcontrol, xmcd, tosha, cdrecord, etc.} to work.

Reviewed by:	gibbs
1998-10-12 21:54:13 +00:00
des
8eaab1764c Avoid the "Cannot allocate memory" problem that appears on heavily
loaded systems by retrying the sysctl() with a larger buffer if it
fails with ENOMEM. For good measure, allocate 10% more memory than
sysctl() claims is necessary.

PR:		8275
Reviewed by:	David Greenman <dg@freebsd.org>
1998-10-12 20:36:33 +00:00
ken
02334afb12 Fix a curses bug exposed by the ":numbers" display of systat -iostat.
This bug showed up when you had more than 3 devices displayed.  (thus
requiring a second line of display)

Here's a quote From the PR:

 When wrefresh() is called with a subwindow as argument, __set_subwin
 might be called with reversed arguments if wrefresh() decides to calls
 quickch().  This may cause use of negative array indexes, with a
 resulting segfault.

 Since quickch() manipulates the line structures belonging to curscr,
 it looks like all subwindows of curscr should be updated.

PR:		bin/8086
Submitted by:	Tor Egge <Tor.Egge@fast.no>
1998-10-12 16:32:32 +00:00
jdp
f4438d5eb7 Eliminate nested comment warning.
Submitted by:	lh@aus.org
1998-10-11 17:14:56 +00:00
bde
59cb69f1ae Fixed removing of obsolete shared libraries:
- the directory was wrong if ${SHLIBDIR} != ${LIBDIR}.  It's still wrong
  if the installation of the obsolete library was done before /aout was
  appended to LIBDIR.
- the version would have become wrong when the default in ../Makefile.inc
  is changed from 2.0.
- the comment mostly described moving of libraries to /usr/lib/compat, but
  we don't do that.
1998-10-11 16:33:02 +00:00
peter
67c56d84aa Avoid the need for calling functions that malloc after a vfork(). 1998-10-11 14:11:51 +00:00
peter
0f5907340a libopie also depends on libmd. Programs using libopie shouldn't have to
know about libopie's internals in order to use it.
1998-10-11 04:45:50 +00:00
peter
586c52184a libf2c.so.* depends on libm.so. I'm not sure that this matters in this
case because I expect the f2c front-end should add the -lm automatically.
1998-10-11 04:44:12 +00:00
peter
e232101102 libatm uses libmd; add it to the dependency list so that programs using
libatm are not forced to know the internals of it's implementation.
1998-10-11 04:41:43 +00:00
peter
aa6e892d93 Deal with /usr/lib/compat/aout, and that we've been installing things
in the wrong places for a while.
Also, the the libtermlib.so -> libtermcap.so manually for elf, otherwise
the hard link follows the symlink and the result looks rather wierd.  The
*.a files are still hard linked under elf as before.
1998-10-11 04:39:56 +00:00
peter
62cc2c59c0 Don't build elf libresolv.so*, no elf freebsd binaries have used it ever.
Also, the a.out compat version is supposed to go into /usr/lib/compat/aout.
Try and clean up the mess left behind in /usr/lib/compat.
1998-10-11 04:21:56 +00:00
peter
ccf40b66e0 Don't install an elf libgnumalloc.so* in /usr/lib/compat.. No elf binaries
have been linked against it.  Try and clean up the leftovers.  Also, put
the a.out libs in /usr/lib/compat/aout since that's where the default
a.out ldconfig compat path points to.
1998-10-11 04:18:30 +00:00
peter
3e2812fcb9 Don't install an elf liby.so[.2] in /usr/lib/compat. We have never had
any elf binaries linked against it.  Try and clean up the mess left over..
1998-10-11 04:10:14 +00:00
bde
2b75a45bd4 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
eivind
aa17e00bc2 Remove the description of EBADF (that's an implementation detail if I
ever saw one), and move the description of NULL behaviour out to a
'NOTES' section, with an extra note that programs should not rely up
on it.

Kinda-approve-by:	bde (by not replying to the mail with the diff)
1998-10-10 13:31:32 +00:00
dt
a3544f2edb Fix some bugs in pthread scheduler:
make pthread_yield() more reliable,
  threads always (I hope) preempted at least every 0.1 sec, as intended.

PR:		bin/7744
Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1998-10-09 19:01:30 +00:00
jkh
aac7427316 Now take stdio.h out of files that don't require it. 1998-10-09 11:24:20 +00:00
jkh
5845650b4f Update docs to match interface change. 1998-10-09 07:33:58 +00:00
jkh
5f9952e765 o move path in libutil.h to paths.h
o make property_read() take a fd instead to avoid stdio.h mess
o update auth to new interface.
1998-10-09 07:32:38 +00:00
jkh
3388a213ad Take the path spec back out. 1998-10-09 07:28:14 +00:00
jkh
afb7d7e829 All these have to include stdio.h now. 1998-10-09 00:39:09 +00:00
jkh
acfb98ece6 remove stdio.h include; I forgot Bruce's cardinal rule that header files
shouldn't include other ones (which, unfortunately, is also a hellish
rule since he broke interfaces like sysctl this way by requiring undocumented
header files to be included just in order to be able to use them now - SIGH!).
1998-10-08 23:10:41 +00:00
jkh
7f5d64043f Add some rudimentary documentation for my new functions. 1998-10-08 06:53:32 +00:00
jkh
9d3a21e27c Correct a build error that got past my build test somehow. 1998-10-08 01:56:49 +00:00
jkh
9734dc69e1 Add a simple mechanism for reading property lists from files (which
I'll convert sysinstall to use shortly) and a simple call which uses
this mechanism to implement an /etc/auth.conf file.  I'll let Mark Murray
handle the format and checkin of the sample auth.conf file.
Reviewed by:	markm
1998-10-07 17:32:49 +00:00
msmith
56cd124a88 Add strcasecmp source file required for dosfs operation. 1998-10-07 13:50:17 +00:00
julian
7ae0631529 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
msmith
28bef97c3e Enable the DOS filesystem. This allows reading from various DOS filesystems
(FAT12/16/32, VFAT).

Make a private copy of strcasecmp, as the "real" one uses the system ctype
header, which introduces locale poisoning.
1998-10-06 19:23:57 +00:00
dfr
b0393b65d5 Teach libdisk about alpha boot blocks. 1998-10-06 11:57:08 +00:00
dfr
46dbddcd3c 64bit portability fixes.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-10-05 18:35:04 +00:00
msmith
411f2725f9 Don't build with -g. 1998-10-04 08:10:29 +00:00
eivind
054b0e3c44 program written under FreeBSD -> programs written under FreeBSD
Noticed by:	Alex Nash <nash@mcs.net>
1998-10-03 16:17:30 +00:00
msmith
c0b467b849 Prune unused zalloc components as recommended by Matt Dillon. Extra debugging
code is still enabled (it's not very expensive).
1998-10-01 17:35:08 +00:00
jkh
d6f6d292c4 Add libdisk back to alpha build. 1998-10-01 14:49:57 +00:00
jkh
e2bde560d5 Eliminate unaligned access on Alpha and also neaten up this code a little.
Submitted by:	dfr
1998-09-30 21:40:51 +00:00
dt
19436f61f4 Debug when an environment variable set, no when it is unset. 1998-09-30 19:17:51 +00:00
jb
7580604d8d Revise test code for sigwait and add test code for sigsuspend.
Submitted by: Daniel M. Eischen <eischen@vigrid.com>
1998-09-30 07:14:02 +00:00
jb
067ba0c21e Revise test code for sigwait and add test code for sigsuspend.
Submitted by: Daniel M. Eischen <eischen@vigrid.com>
1998-09-30 07:08:09 +00:00
jb
8164517444 Fix a comment. 1998-09-30 06:42:29 +00:00
jb
6478b523aa Cosmetic cleansing. This code requires extra work to keep the garbage
collector thread running after a fork.
1998-09-30 06:41:16 +00:00
jb
df42f1ac5f Move the cleanup code that frees memory allocated for a dead thread from
the thread kernel into a garbage collector thread which is started when
the fisrt thread is created (other than the initial thread). This
removes the window of opportunity where a context switch will cause a
thread that has locked the malloc spinlock, to enter the thread kernel,
find there is a dead thread and try to free memory, therefore trying
to lock the malloc spinlock against itself.

The garbage collector thread acts just like any other thread, so
instead of having a spinlock to control accesses to the dead thread
list, it uses a mutex and a condition variable so that it can happily
wait to be signalled when a thread exists.
1998-09-30 06:36:56 +00:00
jb
d76ace8cb5 Use snprintf instead of sprintf to avoid long source file paths from
launching an application into space when someone tries to debug it.

The dead thread list now has it's own link pointer, so use that when
reporting the grateful dead.
1998-09-30 06:29:54 +00:00
jb
55e005ea96 Implementation of an additional state called SIGWAIT (with the previous
one renamed to SIGSUSPEND) to fix sigwait().

Submitted by: Daniel M. Eischen <eischen@vigrid.com>
1998-09-30 06:27:31 +00:00
jb
1326d7916e NULL a pointer after it is freed to avoid trying to free it again. 1998-09-30 06:24:57 +00:00
jb
91d2ee9831 - Fix the debug macros.
-  Add support of a thread being listed in the dead thread list as well
   as the thread list.
-  Add a new thread state to make sigwait work properly. (Submitted by
   Daniel M. Eischen <eischen@vigrid.com>)
-  Add global variable for the garbage collector mutex and condition
   variable.
-  Delete a couple of prototypes that are no longer required.
-  Add a prototype for the garbage collector thread.
1998-09-30 06:22:07 +00:00
jb
8d80497304 Delete the XXX comments that refer to spinlock recursion. The malloc/free/
realloc functions check for recursion within the malloc code itself. In
a thread-safe library, the single spinlock ensures that no two threads
go inside the protected code at the same time. The thread implementation
is responsible for ensuring that the spinlock does in fact protect malloc.
There was a window of opportunity in which this was not the case. I'll fix
that with a commit RSN.
1998-09-30 06:13:59 +00:00
jkoshy
182220b34b `kern.maxproc' is not changeable from sysctl(8).
Reminded by:	Bruce Evans <bde@zeta.org.au>
1998-09-29 05:16:45 +00:00
jkh
22e2b9966d Allow minigzip to be invoked more like gzip, checking to see
if we're being called as gunzip as well as dealing with the -c
flag.
Submitted by:	jhay
1998-09-29 04:56:30 +00:00
eivind
d1204d260f Document that we will core-dump on getting a NULL pointer. 1998-09-28 15:34:24 +00:00
des
ef532c67ad Bring the man page more or less up to date with the code. 1998-09-26 20:42:44 +00:00
dfr
dc06707d8f Don't cast int pointers to long pointers when reading labels from
/etc/disktab.
1998-09-26 14:44:06 +00:00
jkh
ba07917191 /usr/lib/compat -> /usr/lib/compat/aout
This change will need to be reviewed just as soon as we start generating
ELF compat libs, but for now it does the right thing for a.out libs.
1998-09-26 11:54:02 +00:00
dfr
236ad5eb3c * Enable old UFS compatibility code for booting from Digital Unix formatted
disks.
* Fix a whole raft of warnings, printf and otherwise.
* Make zalloc work for alpha (just a case of using the right typedef).
* Add some (disabled) malloc debug printing to stand.h.
1998-09-26 10:48:50 +00:00
dillon
7897bd89f8 Fixed setting of mp_End in zextendPool(). A case was missing and mp_Size
no longer reflects the mp_End - mp_Base equivalent.
1998-09-26 03:24:14 +00:00
msmith
ea783268e7 Replace the old and extremely icky Mach/NetBSD allocator with a similarly
compact and much better one donated by Matt Dillon.  Implement a simple
sbrk() which uses the existing setheap() api.

Remove the custom allocator from the UFS code.  It wasn't working quite
right, and it shouldn't be needed with the new allocator.

Fix a serious problem with changing the value of already-existent
environment variables.  Don't attempt to modify the supposedly-const
argument to putenv()

Fix an off-by-one sizing error in the zipfs code detected by the new
allocator.

Submitted by:	zmalloc from Matt Dillon <dillon@backplane.com>
1998-09-26 01:42:40 +00:00
obrien
a0e1ce1284 Apply patch to properly sscanf(3) when there is whitespace in the format
string.  From the submitted patch:

Credit for patch:	Chris Torek <torek@bsdi.com>
			Tod Miller  <millert@openbsd.org>

This makes us in line with SunOS 4.1.3_U1, Solaris 2.6, OpenBSD 2.3,
HP-UX 10.20, Irix 5.3.  The previous behavior was in line with Ultrix 4.4.

PR:		bin/7970
Submitted by:	Niall Smart nialls@euristix.ie
1998-09-25 12:20:27 +00:00
dfr
7c71d4162d Use unsigned chars instead of signed chars when extracting bits of the
inet address.
1998-09-23 21:35:40 +00:00
dfr
7fdf235da0 Use 8k pagesize on alpha, not 4k. 1998-09-23 21:26:04 +00:00
jkh
17155df940 Include "stand.h", not <stand.h>. 1998-09-21 06:07:34 +00:00
dfr
48b3e54701 Allocate disk buffers using a custom allocator. The standard allocator fragments
extremely badly if disk buffers are freed back into the main heap and the alpha
bootstrap has a restricted address space which just ran out :-(.
1998-09-20 21:42:20 +00:00
dfr
0c4d54326b Use a simple version of inet_ntoa(). The libc one uses inet_ntop which is too
complicated.
1998-09-20 21:40:28 +00:00
alex
6afe7a9f53 Back out part of previous commit (even though it's technically correct).
Our spinlock implementation allows a particular thread to obtain a lock
multiple times, but release the lock with a single unlock call.  Since
we're detecting recursion, we know the lock is already owned by the
current thread in a previous call and must not be released in the
current call.  This is really far too dependent on this particular
spinlock implementation, so I've added commented out calls to
THREAD_UNLOCK in the appropriate places.  We can activate this code when
spinlock is taught to count each lock operation.
1998-09-20 01:07:50 +00:00
ken
7c2e7bb880 Change the devstat generation number from an int to a long. The int-sized
generation was causing unaligned access faults on the Alpha.

I have incremented the devstat version number, since this is an interface
change.  You'll need to recompile libdevstat, systat, iostat, vmstat and
rpc.rstatd along with your kernel.

Partially Submitted by:	Andrew Gallatin <gallatin@cs.duke.edu>
1998-09-20 00:11:23 +00:00
alex
2945cc62f8 Correctly back out of free if a recursive call into malloc.c is detected.
Set malloc_func *after* grabbing the thread lock.

Noticed by:	Simon Coggins <simon@oz.org>
1998-09-19 20:55:36 +00:00
msmith
efee224c31 Nuke prototype for strerror, consumers get it from <string.h>
Fix overlooked nullopen() implementation.
1998-09-18 23:00:57 +00:00
msmith
3b7700ffef Path arguments to *_open functions should be const, but we were mangling
them.

Submitted by:	write-protected text segment in BTX
1998-09-18 22:58:01 +00:00
ken
e00d4f6e8d Remove scsi_da.c from the list of things compiled into the CAM library.
The functions that were being compiled into the library have been moved to
scsi_all.c.

One warning:  Any programs using scsi_start_stop() or scsi_read_write()
              that included scsi_da.h but not scsi_all.h will need to be
              changed to include scsi_all.h.  This doesn't affect
              camcontrol, and I don't think it affects any ports, but you
              never know.

PR:		kern/7969
Reviewed by:	gibbs
1998-09-18 22:29:35 +00:00
luoqi
c43759f857 Simplify implementation and eliminate a register preservation problem.
Reviewed by:	Bruce Evans <bde@zeta.org.au>
1998-09-18 05:50:52 +00:00
ken
736ef9bc85 Fix some error message format problems in checkversion() and getversion().
Reported By: bde
1998-09-18 02:35:25 +00:00
phk
35ddf969aa s/yellow pages/NIS/
PR:		7949
Reviewed by:	phk
Submitted by:	Norihiro Kumagai <kuma@jp.freebsd.org>
1998-09-17 08:29:16 +00:00
gibbs
2f89383ae4 libscsi is obsoleted by CAM. 1998-09-17 03:56:23 +00:00
ken
9482e27dc3 Fix some Alpha portability problems, and add some belt-and-suspenders
checking in some functions.

Submitted by:	dfr
Modified by:	ken
1998-09-16 20:42:19 +00:00
dfr
7a96388db1 Adjust the declarations of kvm_read and kvm_write to match reality a little
closer.
1998-09-16 09:30:14 +00:00
dfr
435b9d97a5 Change to a code sequence which is more likely to work on SMP systems.
Now all I need is an alpha SMP box to port FreeBSD to :-)
1998-09-16 09:27:05 +00:00
jkoshy
f90418a9e2 Sort table and descriptions.
Pointed out by: bde
1998-09-16 07:25:34 +00:00
imp
bfe73fd683 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
imp
5c7c8dfbe2 o Don't reference non-existant function freealloc.
o Properly order things

Pointed out by: bde
1998-09-16 04:07:31 +00:00
imp
f706ca01b7 Fix style problems noted by Bruce:
o No copyright on reallocf.
	o Order makefile list correctly.
	o indent reallocf properly.
1998-09-16 03:16:06 +00:00
fenner
a27e663b5d Bump minor version number and add version.c to update to version 0.4
PR:		bin/7877
1998-09-15 19:34:01 +00:00
dt
79f8b8ffc1 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
phk
cfbddb7f46 (this is an extract from src/share/examples/atm/README)
===================================
                HARP  |  Host ATM Research Platform
                ===================================

                              HARP 3

What is this stuff?
-------------------
The Advanced Networking Group (ANG) at the Minnesota Supercomputer Center,
Inc. (MSCI), as part of its work on the MAGIC Gigabit Testbed, developed
the Host ATM Research Platform (HARP) software, which allows IP hosts to
communicate over ATM networks using standard protocols.  It is intended to
be a high-quality platform for IP/ATM research.

HARP provides a way for IP hosts to connect to ATM networks.  It supports
standard methods of communication using IP over ATM.  A host's standard IP
software sends and receives datagrams via a HARP ATM interface.  HARP provides
functionality similar to (and typically replaces) vendor-provided ATM device
driver software.

HARP includes full source code, making it possible for researchers to
experiment with different approaches to running IP over ATM.  HARP is
self-contained; it requires no other licenses or commercial software packages.

HARP implements support for the IETF Classical IP model for using IP over ATM
networks, including:

   o IETF ATMARP address resolution client
   o IETF ATMARP address resolution server
   o IETF SCSP/ATMARP server
   o UNI 3.1 and 3.0 signalling protocols
   o Fore Systems's SPANS signalling protocol

What's supported
----------------
The following are supported by HARP 3:

   o ATM Host Interfaces
        - FORE Systems, Inc. SBA-200 and SBA-200E ATM SBus Adapters
        - FORE Systems, Inc. PCA-200E ATM PCI Adapters
        - Efficient Networks, Inc. ENI-155p ATM PCI Adapters

   o ATM Signalling Protocols
        - The ATM Forum UNI 3.1 signalling protocol
        - The ATM Forum UNI 3.0 signalling protocol
        - The ATM Forum ILMI address registration
        - FORE Systems's proprietary SPANS signalling protocol
        - Permanent Virtual Channels (PVCs)

   o IETF "Classical IP and ARP over ATM" model
        - RFC 1483, "Multiprotocol Encapsulation over ATM Adaptation Layer 5"
        - RFC 1577, "Classical IP and ARP over ATM"
        - RFC 1626, "Default IP MTU for use over ATM AAL5"
        - RFC 1755, "ATM Signaling Support for IP over ATM"
        - RFC 2225, "Classical IP and ARP over ATM"
        - RFC 2334, "Server Cache Synchronization Protocol (SCSP)"
        - Internet Draft draft-ietf-ion-scsp-atmarp-00.txt,
                "A Distributed ATMARP Service Using SCSP"

   o ATM Sockets interface
        - The file atm-sockets.txt contains further information

What's not supported
--------------------
The following major features of the above list are not currently supported:

        o UNI point-to-multipoint support
        o Driver support for Traffic Control/Quality of Service
        o SPANS multicast and MPP support
        o SPANS signalling using Efficient adapters

This software was developed under the sponsorship of the Defense Advanced
Research Projects Agency (DARPA).

Reviewed (lightly) by:	phk
Submitted by:	Network Computing Services, Inc.
1998-09-15 11:44:44 +00:00
jkoshy
ed7cc86037 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
gibbs
12e1349910 Remove references to the "od" device. 1998-09-15 10:23:17 +00:00
gibbs
945f396d8c Hook up libcam and libdevstat. 1998-09-15 10:22:54 +00:00
phk
c3dd1fa899 Add new files for HARP3
Host ATM Research Platform (HARP), Network Computing Services, Inc.
This software was developed with the support of the Defense Advanced
Research Projects Agency (DARPA).
1998-09-15 08:23:17 +00:00
gibbs
bbc0682d67 Device statistics library. Used by iostat, vmstat, and systat to
format and analyze the output of the new device statistics sysctls.

Submitted by:	"Kenneth D. Merry" <ken@FreeBSD.org>
1998-09-15 06:23:21 +00:00
gibbs
ade38c7f13 I hate late night commits. These should be nuked from the atticy by
the CVS meister.
1998-09-15 06:20:29 +00:00
gibbs
5987d73d1d CAM userland utility library, a replacement for libscsi.
Submitted by: "Kenneth D. Merry" <ken@FreeBSD.org>
1998-09-15 06:16:46 +00:00
msmith
565c7a3929 Remove (wrong) OBJFORMAT setting. 1998-09-15 02:30:22 +00:00
wollman
ebefaafe4e Replace accidentally-deleted `x' which caused warnx() to misbehave. 1998-09-15 01:49:32 +00:00
jkoshy
d16cb02d1d Correct a typo that I noticed. 1998-09-15 00:24:19 +00:00
imp
ae94780f2c o use strncpy safely
o Only allow options and domain name to be set when we aren't running
  setuid.

Obtained from: OpenBSD
1998-09-14 21:13:06 +00:00
imp
d54a12dd1f Add reallocf to the library. This function is simliar to realloc, but
when it returns NULL to indicate failure, it will also free the memory
that was passed to it, if that was non-null.

This does not change the semantics of realloc.

A second commit will be done to commit the conversion of those places in
the code that can safely use this to avoid memory leaks when confronted
with low memory situations.

Beaten-to-death-but-finally-approved-in: -current
1998-09-14 20:34:34 +00:00
luoqi
d4dfc59a3f Fix a cut 'n paste mistake. 1998-09-13 20:32:45 +00:00
dt
fd32b02341 Don't clobber errno if we are not going to fail. 1998-09-13 15:33:42 +00:00
dt
c5403b91f2 Don't lock newfd if it is not opened.
PR:		5961
1998-09-13 12:48:47 +00:00
dt
613a2bdfde In libc_r, rename vfork syscall to _thread_sys_vfork and make vfork an alias
to fork. It is difficult to do real vfork in libc_r, since almost every
operation with file descriptsor changes _thread_fd_table and friends.

popen(3) works much better with this change.
1998-09-12 22:03:20 +00:00
wollman
9aee196299 Document the fact that shutdown(2) is expected to comply with Posix.1g,
when it happens.
1998-09-12 21:38:30 +00:00
dt
4933b6a930 Change return type of strptime from const char* to char*.
const char* was wrong and nonstandard.
1998-09-12 21:13:29 +00:00
wollman
714948938b 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
jkoshy
4faed0fd1d Use ellipsis in synopsis.
Requested by: bde
1998-09-12 01:27:34 +00:00
imp
d904438e7b Define PBUFSIZ in terms of MAXPATHLEN rather than hard coding it to
512.

Obtained, I think, from: OpenBSD
1998-09-11 05:44:41 +00:00
imp
7085d1ce9f $@ -> ${.TARGET} 1998-09-11 05:42:37 +00:00
imp
e299ab5422 $* -> ${.PREFIX} 1998-09-11 05:40:12 +00:00
imp
31b8bd5c58 Remove definition of malloc and realloc. Instead include stdlib.h. 1998-09-11 05:39:08 +00:00
imp
7a2c763eb8 $@ -> ${.TARGET} 1998-09-11 05:34:37 +00:00
imp
ecd1a2031f Change obsolete $@ to ${.TARGET}. 1998-09-11 05:31:45 +00:00
imp
be43034927 Don't trust TMPDIR if we're setuid root. This is used only for the
backing file for an anonymous (memory based) btree, and I don't think
that any setuid programs actually use it, but it is better to be safe
than sorry.  This has been in my tree for a long time, maybe a year or
more...

Inspired by: Similar changes in OpenBSD, if memory serves (like nearly
a year ago)
1998-09-11 05:29:47 +00:00
brian
3164b70eb9 Mention which system interface functions are signal-safe.
Suggested on -current by: Terry Lambert <tlambert@primenet.com>
1998-09-09 20:44:51 +00:00
ghelmer
74c1160438 Document a number of VM sysctl variables with help from old emails
written by John Dyson.
1998-09-09 18:36:14 +00:00
dt
098e5b9a89 Fixed bug, caused threads to wait for locks which nobody hold.
Fixed sign extension bug, caused undefined behavior if FILE live in stack.
1998-09-09 16:50:33 +00:00
kato
20d8a739bd Change ${MACHINE} into ${MACHINE_ARCH} to support MACHINE=pc98. 1998-09-09 11:27:33 +00:00
kato
0c6fdf055e Change i386 in a few paths to ${MACHINE} to support MACHINE=pc98. 1998-09-09 11:22:28 +00:00
jkoshy
b2baba7514 Add $Id$, remove quoting for `...'.
Requested by: bde
1998-09-09 01:30:25 +00:00
jdp
7aadfa5c68 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
obrien
b0502cca70 Add support for the RPC 64-bit integer type ``hyper''. 1998-09-08 17:33:12 +00:00
ache
ed134d237e 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
jkoshy
e5227524a6 Use ellipsis in the synopsis, and an appropriate explanation in
the text of the manual page.

Suggested by: bde
1998-09-08 02:02:50 +00:00
jdp
5b11e2a2f4 Make profiling work for ELF. gprof now autodetects the format of
the executable file, so it will work for both a.out and ELF format
files.  I have split the object format specific code into separate
source files.  It's cleaner than it was before, but it's still
pretty crufty.

Don't cheat on your make world for this update.  A lot of things
have to be rebuilt for it to work, including the compiler and all
of the profiled libraries.
1998-09-07 23:32:00 +00:00
alex
d09071d106 Removed unused variables. 1998-09-07 21:55:01 +00:00
alex
fff0f05780 Removed some variable initializations which were unnecessary and divergent
from style(9).
1998-09-07 21:07:59 +00:00
alex
41cbd8b3c1 -Wall clean. 1998-09-07 19:23:55 +00:00
alex
fe02148d3f Implement pthread read/write locks as defined by Version 2 of the Single
UNIX Specification.

As with our standard mutexes, process shared locks are not supported at
this time.
1998-09-07 19:01:43 +00:00
bde
f33441ad5c Fixed SUBDIR order (libm is no longer a prerequisite for libtcl). 1998-09-07 13:59:15 +00:00
dillon
ac6dbb3f69 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
jkoshy
83329c27b7 Use a varargs style prototype in the manual page, with accompanying
explanation in the text.
1998-09-06 08:50:49 +00:00
asami
0111b6a61b Remove tcl from /usr/src, according to prior agreement. BTW, tcl-8.0 *is*
a port so there is nothing to be done on that side now.

Approved by:	jkh
===
To: "Jordan K. Hubbard" <jkh@time.cdrom.com>
cc: Andreas Klemm <andreas@klemm.gtn.com>, current@freebsd.org
Subject: Re: Make this a relese coordinator decision (was Re: ports-current/packages-current discontinued)
From: David Greenman <dg@root.com>
Date: Sun, 03 Aug 1997 20:23:31 -0700

>decision is, I'll respect it.

   Another chance to architect people's principles...I can hardly wait. Seems
quite appropriate for a Sunday - I just need to get one of those collection
plates (and money envelopes) so I can profit, too. :-)
   Tcl stays in /usr/src for now, but it needs to be kept up to date; same
for perl. If Jordan doesn't have "setup" (written in tcl) ready for 3.0,
then tcl will be yanked prior to the 3.0 release (and made into a port).
   As for the ports tree only supporting the last FreeBSD release, this seems
sensible to me. The "ports" have always been a moving target between releases
and the problem is only going to get worse when we expand to supporting other
processor architectures. In any case, Satoshi is and always has been in charge
of the ports tree and whatever he wants to do with it (within reason :-)) is
his decision.
   Does this cover the issue completely? I admit to deleting messages in this
thread with unusual fervor (people have FAR too much time on their hands!).
There's a fair bit of reasoning behind the above, but since everyone is sick
of arguing about this, I'll spare you the analysis.

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project
1998-09-05 12:25:55 +00:00
jb
b1cb75a632 Change MACHINE to MACHINE_ARCH when testing for i386 to support
MACHINE=pc98.

There are a lot unsupported machines here.
1998-09-05 08:35:53 +00:00
jb
53450eb344 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
jb
ee52c4c5c0 Change a test for NETBSD_SYSCALLS to __alpha__. We're not ready to
do profiling on alpha yet.
1998-09-05 07:57:43 +00:00
jb
0a3d8ac4d3 Change the profile data file name from gmon.out to progname.gmon
where progname comes from __progname in crt0 or crt1.
1998-09-05 07:56:36 +00:00
bde
9e5e52d9b8 Keep build-tools objects separate from `all' objects so that my
cross-builds work.
1998-09-02 15:22:11 +00:00
bde
3e4c6e97f3 Fixed the elf case of the creation of the libcrypt.so -> libscrypt->so
link.  Shared libraries are in ${SHLIBDIR}, not necessarily in ${LIBDIR}.
1998-09-02 15:09:15 +00:00
bde
c177840e1d csu must be built before all shared libaries for ELF, since ELF shared
libraries are linked to at least crti.o.  Always build it first.
1998-09-02 15:02:18 +00:00
jdp
bf8ea8d3a7 Implement the weak aliases for private entry points in the inet_*
and res_* modules in a way that works for ELF.  I moved the aliases
out of res_stubs.c and into the individual modules where the entry
points are defined.  Weak aliases don't work in ELF unless that is
the case.  (Actually, I'm surprised it worked for a.out.)

This should fix the undefined "inet_addr" and related symbols in
various applications that fail to include <arpa/inet.h> or
<resolv.h> as they are supposed to do.
1998-09-02 00:53:17 +00:00
wosch
68cda92e4a Sort cross references. 1998-08-31 16:41:09 +00:00
brian
f2c69105f2 Remove OpenBSD build support - let the Makefile vary per
OS rather than making it a mess and potentially screwing
up cross builds.
Suggested by: bde

Add Id keyword.
1998-08-31 12:14:30 +00:00
brian
0d85445a6a Add OpenBSD build support 1998-08-30 23:53:25 +00:00
markm
ee1b8f0d9c While I am no longer making a shared library, it is a good plan to nuke
the old ones to prevent ld picking it up spuriously.
1998-08-30 13:07:16 +00:00
jb
2b6505f997 BINFORMAT -> OBJFORMAT ready for E-day. 1998-08-30 02:52:04 +00:00
jb
e6edac6dac BINFORMAT -> OBJFORMAT ready for E-day. 1998-08-30 01:57:55 +00:00
markm
60a089e6d7 Stop making a shared library for libtelnet. This should have happened
a long time ago.
1998-08-29 20:23:14 +00:00
jkoshy
869eb982fe Typo fix. 1998-08-28 04:36:21 +00:00
rnordier
ab70f0b218 Add support for reading directories as files.
Sort out fs_ops, alloc/free.
1998-08-27 10:45:20 +00:00
jb
343f23c6e9 Don't automatically restart syscalls for the signals that the thread
kernel needs.
1998-08-26 20:55:31 +00:00
jb
45be607d94 Back out most of the last commit. It created problems with sigpause. 1998-08-26 20:50:42 +00:00
jb
553a8d11c1 Test program for sigwait.
Submitted by: Daniel M. Eischen <eischen@vigrid.com>
1998-08-25 12:35:16 +00:00
jb
1262e5d7df Add support for building test programs. 1998-08-25 12:33:22 +00:00
jb
cf45fb770c Fix for sigwait problem.
Submitted by: Daniel M. Eischen <eischen@vigrid.com>
PR:           misc/7039
1998-08-25 11:19:14 +00:00
dfr
55dcde8578 The length argument to sysctl is now size_t. 1998-08-25 07:52:33 +00:00
bde
16b9fca94f Fixed syntax errors (__dead should have gone away years ago, and
__attribute__(()) is a gccism - we use __dead2).
1998-08-24 02:54:33 +00:00
steve
d39f49e72d Describe what constitues an exceptional condition.
PR:		7666
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-08-24 01:09:34 +00:00
gpalmer
d804b140d6 Nuke unsupported architecture files 1998-08-22 14:34:59 +00:00
gpalmer
fd964e73db Building `compat' on alpha is meaningless (they are i386 libraries) 1998-08-22 14:31:39 +00:00
jb
bc2aa8b61a Remove the bootstrap hack that prevented the use of the rtld. 1998-08-20 21:37:22 +00:00
msmith
f2844ad92f Add libstand. 1998-08-20 08:24:07 +00:00
msmith
8e2e50a330 Install libstand header <stand.h> and manpage (libstand.3) 1998-08-20 08:23:12 +00:00
msmith
42e6e188ef This commit was generated by cvs2svn to compensate for changes in r38451,
which included commits to RCS files with non-trunk default branches.
1998-08-20 08:19:55 +00:00
msmith
b29bbd55da This is libstand; a support library for standalone executables (eg. bootstrap
modules).
Obtained from: NetBSD, with some architectural changes and many additions.
1998-08-20 08:19:55 +00:00
msmith
335c4be5b1 This is libstand; a support library for standalone executables (eg. bootstrap
modules).
Obtained from: NetBSD, with some architectural changes and many additions.
1998-08-20 08:19:55 +00:00
ache
861a4bd425 do not include private copy of bpf.h - it leads to dangerous mismatch
of kernel/user bpf interface - include updated /sys/net/bpf.h instead
1998-08-18 10:29:37 +00:00
bde
7268de7a17 Made this actually work when there's an object directory:
- replaced bogus dependencies of distribution sources on generated
  sources by the same ones that bsd.lib.mk would generate if it knew
  all the sources.  We shoot ourself in the foot by not naming the
  generated (included) sources *.h, so we can just put the generated
  sources in SRCS.
- replaced -I${.CURDIR} by `-I.'.  Here `.' is an alias for ${.OBJDIR}.
  -I${.CURDIR} didn't do anything, since ${.CURDIR} is the default in
  all cases here (it would be necessary for ""-style includes made from
  sources in ${.OBJDIR}.

Don't use `+=' for setting CLEANFILES for the first time.

Added $Id$.
1998-08-17 20:39:09 +00:00
des
c08f5296c3 Cross my fingers and enable libfetch. 1998-08-17 09:32:07 +00:00
des
b315880890 Commit a bunch of patches that have been accumulating:
- Fix the README to reflect the new status of the ftp code.
 - Change tons of 'if (xxx < 0)' to 'if (xxx == -1)'
 - Add two new interface functions
 - Fix the Makefile so it actually works (yay!)

Now the manpage is lagging even further behind... :( Next on the todo
list is to clean up the http code.
1998-08-17 09:30:19 +00:00
dfr
2cfb34146c Update to use the new elf headers. 1998-08-17 08:47:19 +00:00
jb
542d7ab6fb Remove support for NetBSD syscalls. 1998-08-17 03:46:10 +00:00
jb
87c7d8300d Remove the comment about how to get NetBSD syscalls since there are
now programs built on alpha that _must_ use FreeBSD syscalls to work.
1998-08-17 03:35:09 +00:00
phk
3fd8693dfa Add missing #include of <sys.types.h> 1998-08-15 20:53:34 +00:00
phk
3d8fbb04c7 I have added the support for BIG5 encoding into libc/libxpg4/mklocale.
the diff is attached below. This is done on the 3.0 source-tree.
I have test this on 2.2-stable before, but I don't have a 3.0 machine
right now.

This patch is mainly to make libc support BIG5 encoding, thus add
zh_TW.BIG5 locale to 3.0.

Submitted by:	Chen Hsiung Chan <frankch@waru.life.nthu.edu.tw>
1998-08-15 12:51:49 +00:00
jb
df2e90f4f3 Build libkvm on alpha too. 1998-08-15 12:36:42 +00:00
dfr
0828d02efd Add an alpha machdep for kvm. The vatop functions are stubbed out for
now (mainly because I haven't ported them from the NetBSD crash dump
environment).

Obtained from: NetBSD
1998-08-15 12:12:22 +00:00
jb
9aee508ab2 Make the locally built and executed build tools in this directory
static to avoid them trying to use shared libraries before we're
ready. During the initial elf buildworld, the shared loader only
exists in the obj tree, so it can't be used.
1998-08-15 07:15:51 +00:00
jdp
3a1c25125a Add missing initialization of the length variable passed to
getsockopt().  Use a separate variable for clarity, instead of
overloading an unrelated variable.
1998-08-12 20:29:29 +00:00
jb
b3abc25f21 Add extra initialisation code that is required for processes that
are started instead of init (pid = 1). This allows an embedded
implementation quite like VxWorks, with (possibly) a single threaded
program running instead of init. The neat thing is that the same threaded
process can run in a multi-user workstation environment too.
1998-08-10 01:24:22 +00:00
jb
f1b6bb19f5 If using FreeBSD syscalls, handle the syscalls that don't require
default asm code the same way as on i386.
1998-08-08 02:25:46 +00:00
jb
28e246e358 Include FreeBSD's syscall.h if not using NetBSD syscalls. 1998-08-08 02:24:03 +00:00
jb
931e9bbff0 Allow for the fact that NetBSD syscalls are no longer the default. Call
sigaltstack by default if using FreeBSD syscalls.
1998-08-08 02:20:24 +00:00
jb
559e45b44f Make NetBSD compatibility conditional on NETBSD_SYSCALLS being defined.
This is no longer the default.
1998-08-08 02:18:07 +00:00
jb
f5eb9db9bd References to NetBSD syscalls changed to just a comment about what to
add to /etc/make.conf to use FreeBSD's libc with a NetBSD/Alpha kernel.

From now on, FreeBSD/Alpha is just FreeBSD.
1998-08-08 02:14:45 +00:00
jdp
203de4af5d Correct the description of skeyaccess(). It determines whether Unix
passwords are permitted, not whether S/Key passwords are permitted.

This manual page could use a good going over.
1998-08-05 23:42:10 +00:00
bde
cfef94c8ca Fixed bitrot in prototypes in synopsis. 1998-08-03 17:52:27 +00:00
bde
b0f1ad7788 Changed prototype in synopsis to match prototype in <pthread.h>. 1998-08-03 16:54:51 +00:00
bde
f4657fb06b Fixed missing header in synopsis. 1998-08-03 16:29:31 +00:00
bde
589ee87735 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
alex
5d69d2598b The pthreads standard has been published. Change:
...is expected to conform to IEEE (``POSIX'') Std 1003.1c when it is
   published.
to:
   ...conforms to ISO/IEC 9945-1 ANSI/IEEE (``POSIX'') Std 1003.1 Second
   Edition 1996-07-12.

Discussed with:	jb
1998-08-03 00:58:37 +00:00
alex
9f99cda126 A style fix for my previous commit. 1998-08-02 23:07:25 +00:00
alex
a9c05a1ce9 Fixed a race condition during the first lock/trylock of a statically
initialized mutex.  Statically initialized mutexes are actually
initialized at first use (pthread_mutex_lock/pthread_mutex_trylock).
To prevent concurrent initialization by multiple threads, all
static initializations are now serialized by a spinlock.

Reviewed by:	jb
1998-08-02 17:04:25 +00:00
bde
aaeb261fcc Fixed printf format errors. 1998-08-02 14:41:34 +00:00
phk
6b7f7b2376 I've put together man pages for the pthread_cleanup, pthread_cond, and
pthread_mutex routines. I've also tweaked pthread_create.3 to point to
pthread_cleanup_push(3) and pthread_cleanup_pop(3).

PR:		7450
Submitted by:	Brian Cully <shmit@kublai.com>
1998-07-31 09:09:19 +00:00
ache
0ffccfde15 Print uid/gid as u_long per bde suggestion 1998-07-29 14:05:01 +00:00
bde
de10182213 Fixed disordering in previous commit. 1998-07-29 13:43:06 +00:00
hoek
50f3429a48 Add missing period. We don't allow maternity leaves. 1998-07-29 05:13:39 +00:00
jlemon
f3f6e5cc39 u_int --> unsigned int, remove (now unneeded) <sys/types.h> 1998-07-28 15:22:51 +00:00
jlemon
6a5deaf27d oops, forgot to do ``cvs add'' first. 1998-07-28 03:39:04 +00:00
jlemon
f4995111a0 Add wrappers for i386_*_ioperm, i386_vm86 so userland code does
not have to call sysarch() directly.
Added man pages for above, as well as sysarch()
1998-07-28 03:33:27 +00:00
ache
d66e06a69f cast arg to (long) to match format 1998-07-28 01:30:16 +00:00
ache
3d028a61c9 Provide meaningful errno value on error return 1998-07-14 18:27:43 +00:00
bde
55ddae5a80 Changed to the C9x draft spelling of the (unsigned) integral type
suitable for holding object pointers (ptrint_t -> uintptr_t).
Added corresponding signed type (intptr_t).  Changed/added
corresponding non-C9x types for function pointers to match.  Don't
use nonstandard types to implement these types, and don't comment
on them in <machine/types.h>.
1998-07-14 05:09:48 +00:00
des
42566affcd Forgot to remove base64.c from SRCS in the Makefile. 1998-07-12 22:37:45 +00:00