Commit graph

1258 commits

Author SHA1 Message Date
Doug Ambrisko c26efd485e Switch BUILD_ARCH in Makefile to use uname -p suggested by ru.
Switch strncpy to strlcpy suggested by gad and issue found by pjd.
Add to uname(3) man page describing:
	UNAME_s
	UNAME_r
	UNAME_v
	UNAME_m
Add to getosreldate(3) man page describing:
	OSVERSION

Submitted by:	ru, pjd/gad
Reviewed by:	ru (man pages)
2005-12-03 05:11:07 +00:00
Doug Ambrisko 00bb0c6bdf Unbreak build when I fluff the clean-up of __FBSDID diff reduction
before commit.

pointyhat++
2005-12-02 04:55:05 +00:00
Doug Ambrisko d630a05f40 Add support to easily build FreeBSD unpacked in a chroot of another
FreeBSD machine.  To do this add the man 1 uname changes to __xuname.c
so we can override the settings it reports.  Add OSVERSION override
to getosreldate.  Finally which Makefile.inc1 to use uname -m instead
of  sysctl -n hw.machine_arch to get the arch. type.

With these change you can put a complete FreeBSD OS image into a
chroot set:
	UNAME_s=FreeBSD
	UNAME_r=4.7-RELEASE
	UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE"
	UNAME_m=i386
	UNAME_p=i386
	OSVERSION=470000
on an amd64 or i386 and it just work including building ports and using
pkg_add -r etc.  The caveat for this example is that these patches
have to be applied to FreeBSD 4.7 and the uname(1) changes need to
be merged.  This also addresses issue with libtool.

This is usefull for when a build machine has been trashed for an
old release and we want to do a build on a new machine that FreeBSD
4.7 won't run on ...
2005-12-02 00:50:30 +00:00
John Baldwin 38df04a76d Add MLINK for execvP(3).
PR:		docs/89783
Submitted by:	Andreas Kohn andreas at syndrom23 dot de
MFC after:	3 days
2005-12-01 15:56:05 +00:00
Ruslan Ermilov b0faeb2d42 Make SYNOPSIS compile after imp@'s changes. 2005-11-23 15:44:42 +00:00
Ruslan Ermilov 16a97b8591 Make SYNOPSIS compile. 2005-11-23 15:41:36 +00:00
Daniel Eischen f4fb3299fa Fix a stub function so that is has the correct number of
arguments.  While I'm here, correct a couple of [tab] alignments.

Submitted by:	bland
2005-11-12 16:00:29 +00:00
Stefan Farfeleder c86b3a98fe Make __sem_timedwait() consistent with the sem_timedwait() prototype. 2005-10-18 17:24:03 +00:00
Andrey A. Chernov 323d07b497 Just by allocating size*2 bytes we can't be sure that new size will be enough,
so change two
	if (size not enough) {
		reallocf(size*2);
	}
into
	while (size not enough) {
		reallocf(size*2);
	}
2005-09-18 17:50:58 +00:00
Andrey A. Chernov b9fb13f573 Cosmetic fixes to prev. commit.
Change first MAXPATHLEN to more standard PATH_MAX
Change second MAXPATHLEN to 1024 (it is temp buffer not related)
Change comment to reflect that.

Suggested by:   bde
2005-09-15 17:25:52 +00:00
Andrey A. Chernov dedaf3ca1f Remove any hardcoded assumptions about malloc's way of allocating,
just use MAXPATHLEN. It prevents potential buffer overflow with other
malloc implementations.
(this change based on submitted patch)

PR:             86135
Submitted by:   Trevor Blackwell <tlb@tlb.org>
2005-09-14 20:35:46 +00:00
Andrey A. Chernov 369316a848 Don't reuse *pl to skip [], it is already used for {} parts in the loop above
(submitted patch slightly modified)

PR:             86038
Submitted by:   Gerd Rausch <gerd@juniper.net>
2005-09-14 19:14:32 +00:00
Stefan Farfeleder 613100918d Include a couple of headers to ensure consistency between the prototype and
the function definition.
2005-09-12 19:52:42 +00:00
Stefan Farfeleder 35a4bf1ce0 Add an MLINK for devname_r(). 2005-09-10 14:09:37 +00:00
Stefan Farfeleder d8f77b4529 Include <sys/types.h> and <limits.h> ourselves, don't assume they are included
through <pthread.h>.

gen/sem.c:		Prerequisite for <_semaphore.h>
net/getprotoent.c:	USHRT_MAX
net/getservent.c:	USHRT_MAX
stdio/ungetwc.c:	MB_LEN_MAX
stdio/vfwscanf.c:	MB_LEN_MAX
2005-08-20 07:59:13 +00:00
Simon L. B. Nielsen 05fe2c1cb6 Add missing links from getgrent_r.3, getgrnam_r.3, and getgrgid_r.3 to
getgrent.3.

Submitted by:	Ulf Lilleengen <lulf@kerneled.org>
MFC after:	3 days
2005-08-12 22:46:15 +00:00
Daniel Eischen ed0b0abcf7 Make syslog() use the internal (non-cancellation point) _usleep().
Prior to this it was calling the cancellable usleep() while holding
a lock.
2005-08-03 00:45:58 +00:00
Daniel Eischen 8450917472 Make usleep() overridable by the thread libraries so they can provide
cancellation points.

Noticed by:	phk
2005-08-03 00:44:25 +00:00
Matthew N. Dodd 50007d443b Move initialization above point of first possible reference to
avoid overwriting ty_status values set from the 'type' field.

Previously TTY_DIALUP and TTY_NETWORK flags did not match
specified type.
2005-07-25 17:57:15 +00:00
Jonathan Chen c5a096e0e0 fix innetgr() returning false positives and negatives when reverse netgroup
matching is used.

PR: 35506
MFC after: 3 days
2005-07-22 22:20:26 +00:00
Robert Watson 7a6d1e6f69 Cross-reference sem_getvalue(3) from several other semaphore-related
functions.

MFC after:	3 days
2005-07-13 13:15:22 +00:00
Ruslan Ermilov f789cb8293 Assorted markup fixes.
Approved by:	re
2005-06-15 19:04:04 +00:00
Ruslan Ermilov d3b3ec17a8 When IPC_NOWAIT is set and there is no message, msgrcv() fails
with errno set to ENOMSG.

PR:		docs/82217
Submitted by:	delphij
Approved by:	re (blanket)
2005-06-14 10:56:02 +00:00
Hajimu UMEMOTO 77cf61aeb0 reduce strlen() call. 2005-05-20 15:39:20 +00:00
Hajimu UMEMOTO 8a4d3d8400 use reentrant.h and simplify. 2005-05-20 15:17:08 +00:00
Hajimu UMEMOTO 532e65b886 check return value of ttyname_r(). 2005-05-20 14:59:20 +00:00
Hajimu UMEMOTO db297254fe ttyname_r() didn't pass correct buffer size to devname_r(). 2005-05-20 14:56:55 +00:00
Xin LI 68b749ff2f Revert to old ttyname_r behavior that when _ioctl() returns 0 (SUCCEEDED),
return the buffer immediately.  This will permit ssh and/or PAM logins
broken by previous commit.

The (potential) underlying problem is still under investigation.

Point hat to:	me
2005-05-14 14:03:21 +00:00
Xin LI 8dcb56dc78 Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightly
different from what has been offered in libc_r (the one spotted in the
original PR which is found in libthr has already been removed by David's
commit, which is rev. 1.44 of lib/libthr/thread/thr_private.h):
	- Use POSIX standard prototype for ttyname_r, which is,
		int ttyname_r(int, char *, size_t);
	  Instead of:
	  	char *ttyname_r(int, char *, size_t);
	  This is to conform IEEE Std 1003.1, 2004 Edition [1].
	- Since we need to use standard errno for return code, include
	  errno.h in ttyname.c
	- Update ttyname(3) implementation according to reflect the API
	  change.
	- Document new ttyname_r(3) behavior
	- Since we already make use of a thread local storage for
	  ttyname(3), remove the BUGS section.
	- Remove conflicting ttyname_r related declarations found in libc_r.

Hopefully this change should not have changed the API/ABI, as the ttyname_r
symbol was never introduced before the last unistd.h change which happens a
couple of days before.

[1] http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html

Requested by:	Tom McLaughlin <tmclaugh sdf lonestar org>
Through PR:	threads/76938
Patched by:	Craig Rodrigues <rodrigc crodrigues org> (with minor changes)
Prompted by:	mezz@
2005-05-13 16:27:30 +00:00
Xin LI f73fd5bd75 Connect MLINKS for ttyname_r(3), and add prototype into unistd.h. 2005-05-11 14:07:25 +00:00
Xin LI 603c9c1dc5 Cleanup for getgrouplist(3):
- Use /*- instead of /* for copyright section
 - Include unistd.h for prototype of it
 - Sort and separate includes as described in style(9)
 - ANSIfy the function defination
 - Use const for the traversing iterator
2005-05-03 16:20:03 +00:00
Xin LI 2f22da5d97 Include paths.h for prototype of getbootfile(3). 2005-05-03 15:28:07 +00:00
David Schultz fe769cdd95 Add a sysctl that returns the full path of a process' text file.
This information is needed by things like `gdb -p' and Sun's javac,
and previously it could only be obtained via procfs
2005-04-18 02:10:37 +00:00
Stefan Farfeleder cf00abe993 Remove unused variables and assignments. 2005-04-08 21:24:23 +00:00
Stefan Farfeleder fd42c4d829 Use prototypes in the function definitions. 2005-04-08 21:15:38 +00:00
David Schultz 5e9b87a863 Add some missing errnos from POSIX. Nothing in FreeBSD generates
these at the moment, but applications that test for them will now
have a better chance of compiling.

I have intentionally omitted errnos that are only good for STREAMS,
since apps that use STREAMS won't compile anyway.  The exception is
EPROTO, which was apparently intended for STREAMS, but worth having
anyway because Linux (mis)uses it for other things.
2005-04-02 12:33:28 +00:00
David Xu 26896bda48 Use __weak_reference macro to define weak symbols. 2005-03-21 13:17:16 +00:00
David Schultz 3edb8f412f Teach fmtcheck() about the ' (thousands separator) flag. 2005-03-21 08:00:55 +00:00
Poul-Henning Kamp 9a9ef8b65a Have ttyname_r() try to ask DEVFS for the device name.
Document ttyname_r().

Simplify threaded/unthreaded stuff a lot.
2005-03-08 21:35:52 +00:00
Poul-Henning Kamp 008aca9807 Make the returnvalue of times(3) insensitive to changes in wall-clock.
PR:	78537
2005-03-08 08:12:35 +00:00
David Schultz b3bc33db36 Add manpage links for frexpf, frexpl, ldexpf, and ldexpl. 2005-03-07 05:01:04 +00:00
David Schultz a8af59b5f7 Document frexpl and ldexpl. 2005-03-07 05:00:54 +00:00
David Xu 96a9329375 Fix incorrect comment. 2005-03-01 23:42:00 +00:00
David Xu 17ceb495f0 Mark _rtld_allocate_tls and _rtld_free_tls as weak symbols for Variant I
tls.

Reviewed by: dfr
2005-02-26 10:39:49 +00:00
Tom Rhodes 0e5d513b50 Add an EXAMPLES section[1], quote Nd, and bump doc date.
PR:		53621 [1]
Submitted by:	Faried Nawaz <fn@hungry.com> [1]
2005-02-23 02:02:38 +00:00
Ruslan Ermilov 36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov 0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov 6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
David Schultz f154b03b25 Update my email address. 2005-02-06 03:23:31 +00:00
David Schultz 29bf6af890 - Move the functions presently described in in ieee(3) to their own
manpages.  They are not very related, so separating them makes it
  easier to add meaningful cross-references and extend some of the
  descriptions.
- Move the part of math(3) that discusses IEEE 754 to the ieee(3)
  manpage.
2005-01-27 05:46:17 +00:00