Commit Graph

2379 Commits

Author SHA1 Message Date
Peter Wemm 64a965e707 Replace my original asprintf() and vasprintf() hacks with something
more cleanly integrated with stdio.  This should be faster and cleaner
since it doesn't memcpy() the data into a seperate buffer.  This lets
stdio allocate and manage the buffer and then hand it over to the user.

Obtained from: Todd Miller <Todd.Miller@courtesan.com> via OpenBSD
1998-07-08 00:44:56 +00:00
Bruce Evans 6d31e616a0 Added a `build-tools' target for internal tools. 1998-07-07 01:51:18 +00:00
Poul-Henning Kamp 8a507b98ab fts_close calls free(sp), the ISSET(FTS_NOCHDIR) which is a macro that
references sp. The free needs to follow ISSET

PR:		7148
Reviewed by:	phk
Submitted by:	Ken Mayer <kmayer@freegate.com>
1998-07-03 08:21:05 +00:00
Eivind Eklund 38cf631922 Cross-reference to sysconf(3). 1998-06-30 22:56:39 +00:00
Poul-Henning Kamp 35e6b695d6 Allow /dev/null as path for the "/dev/mem" file, and assume that people
know what they're doing if they do that.  This will allow ps to use
the kvm_proc.c bits without having access to /dev/mem.

Fix kvm_proc.c to not need /dev/mem for access to argv/envp
1998-06-30 21:29:44 +00:00
Bruce Evans 9f15c7ece5 Fixed printf format errors. 1998-06-30 18:06:23 +00:00
Bruce Evans 65a87ccc7c Fixed print format errors. 1998-06-30 18:03:05 +00:00
Bruce Evans bcc58f6898 Fixed a printf format error. Didn't fix assumption that sigset_t is
integral.
1998-06-30 18:00:11 +00:00
Bruce Evans a7f8e53079 Fixed printf format errors. 1998-06-30 17:30:22 +00:00
Bruce Evans 2a29b52b98 Fixed scanf format errors. The error handling is not quite bug for bug
compatible.  I think small negative uids are handled compatibly but
other out of bounds ones are truncated differently for certain sizes of
uid_t.
1998-06-30 17:21:48 +00:00
Bruce Evans c6966b0c4a Fixed printf format errors. Don't assume so many things about time_t.
Obtained from:	partial merge of ADO version tzcode96h (was fully merged
                in 1.10 but backed out in 1.11; the FreeBSD code for %s
		was earlier, prettier but buggier).
1998-06-30 16:49:47 +00:00
Brian Somers 10d9142685 Fixes assorted problems with the history edit functions in libedit. This
affects sh, ftp (and others?).

Submitted by: Max Euston <meuston@jmrodgers.com>
PR:           6516
1998-06-27 16:10:40 +00:00
John Polstra fd898ba100 Extend the existing hackery to set the disk type to SCSI for the
"da" and "od" devices.  Formerly ESDI was used for them, causing
problems for fresh installations of CAM systems.
1998-06-27 02:01:25 +00:00
Guido van Rooij 7d0cc08e7f Fix btree problems. This passes regressions tests.
PR:	7009
Obtained from: http://www.sleepycat.com/update/patch.185.html, patches 1.2,
		1.3 and 1.4
1998-06-25 18:50:06 +00:00
John Birrell ff09ba5fbb Add the missing {} that caused the function to return ESRCH if it
had to wait for the thread to exit and if the caller didn't want the
thread exit status.
1998-06-25 00:04:21 +00:00
Brian Somers 0579bd7175 Add CUSEEME support. This has *not* been tested, nor
could I find anyone to test it, so please report any
problems to me.
1998-06-24 06:58:00 +00:00
Andrey A. Chernov 2ed2c53bd8 Fix keypad on/off for ^Z suspends by replacing reset_*_mode()
from libmytinfo
1998-06-19 16:12:41 +00:00
Andrey A. Chernov 7bc8e89840 Add check for non-NULL cur_term
Add #pragma weak for reset_*_mode() they will be replaced in libncurses
1998-06-19 16:09:20 +00:00
Peter Wemm 2f92c56cc3 preserve errno across the readlink() calls. There is no value in trashing
errno during a successful malloc() call.
1998-06-18 09:13:16 +00:00
John Birrell b9148b8a3e Don't allow a SIGCHLD to wake up a thread if the process has the default
signal handler installed for SIGCHLD. The ACE MT_SOCK_Test was hanging
as the result of being interrupted when it didn't expect to be.
1998-06-17 22:29:12 +00:00
John Birrell d989fc8faa If a thread is waiting on a child process to complete, the SIGCHLD
signal can arrive before the thread is woken from it's wait4. In this
case, don't return an EINTR, just set the thread state to running and
the wait4 wrapper will loop and get the exit status of the process.
1998-06-17 03:53:16 +00:00
Peter Wemm 02a93d74e0 Don't compile in the use of poll() when building libc_r. This isn't
so much a "fix", rather a bandaid to buy time to fix it properly
within the thread engine.
1998-06-14 11:25:46 +00:00
John Birrell 597035b4db If a short write, only loop if no error. 1998-06-14 09:36:14 +00:00
Bruce Evans ef2e5f62e3 Document EINVAL return value. 1998-06-14 08:22:05 +00:00
Peter Wemm 21cd354328 Understand elf library naming rules for libtermlib alias.
Don't do the libtermcap un-bump hack for anything but a.out
1998-06-12 15:57:59 +00:00
Peter Wemm f3f4b57ac9 Make nlist() understand elf unconditionally 1998-06-12 15:02:03 +00:00
John Birrell 0b99d9d8ac Add poll to the list of hidden syscalls so that it gets renamed. This
propagates a bug (that there is no poll wrapper in libc_r), but it
prevents GNU configure scripts from trying to use it in preference
to select. libc_r really needs to change it's wait interface to use
poll instead of select because poll is more a superset of select that
the other way around.

This should allow the Roxen web server to work out-of-the-box. It's
configuration intercae is kinda neat. The code isn't. Shiver. 8-)
1998-06-12 02:21:27 +00:00
John Birrell 06ca87e9f7 Update the caller's descriptor masks even if there are none ready for
I/O for those applications that don't believe the return value of zero as
meaning that THERE ARE *NO* DESCRIPTORS READY.
1998-06-12 02:17:18 +00:00
Peter Wemm bdf905f07c Sigh, mkdep doesn't know about all the CFLAGS to pass during depend
generation.
1998-06-11 10:39:32 +00:00
Peter Wemm ff55f42545 Remove components that would duplicate those in libc now that the
includes and interfaces have been merged with the 8.1.2 update.

This essentially leaves the isc/* files that named and named-xfer use.
It might be best to just compile them with .PATH in both cases rather than
bothering with libbind.
1998-06-11 09:06:54 +00:00
Peter Wemm 14b93edab3 Update the resolver parts to bind-8.1.2 level. I have not touched the
getXXXXbyYYYY() interfaces yet.

Obtained from: diff relative to bind-8.1.2 sources
1998-06-11 09:03:02 +00:00
John Birrell 8eb25828ad Check the access mode in the flags before waiting on a read or a write
that might never be possible if the file was not opened in the corrent
mode. This prevents a hang for bad programs. Why do people code like that?
1998-06-10 22:28:45 +00:00
John Birrell aef774b0d5 Remove SA_RESTART from the signal dispatch in user-space since this
seems to be tripping up a lot of applications.
1998-06-10 22:25:18 +00:00
John Birrell 3c165ef7b7 When doing a F_SETFL, read the flags back so that the ones stored
in the file descriptor table are exactly what the kernel knows subject
to the O_NONBLOCK flag being requested by the user.
1998-06-10 22:24:12 +00:00
John Polstra 63b7c21cc3 Move ftok() from libcompat to libc, so that it can be closer to its
friend shmget().

PR:		closes misc/6763
1998-06-10 16:20:21 +00:00
Daniel O'Callaghan 9b0662e646 Fix grammar, "null" -> "NUL" 1998-06-10 12:37:45 +00:00
Poul-Henning Kamp 1499abeef4 Spelling fixes.
PR:		6903
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-10 12:34:27 +00:00
John Polstra 363e8996d7 This is a null commit to log the fact that I have done a repository
copy to bring these files into libc from libcompat.  I will enable
them and kill off the libcompat versions on the main branch soon.

PR:		step one toward closing misc/6763
1998-06-10 04:24:21 +00:00
Brian Somers dfcb634be3 Quieten gcc 2.8.1 1998-06-10 00:26:19 +00:00
Brian Somers 6c78a7b0e8 Cast pid_t to int for sprintf.
Pointed out by: Charlie Sorsby <crs@hgo.net>
1998-06-10 00:16:28 +00:00
John Birrell 627961e45f Add a commented out CFLAGS entry that can be uncommented to compile thread
lock debug into libc_r. I don't know if this is the best place to document
this, but at least it is recorded somewhere. 8-)
1998-06-09 23:25:13 +00:00
John Birrell ddc8afd422 Implement compile time debug support instead of tracking file name and
line number every time a file descriptor is locked.

This looks like a big change but it isn't. It should reduce the size
of libc_r and make it run slightly faster.
1998-06-09 23:21:05 +00:00
John Birrell a675022188 Add compile time debug instead of doing this all the time. Reduce the
time that a thread keeps the file descriptor table locked. In particular,
perform malloc/free calls outside the lock and handle the situation
where two threads can race to initialise the table entry for the same
file descriptor.
1998-06-09 23:16:53 +00:00
John Birrell 3411c10600 Add support for compile time debug. This is enabled if libc_r is built
with -D_LOCK_DEBUG. This adds the file name and line number to each lock
call and these are stored in the spinlock structure. When using debug
mode, the lock function will check if the thread is trying to lock
something it has already locked. This is not supposed to happen because
the lock will be freed too early.

Without lock debug, libc_r should be smaller and slightly faster.
1998-06-09 23:13:10 +00:00
John Birrell 74ebed9424 POSIX says that pthread_exit() is not allowed to be called from a
cleanup destructor, so trap this case to prevent me from being being
burnt again by applications that try to do this. With this change, an
application (like one using a mis-configured ACE) will exit the process
after displaying a message quoting the POSIX section that the application
has violated.
1998-06-09 23:08:41 +00:00
John Birrell 27949f44dc Add compile time thread lock debug support.
Add a thread specific flag to trap the case where pthread_exit() is
called from a destructor in violation of the Posix standard.
1998-06-09 23:02:43 +00:00
John Birrell 4bc711423a Remove __NETBSD_SYSCALLS from CFLAGS now that it is set in sys.mk. 1998-06-09 22:59:16 +00:00
John Birrell 0b0ae157f8 Rename calls when building libc_r. 1998-06-09 22:57:34 +00:00
John Birrell f4086bc0cb Make this thread-safe in both libc as well as libc_r. 1998-06-09 22:56:24 +00:00
John Birrell 9e0370f742 Rename when building libc_r. 1998-06-09 22:45:39 +00:00