Commit Graph

2525 Commits

Author SHA1 Message Date
jb
9cd9104a87 Force BOOTSTRAP mode all the time while the headers are broken on alpha
as the result of i386 changes.
1998-05-04 02:06:09 +00:00
jraynard
ed117dff86 Typo fixes 1998-05-03 22:59:47 +00:00
jraynard
1656507891 Typo fix. 1998-05-03 22:50:14 +00:00
jraynard
9211c4d512 Pedantry (NULL -> NUL). 1998-05-03 22:42:45 +00:00
jraynard
c7cff2d20c Don't imply sigset_t == int. 1998-05-03 22:27:29 +00:00
peter
5bb1ec446d Add libbind 1998-05-03 05:06:13 +00:00
peter
459fe62b97 Build libbind for named and friends (not installed in /usr/lib) 1998-05-03 05:04:21 +00:00
peter
fedfb91291 Resolve some unexpected differences when comparing with the 2.2 version.
One bug was relatively harmless (select's timeout had an uninitialized
tv_usec), the other I'm not so sure.. (neglected to catch select returns
less than zero).  Both of these were irrelevant on kernels with poll().
1998-05-02 15:51:54 +00:00
peter
2e115675f8 Update libc dns code to 4.9.7-T1B level. This involved chopping out large
chunks of res_comp.c and replacing it with chunks of bind-8.1.1's resolver
code.  (There are no interface changes though)
The other parts are better bounds checking related.
1998-05-02 13:11:02 +00:00
jb
badd156592 Cleanup in the child, not the parent.
Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
1998-05-02 03:42:20 +00:00
brian
7c4b920246 Go back to version 1.16 - it was correct the way it was.
Pointed out by:	bde
1998-05-01 19:41:12 +00:00
bde
7c748f97a7 Fixed disordering and other style bugs in rev.1.50. 1998-05-01 15:46:06 +00:00
brian
7187f6a9c3 connect() returns -1 on error - not 0. 1998-05-01 01:16:39 +00:00
jb
0d33dcfa10 Fix the incremental priority increment.
PR: bin/6467 Marino Ladavac <lada@pc8811.gud.siemens.at>
1998-04-30 21:50:29 +00:00
ache
4dfc17e28f Add reference to setlocale(3) 1998-04-30 16:11:50 +00:00
ache
eb0bd19233 Add reference to catopen(3) 1998-04-30 16:07:54 +00:00
ache
17b2dd915a Return -1 for invalid descriptor in catclose 1998-04-30 13:15:31 +00:00
ache
f1053fff57 If passed catgets descriptor is NULL or -1, return default string immediately 1998-04-30 12:25:05 +00:00
ache
49e36af497 Force loadType to 0 1998-04-30 11:39:08 +00:00
ache
218d8dfdad Implement NL_CAT_LOCALE
Manpages cleanup
1998-04-30 11:06:12 +00:00
ache
58873d7886 Prototypes/typedefs cleanup
Fix error return codes
1998-04-30 10:14:55 +00:00
jb
96a1d834ad Oops, backout the previous change having confused my underscores.
__thread_create is a syscall that uses the default asm. It is
_thread_create that contains specific asm code, but that lives in
libpthread.
1998-04-30 10:02:44 +00:00
jb
0969c323e8 Change the description of errno to match the thread-aware implementation
from 3.0 on. With 3.0 being a major release, now is a good time to do
this.
1998-04-30 09:49:59 +00:00
jb
4460aad9b5 Make cerror thread aware by calling __error() to get a pointer to the
thread-specific error variable. This change make libc use the same cerror
code that libc_r has been using.
1998-04-30 09:32:48 +00:00
jb
8d4e711fea The syscall that creates a kernel thread is coming, but it doesn't use the
default syscall asm, so add it to NOASM. The other syscalls that manipulate
kernel threads use the default asm code, so they just get built
automatically.
1998-04-30 09:30:50 +00:00
jb
9c1691d11b Build __error.c into libc, but not libc_r. The weak symbol in the
file works with libpthread, but when built into libc_r which has a non-weak
symbol of the same name, the linker behaves unpredicatably and sometimes
links the wrong symbol. The linker behaviour is a byproduct of what
the program calls from object to object so it is like winning a lottery
if the program actually works. The odds are quite good - 95:1, I think.
We need a sure thing, though, so weak symbols can't be used instead
of renaming things.
1998-04-30 09:13:48 +00:00
jb
fe3e52614e Change the name of this source file so that libc_r builds it instead
of the one in libc that contains the weak symbol for __error. FreeBSD's
make accumulates paths to the point that it can find *anything*, possibly
including the car keys.
1998-04-30 09:04:10 +00:00
jmz
fad1137798 Resurrect exit.c
PR:		misc/6433
1998-04-29 22:43:18 +00:00
ache
dd508b2f30 Basic support for LC_MESSAGES 1998-04-29 22:39:56 +00:00
jb
49642f714d Add spinlock. 1998-04-29 11:03:34 +00:00
jb
e9b0f7892b Change signal model to match POSIX (i.e. one set of signal handlers
for the process, not a separate set for each thread). By default, the
process now only has signal handlers installed for SIGVTALRM, SIGINFO
and SIGCHLD. The thread kernel signal handler is installed for other
signals on demand. This means that SIG_IGN and SIG_DFL processing is now
left to the kernel, not the thread kernel.

Change the signal dispatch to no longer use a signal thread, and
call the signal handler using the stack of the thread that has the
signal pending.

Change the atomic lock method to use test-and-set asm code with
a yield if blocked. This introduces separate locks for each type
of object instead of blocking signals to prevent a context
switch. It was this blocking of signals that caused the performance
degradation the people have noted.

This is a *big* change!
1998-04-29 09:59:34 +00:00
jb
a3285d96fe Don't need wrappers for longjmp/setjmp anymore. 1998-04-29 09:40:51 +00:00
jb
c809fdbdc5 Remove empty files that were renamed some time ago. 1998-04-29 09:39:34 +00:00
jb
acbe1e4c91 Atomic lock source. 1998-04-29 09:36:03 +00:00
jb
5fe3d9fd50 Stop renaming these in libc_r because wrappered versions don't make sense.
PR: i386/4826, bin/5953
1998-04-29 09:14:35 +00:00
jb
bed8d98d58 Replace the threaded locking with spinlock calls for both threaded
and non-threaded programs. This makes malloc thread safe for linking
with libpthread and kernel threads.

Reviewed by: phk
1998-04-29 09:10:58 +00:00
jb
68be02f38b Reference an external variable in threaded programs so that the
autoinitialiser gets linked in and therefore called before main().
1998-04-29 09:08:43 +00:00
jb
57aa8c90ed Use signal() in both the threaded and non-threaded cases. 1998-04-29 09:06:13 +00:00
jb
f887444fbd Stubs are required in libc so that it can be used with libpthread
(and kernel threads), but weak symbols and non-weak symbols of the
same name built into libc_r result in unpredictable linking.
1998-04-29 09:02:16 +00:00
dg
68b590047b Oops, revert part of a diff that wasn't supposed to have been committed. 1998-04-28 07:02:33 +00:00
dg
b258916809 Cache the results of the ps_strings sysctl so that it doesn't have to be
redone for every call of setproctitle().
1998-04-28 06:59:14 +00:00
phk
911ff3ed6a sigprocmask()' man page references sigmask()' in synopsis.
Note odd `sigmask()' line in synopsis.  `sigsetops(3)' is better suited
for `sigprocmask' and is already referenced from the manual page.
(`sigmask()' is useful for the older (& deprecated) `sigsetmask()' API).
PR:		6395
Reviewed by:	phk
Submitted by:	Joseph Koshy <koshy@india.hp.com>
1998-04-26 06:19:24 +00:00
ache
66cf8f60c0 Make asctime_r static if !_THREAD_SAFE to prevent namespace pollution and
prototype mismatch
1998-04-25 00:00:57 +00:00
pst
65990389dd Back out last change 1998-04-23 04:44:08 +00:00
rnordier
bc35794ff4 Improve description.
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
1998-04-22 19:59:55 +00:00
pst
381f7dfd83 Fix cabs and cabsf definitions to be prototypes. 1998-04-22 06:26:18 +00:00
dima
08ce66f63e indent 1998-04-20 22:13:50 +00:00
phk
b5e163289c Add a #ifdef _THREAD_SAFE around ctime_r 1998-04-20 10:09:37 +00:00
ache
00eafd89ad Describe timegm() 1998-04-20 00:52:32 +00:00
des
457c64741a Backed out lseek changes. 1998-04-19 22:20:32 +00:00
brian
e9b3c2546e o Support a compile-time -DNO_FW_PUNCH for portability
(and those of us that don't want the functionality).
o Don't assume sizeof(long) == 4.
Ok'd by: Charles Mott <cmott@srv.net>
1998-04-19 21:42:07 +00:00
phk
07df2a86ef ctime_r and asctime_r are not implemented.
prototypes in time.h do not match POSIX.

PR:		6345
Reviewed by:	phk
Submitted by:	Dmitry Khrustalev <dima@xyzzy.machaon.ru>
1998-04-19 06:47:25 +00:00
des
5d282768df Return EINVAL and do not changefile pointer if resulting offset is negative.
PR:		kern/6184
1998-04-18 19:24:22 +00:00
jb
e5351f3445 Allow a thread dump to report the thread's sigmask when in the
PS_SIGWAIT state.
1998-04-17 09:39:37 +00:00
jb
5359f916be When in PS_SIGWAIT state, still call signal handlers and set errno
to EINTR.
1998-04-17 09:37:41 +00:00
phk
a854d5b78c Backup out the last commit, it was already there.
Noticed by:	bde
1998-04-17 08:31:07 +00:00
phk
4940092d18 Manpages not installed
PR:		6327
Reviewed by:	phk
Submitted by:	Chia-liang Kao <clkao@cirx.org>
1998-04-17 07:26:51 +00:00
brian
82da744fab Typo police 1998-04-17 00:59:15 +00:00
ache
6528be86fc Add some easy to implement XSI macros including attr_get 1998-04-15 23:13:36 +00:00
peter
f0447f56aa Fix a nasty flaw as a result of using the arc4random() pre-seeding of
leading XXX's.  It could wrap an uppercase character through chars
like:  [ \ ] ^ _ `  in between Z and a.  The backslash and back tick
might be particularly nasty in a shell script context.  Also, since
we've been using upper-case generated values for a while now, go with
the flow and use them in the pathname search rotation.
1998-04-14 07:25:05 +00:00
jb
26590b3f93 Change the FILE locking to be by FILE, not by the underlying fd as
it was. Add a FILE_WAIT state and queue threads waiting for a FILE
lock. Start using the sys/queue.h macros instead of the way that MIT
pthreads did it.

Add a thread name to the private thread structure and a non-POSIX
function to set this. This helps (me at least) when sending a SIGINFO
to a threaded process to get a /tmp/uthread.dump to see what the
<expletive deleted> threads are doing this time. It is nice to be
able to recognise (yes, I spell that with an 's' too) which threads
are which.
1998-04-11 07:47:22 +00:00
jb
d14ddff45d Add FILE locking stubs for libc.
Change the FILE locking to support kernel threads when linked with
libpthread (which you haven't see yet). This requires that libc become
thread-safe and thread-aware, testing __isthreaded before attempting
to do lock/unlock calls. The impact on non-threaded programs is minor.
This change works with libc_r, so it's the best compromise.
1998-04-11 07:40:47 +00:00
phk
87b9646c33 Remove a nolonger implented "BUGS" description.
PR:		6240
Reviewed by:	phk
Submitted by:	Niall Smart rotel@indigo.ie
1998-04-11 07:37:44 +00:00
phk
8a9d073182 Correctly figure out that the remove cannot do passive mode.
PR:		6259
Reviewed & slightly modified by:	phk
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-04-11 07:28:53 +00:00
jb
7aebd7bc3e Add a global variable called __isthreaded that can be tested throughout
libc to determine if locking is required. This is needed in libc
for use with kernel threads, but until a thread is created, we don't
really want to bother locking things. The variable was added here
because the crt code calls exit(main()) so all programs will get the
variable.
1998-04-11 07:02:58 +00:00
jb
e79ac2afbf Add a private header file for libc/libc_r/libpthread to contain
definitions for things like locking etc.
1998-04-11 06:57:33 +00:00
jb
db2ac10139 Enable static initialisation of mutexes and condition variables. 1998-04-04 11:33:01 +00:00
jb
43712df52a Change in name of the static initializer define. 1998-04-04 11:03:07 +00:00
jb
e7d127f8d1 Rename static initializer defines for opaque structures so that the
POSIX specified names can be declared in pthread.h.
1998-04-04 10:58:12 +00:00
jb
ec16037110 Move the magic field initialisation to a place when it is more magic. 1998-04-04 07:27:29 +00:00
jb
a8e4a3f0a9 Add a magic field to the pthread structure to help recognize valid
threads from invalid ones. The pthread structure is opaque to the user
so this change does not cause any incompatibilities.

Hopefully this change will help code that was written for draft 4
fail gracefully if the programmer ignores the compiler warning about
the change in the level of indirection for the argument passed to
pthread_detach(). I got burnt, so I fixed then (expletive deleted)
thing.

These functions comply with the revised standard. That should shut
Terry up!
1998-04-03 09:31:15 +00:00
jb
a4935aa96b This function compiles with the standard, so say so. 1998-04-03 09:12:19 +00:00
jb
f11c4bb2b1 This function compiles with the standard, so say so.
Add a note about not touching errno and warn about previous drafts
of the standard which changed the level of indirection to the thread
argument. POSIX had a bit of trouble deciding what to do. So anyone
coding to both draft 4 and draft 10 (the final draft) will get burnt
by this function. I did. Grrr.
1998-04-03 09:11:15 +00:00
jb
d4832d6ad2 Temporary fix for problems that occur if CFLAGS=-g is added to
/etc/make.conf. The tools can't handle generating debug code where
we fiddle with the ELF segments.
1998-04-01 03:24:19 +00:00
dufault
2c8366e69b Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work.  Changes:

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

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.
1998-03-28 11:51:01 +00:00
phk
463e43d900 Split the padding out into a separate function.
Synchronize the kernel and libmd versions of md5c.c

PR:		misc/6127
Reviewed by:	phk
Submitted by:	Ari Suutari <ari@suutari.iki.fi>
1998-03-27 10:23:00 +00:00
jb
44bc78c765 For 1.3, NetBSD replaced the swapon() syscall with swapctl() and moved
the only call to compat_12 which isn't there by default. Provide
a wrapper.
1998-03-23 21:04:06 +00:00
bde
3c7ce625cf Fixed function types in synopsis.
Commented out docmentation of nonexistent authenticate() and
auth_timesok().  authenticate() seems to be obsolete and
auth_timesok() never existed in FreeBSD.
1998-03-23 13:29:49 +00:00
bde
0a9ff45390 Fixed bitrot in synopsis. 1998-03-23 13:23:22 +00:00
bde
e592d4d436 Regenerate (install tclAppInit.c in the installhdrs step). 1998-03-23 13:21:35 +00:00
bde
54d85d6ca0 Fixed a function arg type in the synopsis. 1998-03-23 13:07:17 +00:00
bde
f1e4d55e85 (Ab)use .Vt instead of .Fd for a variable declaration. 1998-03-23 13:05:07 +00:00
bde
13f5cecc75 Fixed bitrot in synopsis. Didn't fix bitrot elsewhere. 1998-03-23 13:02:37 +00:00
bde
95c23641e9 FixedSpellingErrorInAFunctionname. 1998-03-23 12:28:31 +00:00
charnier
1bf317d31f .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 07:48:45 +00:00
jb
d27197558c For 1.3, NetBSD walloped the msync syscall and replaced it with
__msync13. The old one got moved to compat_12. Wrap __msync13 up
to look like FreeBSD's msync and be careful to respect the fact that
MS_SYNC is 0x0000 on FreeBSD, but 0x0004 on NetBSD.
1998-03-23 06:58:06 +00:00
jkh
accb36828d Add Compaq & SCO partition types.
PR:		6092
Submitted by:	Drew Derbyshire <ahd@kew.com>
1998-03-22 07:41:23 +00:00
jb
3f73ea7712 Fix a problem of indirection unblocking signals that would have caused
signals to be unblocked even if they were already blocked when entering
the function.

Pointed out by: bde
1998-03-22 04:13:23 +00:00
markm
1dfd1e0396 Build both libscrypt and libdescrypt. There is no point in letting
libscrypt stagnate, even if it is superceded by libdescrypt. It is
a tiny library anyway, and building it is inexpensive.
1998-03-21 08:18:57 +00:00
jkh
f645e98460 MF22: teach about LS-120 devices. 1998-03-20 23:43:04 +00:00
bde
acd80aa7bd Renamed the generated include file keys.tries to keys.tries.h so
that it can be put in SRCS for dependency generation to work
properly.  Don't use beforedepend, as usual.
1998-03-20 16:50:08 +00:00
bde
cc7c84e1aa Build the libraries in a correct order. Reorganized the ifdefs so
that the order is easy to see.
1998-03-19 16:56:58 +00:00
bde
570fccf1a3 Don't use the beforedepend target. It was a no-op here except for
helping bsd.dep.mk break `make -jN depend'.
1998-03-19 15:27:08 +00:00
charnier
46f7bb5b5b .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
eivind
017dc9c8cf <sys/errno.h> -> <errno.h> 1998-03-16 18:00:18 +00:00
ache
2157ecc86d Add more AIX/DOS/Win95 partition types 1998-03-14 21:14:31 +00:00
bde
27410dd89f Changed speed_t from long to unsigned long. POSIX.1 requires an
unsigned integral type.  Changing it doesn't seem to cause any
sign extension bugs in /usr/src.  In the kernel, this is partly
because `struct speedtab' and its lookup function are too bogus
to use speed_t's for speeds - they use ints.

Reminded by:	PR 5786
1998-03-12 14:09:55 +00:00
bde
d7f1442cde Fixed disordering and inconsistent style in previous commit. 1998-03-12 12:05:14 +00:00
bde
16cac37c9c Separated header creation from header installation in libss. Create
the libss headers before installing them in `make world'.
1998-03-12 10:08:50 +00:00
jb
683c073d4b Bring these back from the dead. 1998-03-11 20:48:57 +00:00
jb
51b8b8186b Don't share sources with i386-elf. That was too difficult. 8-(
Add a bootstrap mode so that non-rtld versions of these objects can
be built when bootstrapping the system with NetBSD tools, headers
and libraries. Once the FreeBSD tools are built, the FreeBSD headers
are installed and *then* these objects can be recompiled with the
rtld references. Phew.
1998-03-11 20:41:55 +00:00
jb
ca0d0a6cac This commit was generated by cvs2svn to compensate for changes in r34484,
which included commits to RCS files with non-trunk default branches.
1998-03-11 20:36:11 +00:00
jb
6315afc8fc Sharing the crt sources with i386-elf wasn't too successful. The crti
asm code didn't link the way it was supposed to and the calling convention
for the entry "function" turned out to be very different. On alpha
it's a true function, but on i386 it's a fudge. Blech.

So jdp suggested keeping separate sets of source and avoiding lots
of #ifdefs. These files are based on his i386-elf code, with crt1.c
borrowing code from NetBSD's crt0. The copyright reflects that.

Complicating matters, the code turned out to be difficult to bootstrap
build using NetBSD tools. To compile against the FreeBSD rtld header
requires FreeBSD specific headers, but these can't be installed until
the tools are built, and they can't be built without the FreeBSD crt
objects. Anal retentive. So I introduced a HAVE_RTLD #define that isn't
set during the build process until all the tools are built and the
headers installed.
1998-03-11 20:36:11 +00:00
jb
bf4c6f090f Trash startup sources from NetBSD in favour of jdp's FreeBSD source
now that has been committed.

The makefile is derived from the i386-elf version, modified to pick
up most of the source (except crt1.c) from i386-elf. With minor changes
to i386-elf/crt1.c, this directory can be combined with i386-elf to
be a single csu/elf directory for all seasons.
1998-03-10 07:04:18 +00:00
jb
3ae7847ffa Import a sanitized version of jdp's crt1.c from i386-elf. I have removed
the rtld code pending implementation on the alpha.

The csu/i386-elf should be renamed as csu/elf and this directory
trashed. Consider this a temporary implementation.
1998-03-10 06:56:16 +00:00
jb
c842091705 This commit was generated by cvs2svn to compensate for changes in r34452,
which included commits to RCS files with non-trunk default branches.
1998-03-10 06:56:16 +00:00
jb
eef3704a36 Nearly missed this one.
List non-default asm sources in MDASM so that they replace the defaults.

For funny or incomplete syscalls, list them in NOASM to stop them
from getting built as defaults.
1998-03-09 07:36:56 +00:00
jb
2a2bac8381 Add #include <unistd.h> to get the prototype for __syscall().
Cast to long before casting to a void ptr to shut up gcc.
1998-03-09 07:27:58 +00:00
jb
737650c94a Yikes, this is the worst of the lot. Bruce suggested doing this (!).
Include the architecture specific sys makefile like previously, but
what this contains differs. It defines MDASM which list architecture
specific asm code that *replaces* syscalls of the same name defined
in MIASM (which gets defined by the syscall.mk or netbsd_syscall.mk
dependent of NETBSD_SYSCALLS being defined). If a syscall has a
C source implementation or something funny done to it, or just doesn't
need default asm source generated for it, then it is listed in NOASM.

syscall.mk is generated by makesyscalls.sh with other syscall files.
netbsd_syscall.mk is a hand-generated equivalent. So if a new syscall
is added and no other makefiles are edited, it will automatically have
the default asm source generated for it (whether you want it or not).

Anything listed in MDASM gets added to SRCS and gets built. For
each syscall name in MIASM, if it doesn't exist in MDASM or NOASM,
it gets added to the ASM or ASMR lists to have code generated for it.
If the syscall name was listed in HIDDEN_SYSCALLS (intended for use
by libc_r, not libc which has it defined, but empty), then the name
is added to the ASMR list and gets renamed before being built;
otherwise it is added to the ASM list and gets built with the same
name.

I wonder if this is too complicated. But it works on both i386 and alpha.
1998-03-09 07:22:12 +00:00
jb
0a89df63fc Function to return a pointer to the non-threaded errno. This is declared
with a weak symbol so that it won't be linked when linking against
libc_r or libpthread.
1998-03-09 07:09:55 +00:00
jb
f1973e2561 Compatibility functions for use when __NETBSD_SYSCALLS is defined. 1998-03-09 07:07:21 +00:00
jb
9b139e6792 Oops, we don't need NetBSD's malloc 'cause we can turn off utrace
in phk's malloc.
1998-03-09 07:03:06 +00:00
jb
dbfd1020d8 NetBSD doesn't have a utrace syscall, so don't define that if
__NETBSD_SYSCALLS is defined.
1998-03-09 07:00:38 +00:00
jb
8480b2e32d When forking a process, only the running thread gets to live. All
other threads never see the light of day and if they leave things
locked, blame POSIX.
1998-03-09 06:54:50 +00:00
jb
89829d7126 Added #include <string.h> to get prototypes. 1998-03-09 06:51:23 +00:00
jb
74d73729f1 Change MACHINE to MACHINE_ARCH.
Add _spinlock.c (stubs) to sources.

Nuke tahoe and vax.
1998-03-09 06:48:25 +00:00
jb
4df286a8f6 Stub functions for thread locking with weak symbols so that they are
only linked when not linking an application against libc_r or libpthread.
1998-03-09 06:46:21 +00:00
jb
a58c12d79f This commit was generated by cvs2svn to compensate for changes in r34375,
which included commits to RCS files with non-trunk default branches.
1998-03-09 06:34:43 +00:00
jb
85517e8b5f Import sources from NetBSD, tweaked for building in FreeBSD. 1998-03-09 06:34:43 +00:00
jb
de89177db7 MACHINE -> MACHINE_ARCH 1998-03-09 06:24:02 +00:00
jb
f02a02a5bb Define empty variables in case no names are added to them. This avoids
substitution errors for variables that don't exist.

If a machine architecture dependent makefile exists, include it
to discover if libc or libc_r is being built with NetBSD syscalls
instead of FreeBSD ones.

Put a NO_QUAD thingy around the quad makefile so that 64-bit
architectures can ignore that sh*t.

In the test for MDSRCS being empty, add all MISRCS to SRCS, rather
than just ignoring them.
1998-03-09 06:21:41 +00:00
jb
3598d7fc22 Add an include path to private linc/libc_r/libpthread header files.
Define the HIDDEN_SYSCALLS macro as empty because libc doesn't have
renamed syscalls. This avoids an undefined macro error when
libc/sys/Makefile.inc goes to look though it. HIDDEN_SYSCALLS is
used by the equivalent makefile to this one in lib/libc_r to list
those syscalls that it needs to rename so that libc_r can provide
replacement functions.
1998-03-09 06:16:38 +00:00
jb
e408ca9971 Add lib/libc/include as an directory to search for header files.
Change MACHINE references to MACHINE_ARCH.

Declare the names of the syscalls that need to be renamed to allow
for the functions that libc_r provides replacements for. This list
used to be in lib/libc/sys/Makefile.inc, but has been moved here
to keep that makefile tidy and remove the temptation for people to
add things to the list without adding a libc_r replacement function.
1998-03-09 05:09:43 +00:00
jb
20da3878ea Add a private (to libc, libc_r and libpthread) header file containing
prototypes for the spinlock functions that will be used for thread locks.
libc will have stubs declared with weak symbols. libpthread and libc_r
will have functions that really do something.
1998-03-09 05:05:32 +00:00
jb
1744e889bb Add FreeBSD/Alpha code to initialise a jmpbuf for a created thread.
Change a bunch of __alpha references to __alpha__.
1998-03-09 04:46:26 +00:00
jb
da4da5ca02 These files are very specific to FreeBSD kernels, so silently compile
no code when building a library with __NETBSD_SYSCALLS defined.
1998-03-09 04:42:19 +00:00
jb
2fcdaaf8f3 NetBSD implements semctl using a __semctl syscall instead of the
semsys syscall that FreeBSD kernels use. Grumble. So make the call
dependent on if __NETBSD_SYSCALLS is defined.
1998-03-09 04:39:13 +00:00
jb
9d49bde49f getvfsbyname() doesn't existing NetBSD, so return ENOSYS if compiled
into a library with __NETBSD_SYSCALLS defined.
1998-03-09 04:36:07 +00:00
jb
299c330ba1 Change a variable to type size_t to suit the sysctl prototype.
Add #include <string.h> to get prototypes.
1998-03-09 04:34:16 +00:00
jb
7f0126a2ab Cast pointer to a long instead of an int to keep a 64-bit compiler
happy. The code works either way, but I like a clean compile.
1998-03-09 04:29:00 +00:00
jb
2cb62d3a30 Can build libc and libc_r on alpha now.
Changed MACHINE to MACHINE_ARCH with the expectation that pc98 will
use elf the same as i386.

Nuked tahoe and vax 'cause the files they reference aren't in the
tree. If you want vax goto NetBSD. If you want tahoe... tough.
1998-03-08 23:24:05 +00:00
dufault
1756693a64 Reviewed by: bde
Changes to support building with _POSIX_SOURCE set to 199309L:

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

2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE

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

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

and vanish when:

_POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L.

4. Explain these in man 9 posix4;

5. Include _posix.h and conditionalize on new feature test.
1998-03-08 17:25:38 +00:00
mckay
b7350a5efe Fixed a few ancient typos, added a little missing stuff, and updated
references to abort() in light of POSIX mandated behaviour.  I'm
still not 100% happy with much of the wording, but it's better
than it was.
1998-03-08 15:15:33 +00:00
jb
e75a9bf58b Add sched_yield() witch is the draft 10 equivalent of pthread_yield()
from draft 4. Move some of the schedule definitions to sched.h which
is a POSIX header.
1998-03-08 02:37:27 +00:00
jdp
da474338f7 Enable csu/i386-elf under the appropriate conditions. 1998-03-07 20:30:18 +00:00
jdp
883194289c This commit was generated by cvs2svn to compensate for changes in r34198,
which included commits to RCS files with non-trunk default branches.
1998-03-07 20:27:11 +00:00
jdp
db1480afd7 Import C startup files for ELF support.
Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 20:27:11 +00:00
jdp
5a744a4713 Import C startup files for ELF support.
Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 20:27:11 +00:00
jdp
0be3e5f043 Add support for ELF.
Switch to ANSI-style function definitions.
1998-03-07 19:57:05 +00:00
ache
946b6b0c98 Add primary fat-32 1998-03-07 08:45:46 +00:00
wpaul
f7d07a4564 Fix resource allocation problems:
- Completely recoded the ypmatch cache code. The old code could leak
  memory: it would allow the cache to grow, but never
  shrink. The new code imposes the following limits:

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

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

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

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

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

Don't put a non-generated file in CLEANFILES.
1998-03-06 08:26:00 +00:00
brian
0e30a8041e We don't need to NUL terminate our sun_path.
Pointed out by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
1998-03-06 03:10:49 +00:00
brian
b97852dd8d Nul terminate sockaddr_un::sun_path
Suggested by: Theo de Raadt <deraadt@openbsd.org>
1998-03-06 02:12:02 +00:00
brian
112fd47a26 Make SyslogAddr a sockaddr_un rather than a sockaddr.
This wasn't a problem in practice as PATH_LOG and PATH_OLDLOG
are both < sizeof sockaddr::sa_data.
1998-03-05 22:17:59 +00:00
obrien
de9fafafa5 Reconized OpenBSD partitions. 1998-03-05 03:08:16 +00:00
dufault
41966d30a6 Reviewed by: msmith, bde long ago
POSIX.4 headers and sysctl variables.  Nothing should change
unless POSIX4 is defined or _POSIX_VERSION is set to 199309.
1998-03-04 10:27:00 +00:00
bde
5a6868d27f Fixed uninitialized pointer in previous commit. mktemp() was broken.
I noticed cvs core dumps and uncleaned cvs temporary files in /tmp.

Fixed ANSIisms.
1998-03-03 14:38:36 +00:00
steve
bd1710d939 Replace previous commit with a check disallowing ptr from running
off the end of the list variable.

PR:		5345, 5610
Submitted by:	nagao@cs.titech.ac.jp
1998-03-01 18:49:37 +00:00
jraynard
5f4611ed29 Strings are terminated by NUL, not NULL. 1998-02-28 18:05:42 +00:00
ache
71f2126865 Install manpage too 1998-02-28 10:41:01 +00:00
steve
a8457533c2 foo.gz is created by 'make test' so add it to CLEANFILES. 1998-02-28 06:27:59 +00:00
steve
627fdefb0a algorithm.doc renamed to algorithm.txt in new distribution. 1998-02-28 06:10:08 +00:00
steve
1aa9cca905 Merge conflicts. 1998-02-28 06:08:17 +00:00
steve
541ae4457c This commit was generated by cvs2svn to compensate for changes in r33904,
which included commits to RCS files with non-trunk default branches.
1998-02-28 06:04:26 +00:00
steve
4e1bfc0123 Initial import of zlib-1.1.1
PR:		5869
Reviewed by:	jdp
1998-02-28 06:04:26 +00:00
steve
5f33767f6b Remove the config_* routines with permission from Poul-Henning Kamp,
the original author.

PR:		5834
Discussed with:	phk, jkh
1998-02-28 03:57:05 +00:00
brian
788c370371 1) in CleanupAliasData, don't nullify entry in linkTableOut
since there might be permanent entries still left after
   calls to DeleteLink (it will be nullified by DeleteLink
   if all entries are deleted, won't it ?)

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

Submitted by: Ari Suutari <ari@suutari.iki.fi>
         via: Charles Mott <cmott@srv.net>
PR: 5041
1998-02-27 23:07:07 +00:00
pst
9a47d0a21f Compile under -W -Wall -Werror.
Fix API - keycrunch takes const char's, not chars.
1998-02-27 22:36:51 +00:00
bde
0d1bd54492 Don't add non-generated sources to CLEANFILES. There was no problem
in practice, even if there is no obj directory, because the sources
are not in ${.CURDIR} and the full path to them was not added.
1998-02-25 01:30:05 +00:00
bde
f645803bdd Don't add OBJS to CLEANFILES. bsd.obj.mk does it. Some objects were
duplicated.
1998-02-25 01:20:27 +00:00
fenner
043c465f01 Change tty-related capability names to match the implementation ("ttys.",
not "tty.").
1998-02-21 23:29:59 +00:00
jb
e8ea46b408 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:41:46 +00:00
jb
c4837678a1 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:23:55 +00:00
jb
3371b26256 Add #include <string.h> to get prototypes. 1998-02-20 08:13:51 +00:00
jb
e4130772c6 The NetBSD getlogin syscall has a different name. 1998-02-20 08:07:40 +00:00
jb
4bee63cac4 Fix a bogus cast for a bogus pointer check. This only checks if the
pointer is 4-byte aligned. On a 64-bit machine it probably should
check that the pointer is 8-byte aligned (eh, Bruce?) 8-)
1998-02-20 08:00:01 +00:00
jb
13f2c4dd4c NetBSD kernels don't have issetugid(), so #ifdef this out when
building FreeBSD's libc to run with a NetBSD kernel. We'll get to
the alpha kernel later, I promise. 8-)
1998-02-20 07:54:56 +00:00
jb
98900e96c3 Add alpha support. m68k crept in too. Oops. 8-) 1998-02-20 07:44:29 +00:00
jb
0d0b8ba135 Avoid an uninitialised variable warning from gcc. I bet some people
don't like me doing this, but I want to see clean compiles. 8-)
1998-02-20 07:40:22 +00:00
steve
c812d4dffe Need to #include <unistd.h> for nice(3).
PR:		5782
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
1998-02-18 18:34:17 +00:00
jkh
36a58a34a2 MF22: add login_auth.3 to man page list. 1998-02-18 05:29:07 +00:00
julian
91e1eaeae8 Submitted by: Jeremy Allison (jallison@whistle.com)
fix a slight confusion about which draft of threads we are supporting.
this allows something as big and ugly as samba to be compiled with libc_r
and still work!  our user-level pthreads seems amazingly robust!
1998-02-18 01:20:33 +00:00
jkh
c5b5ef354a correct a typo I just noticed. 1998-02-17 19:41:53 +00:00
jkh
5fd681d4a9 Mention when bidirectional features first appeared. 1998-02-17 16:36:48 +00:00
jb
0f0123a844 signal() returns SIG_ERR, not just -1. The sys/signal.h header file
provides the cast from -1 to the signal() return type, so no further
casting by programmers should be required.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

PR:		4320

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

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

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

C9x specifies the BSD4.4-Lite behaviour:

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

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

The next good thing is glibc compatibility, of course.

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

According to Single Unix specs:

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

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

NOTE: Single Unix specs says:

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

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

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

Submitted by:	Daniel M. Eischen <deischen@iworks.InterWorks.org>
1997-11-23 22:58:26 +00:00
bde
74b31032f5 Fixed spelling of EACCES. 1997-11-23 17:58:55 +00:00