Commit Graph

2261 Commits

Author SHA1 Message Date
deischen
56363d25db Comment only change; s/_thread_sys_/__sys_/ 2001-01-26 02:41:07 +00:00
deischen
d683e4c4af Comment change only; s/_thread_sys_/__sys_/ 2001-01-26 02:27:06 +00:00
deischen
1635c221b7 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
wollman
27b9f7486e I made a last-minute change before the last commit which broke
the errno semantics.  Get it (closer to) right this time.
2001-01-23 17:36:07 +00:00
ru
43d15f8b7a mdoc(7) police: replaced empty line with .Pp, updated document date. 2001-01-23 08:41:38 +00:00
wollman
2d9096c43d Add a couple of new library interfaces (will be activated when the
relavant header file changes are committed) for POSIX support.
2001-01-23 04:49:39 +00:00
mckusick
3343c7fd58 Add the function sysctlnametomib to libc. Details on the semantics
and use of this function have been added to the sysctl.3 manual page.
2001-01-23 03:40:32 +00:00
ru
17384aec71 man(7) -> mdoc(7). 2001-01-18 12:56:17 +00:00
ben
6c17e2cfa9 Document EHOSTDOWN error.
PR:		24410
Submitted by:	Martin Horcicka <horcicka@vol.cz>
2001-01-17 21:02:50 +00:00
jedgar
168082bf38 Clarify comments referring to strlcat() usage
Obtained from:	OpenBSD
2001-01-17 20:51:20 +00:00
jedgar
3644801234 - Reverse the order of two loop invariant to ensure strlcat() does not
attempt to read memory when siz is 0
- Clarify comments referring to strlcat() usage

PR:		24278, 24295
Submitted by:	Tony Finch <dot@dotat.at>
		Richard Kettlewell <rjk@greenend.org.uk>
Reviewed by:	-audit
2001-01-17 20:51:16 +00:00
ben
10361fc9ee Merge the documentation for sigsetmask() and sigblock() into a
single manual page, appropriately linked, since this removes the
decision of which page the (previously non-existent) sigmask.2
MLINK should point at.

Submitted by:	will
2001-01-17 19:20:58 +00:00
ru
2b24819cd8 man(7) -> mdoc(7). 2001-01-17 18:26:21 +00:00
ru
49ab0ab564 rstat(1) and rstat_svc(8) are the early versions of
the rup(1) and rpc.rstatd(8) manpages respectively.
2001-01-17 11:50:42 +00:00
rwatson
80d719db5a o When returning NULL, return (NULL) instead of return (0).
Submitted by:	jedgar
Obtained from:	TrustedBSD Project
2001-01-17 02:40:39 +00:00
ben
fc894be9c6 SIGABRT is *not* the same as calling abort(), so don't claim that it is.
(abort() flushes all open stdio streams for one thing.)

PR:		24249
Submitted by:	Edwin Groothuis <mavetju@chello.nl>
2001-01-16 22:25:26 +00:00
ben
184a7583f1 The bit about sigpending not detecting any errors is a lie, it can return
EFAULT.

PR:		24360
Submitted by:	Kenneth Ingham <ingham@i-pi.com>
2001-01-16 21:57:42 +00:00
ru
3d8401c62e Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
ru
0a221c5a50 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
ru
2f5bb304eb man(7) -> mdoc(7). 2001-01-12 13:35:17 +00:00
ru
f0c3b90bc8 man(7) -> mdoc(7). 2001-01-12 09:51:45 +00:00
ru
33b7506ce9 man(7) -> mdoc(7). 2001-01-11 20:07:30 +00:00
ru
8b926faef3 mdoc(7) police: fixed (minor) mdoc bugs introduced in previous revision. 2001-01-10 11:32:04 +00:00
rwatson
0a3118c247 o acl_from_text.c:
- errno is already set to ENOMEM (as appropriate) when asprintf(),
    strdup(), or acl_init() fails
o acl_to_text.c:
  - the return value of the initial strdup() is not checked
  - errno is already set to ENOMEM (as appropriate) when asprintf
    and acl_init() fails
  - let the the default: case use 'goto error_label' for consistency

Submitted by:	jedgar
2001-01-09 05:45:03 +00:00
rwatson
a80aac3d99 o bzero() the ACL structure only if malloc() returns non-NULL.
Submitted by:	jedgar
2001-01-09 05:42:31 +00:00
rwatson
77af9a1a64 o Correct spelling error from patch in previous commit. 2001-01-09 05:40:54 +00:00
rwatson
8b948144e8 o Add missing initialization of errno from error returns of
cap_get_fd(), cap_get_file() and cap_get_proc().

Submitted by:	jedgar
2001-01-09 05:40:10 +00:00
rwatson
b87b91a453 o Make acl_from_text() support uid's and gid's as well as usernames
and groupnames, by adding appropriate support to acl_name_to_id()
  in acl_support.c

Submitted by:	green
2001-01-08 01:28:53 +00:00
jedgar
01950c7ecf Correct check of getgrnam output
Approved by:	rwatson
2001-01-07 21:41:05 +00:00
archie
e85856e946 Fix bugs in the handling of > 8 positional arguments:
- The stack was getting smashed by __grow_type_table()
- reallocf() was being called with the wrong pointer
- The maximum argument number was being incorrectly computed

PR:	misc/23521
2001-01-06 20:48:00 +00:00
alex
e68548a9cc gethostbyname2() is able to lookup AF_INET6.
PR:		23823
Noticed by:	Andrew Arensburger <arensb@ooblick.com>
2001-01-06 12:48:43 +00:00
obrien
6ba3379af0 Fix SCCS id string abuse I introduced. 2001-01-02 09:10:14 +00:00
deischen
62702ce855 Change the interface of getlogin_r to return an int. The former
interface was based on a draft version of POSIX whereas the final
(1996) version of POSIX specified that the error is returned.

While I'm here, fix getlogin_r so that it works for more than just
the first time it's called.

Reviewed by:	wes, wollman (man page)
2001-01-01 13:29:19 +00:00
ben
97e5bd7d4e Make it a bit clearer that asprintf doesn't actually "return" a pointer in
the normal sense of the word, but does it through one of its arguments which
is a pointer to a pointer.

PR:		23717
Submitted by:	phk
2001-01-01 05:19:52 +00:00
green
6277537cb3 Fix a tailq conversion bug that resulted in, e.g., nvi crashing upon
quitting every time.  The way to free a CIRCLEQ was to loop until
the current == current->head, but the way to free a TAILQ is to loop
until current->head == NULL.

In any case, the CORRECT way to do it is a loop of TAILQ_EMPTY() checks
and TAILQ_REMOVE()al of TAILQ_FIRST().  This bug wouldn't have happened
if the loop wasn't hard-coded...

There may be more bugs of this type from the conversion.
2000-12-30 16:10:32 +00:00
phk
6180841d0a Use TAILQ instead of CIRCLEQ. 2000-12-29 20:25:01 +00:00
ru
6378a80ceb Fixed typo not fixed in previous revision. 2000-12-29 14:36:05 +00:00
ru
8ba4187688 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ben
724d26cc9e Link stringlist.3 to sl_{add,find,free,init}.3 2000-12-27 20:00:01 +00:00
nectar
123cf0fb40 Fix mostly harmless typo:
if (data);
            free(data);

Discovered by:	emacs cc-mode
2000-12-17 21:10:41 +00:00
ru
e5a37f2e6f mdoc(7) police: added missing .Os call. 2000-12-14 13:58:15 +00:00
ru
c23c39b3a4 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
obrien
e810645812 #endif should not have a non-comment token after it.
GCC 2.97 (snapshot) complains about this.
2000-12-13 08:59:18 +00:00
rwatson
8ba4e536f8 o Introduce a pile more documentation about capabilities, including
identification and descriptions of most capabilities, current inheritence
  rules, etc.  More to follow.

Reviewed by:	sheldonh
Obtained from:	TrustedBSD Project
2000-12-11 15:25:49 +00:00
ru
278161ed6c mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
deischen
45428979ec Move telldir position recording type definitions and prototypes
to "telldir.h" in order to prevent namespace pollution in
<dirent.h> (which was including <sys/queue.h>).

Add $FreeBSD$ to rewinddir.c and seekdir.c.
2000-12-11 04:00:36 +00:00
obrien
c2ee1dcc02 Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
alex
7aeae74656 strunvis(3) and unvis(3) are the same files. 2000-12-08 12:35:06 +00:00
alex
077cec65af There are four types of encoding now, not three. Most of them use the
backslash as a special char, but not all.
2000-12-08 12:17:53 +00:00
ru
76194e6422 Upgrade to groff 1.16.1. 2000-12-06 11:38:34 +00:00