Commit Graph

5590 Commits

Author SHA1 Message Date
bms
9dc2491bfe Document the AF_LINK extension which was imported from NetBSD. 2007-02-28 21:28:33 +00:00
bms
0738a9d791 Nuke ascii2addr() and addr2ascii(). They have no consumers anywhere
in FreeBSD, and originated from INRIA IPv6.

Stub out netstat reference to addr2ascii() I mistakenly introduced.
Update misleading man page sections.

Merge NetBSD's getnameinfo() AF_LINK extensions for a portable way to
print link-layer addresses given a sockaddr_dl(), minus the IEEE 1394
bits which don't map directly to our code.

Obtained from:	NetBSD (getnameinfo.c)
Discussed on:	current (March 2006)
2007-02-28 21:18:38 +00:00
rrs
dfdc42503b Fix include declaration it was sys/sctp.h should be netinet/sctp.h,
reported by pluknet@gmail.com.
2007-02-26 12:23:32 +00:00
kientzle
3de91924d2 Move _posix1e_acl_name_to_id out of acl_support.c and into
acl_from_text.c.  Since acl_from_text.c is the only place it
is used, we can now make this internal utility function "static."

As a bonus, acl_set_fd() no longer pulls in getpwuid() for no reason.

MFC after: 7 days
2007-02-26 02:07:02 +00:00
kientzle
76658c2a7d Don't assert() the TLS allocation requested is big enough; just
fix the argument.

In particular, this is a step towards breaking crt1's dependence on stdio.
2007-02-25 21:23:50 +00:00
jasone
a1e21ebd26 Modify chunk_alloc() to prefer mmap()ed memory over sbrk()ed memory.
This has no impact unless USE_BRK is defined (32-bit platforms), in
which case user allocations are allocated via mmap() if at all possible,
in order to avoid the possibility of unreclaimable chunks in the data
segment.

Fix an obscure bug in base_alloc() that could have allowed undefined
behavior if an application were to use sbrk() in conjunction with a
USE_BRK-enabled malloc.
2007-02-22 19:10:30 +00:00
rrs
d7423f55fb Fixes build breakage.. invalid type casts.. and invalid
type for size in one place.
2007-02-22 14:48:12 +00:00
rrs
ae6663525a First cut of the sctp man pages. Still need work. 2007-02-22 14:32:39 +00:00
rrs
5a82d02989 Fixes __FreeBSD__ being present (they should not)
and also trailing garbage on undef of magic numbers.
2007-02-22 13:39:57 +00:00
rrs
d35264cb57 Adds a performance improvement for when sctp_sendx is
called with only one address, we then can call the
generic system call. Also fixes some socket api
type issues and cleans up the "magic" numbers that
were being used in the code.

Reviewed by:	gnn
2007-02-22 12:42:43 +00:00
trhodes
2595ba05eb Fix mis-reference of incorrect manual page in ERRORS section.
Noticed by:	Harlan Stenn <stenn@ntp.isc.org>
2007-02-17 01:54:00 +00:00
brueffer
f099a37e0b New sentence -> new line. While here, fix apostrophe abuse. 2007-02-14 07:38:39 +00:00
julian
98dbc79e89 Change the date. 2007-02-13 23:06:39 +00:00
julian
8ba81b8705 Make the kse man page reflect the removal of the KSEGRP kernel abstraction. 2007-02-13 23:02:15 +00:00
maxim
bcd0823d3d o s/cgetseq/cgetset/
Obtained from:	DragonFly
2007-02-11 18:14:49 +00:00
mpp
6236fe8975 Docment the acceptable values for the id parameter. 2007-02-01 02:31:02 +00:00
jasone
5918b89319 Fix a utrace(2)-related bug in calloc(3).
Integrate various pedantic cleanups.

Submitted by:	Andrew Doran <ad@netbsd.org>
2007-01-31 22:54:19 +00:00
peter
966f210e87 Remove getobjformat() from libc's symbol map. It probably should have been
in the private area anyway.  Nothing in FreeBSD uses it any more anyway.
2007-01-25 22:36:36 +00:00
peter
2718f9e8cb Retire more remnants of a.out support, as threatened in 2002.
Laughed-at-by:  kris
2007-01-25 22:25:59 +00:00
bms
df992b84fc Docuemnt exactly which functions access which NSS databases.
Point out that FreeBSD libc has compat stubs for GNU glibc NSS
modules which access NSDB_PASSWD/NSDB_GROUP, but not NSDB_HOSTS;
based on painful experience porting nss_mdns.

Reviewed by:	ru
2007-01-22 11:45:25 +00:00
maxim
202535955d o Remove duplicate includes.
Obtained from:	Slava Semushin via NetBSD
2007-01-20 08:24:02 +00:00
imp
4e9ace58c2 On FreeBSD/arm, any value > 50 bits will result in a rediculously huge
number being returned for mktime and timegm calls.  Choose 48 because
that works well.  This does reduce the dynamic range of tm_year from
about 2 billion years down to "only" about 9 million years.  Please
contact me if this restriction poses a problem.

Due to the complexity of the code, I admit that I didn't trace down
what, exactly, was overflowing with longer bits.  This fixes software
that we run on the embedded systems we have.
2007-01-19 01:16:35 +00:00
pjd
39f3fe7daf When we try to set set-gid bit with chmod(2) on a file, which we own, but our
effective group ID (and any of our group) doesn't match the group ID of the
file, we get EPERM.  This doesn't conform POSIX. POSIX requires that we should
return 0, but silently clear the set-gid bit.
2007-01-16 15:17:27 +00:00
imp
bfba87044e Remove 3rd clause, renumber, ok per email 2007-01-12 07:31:30 +00:00
maxim
fd81dffb5c o Document SO_TIMESTAMP and SO_BINSTAMP socket options.
PR:		docs/107696
Submitted by:	Rob Robertson
Reviewed by:	ru
Obtained from:	NetBSD (mostly)
MFC after:	1 week
2007-01-11 18:45:41 +00:00
imp
375cfaed03 Remove silly n that crept in 2007-01-09 00:38:24 +00:00
imp
cd1f140ae4 Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
pjd
c3ed4409e6 Be more specific in ENXIO description:
- O_NONBLOCK flag has to be set, if it is not set, open(2) will wait for
  another process opening the fifo for reading,
- Use O_WRONLY which implies that the file has to be opened _only_ for write.
2007-01-07 23:06:53 +00:00
pjd
78c4023bc4 open(2) returns EROFS when O_CREAT is specified and the named file would
reside on a read-only file system.
2007-01-07 23:01:32 +00:00
pjd
ef0342d7a8 - POSIX mentions that EACCES can be returned when O_TRUNC is specified
separately. Do the same.
- Document when EPERM can be returned.
2007-01-07 17:55:19 +00:00
pjd
39a9779535 Prefer "to be modified" over "to be opened for writing".
This is quite tricky situation, because we allow to open a file with
O_RDONLY|O_TRUNC. O_TRUNC modifies a file, but we actually don't open
it for writing. EISDIR is also returned when we try to open a directory
O_RDONLY|O_TRUNC, which is correct.
POSIX says that "The result of using O_TRUNC with O_RDONLY is undefined.",
we choose to accept it (Solaris did the same), that's why "to be modified"
seems more accurate to me.
2007-01-07 17:32:16 +00:00
das
24a4f9a492 Handle inf/nan correctly. 2007-01-06 21:50:04 +00:00
das
04ab9d0942 The distinction between quiet and signaling NaN formats is
machine-dependent; these files tell the latest version of gdtoa
what to do.
2007-01-03 05:00:03 +00:00
das
59fd405588 Fix rounding of 0xf for hex fp formats.
PR:	90333
2007-01-03 04:57:58 +00:00
simon
df927be246 Bump modification date for last update. 2006-12-28 17:15:21 +00:00
simon
86e98cb2fb Catch up struct cmsghdr and struct msghdr in the manual page with the
actual structures in socket.h (which were updated 7 years ago).

MFC after:	1 week
2006-12-28 17:10:23 +00:00
marius
7bebf7360d Fix a typo in __fpu_ftox() that caused long double to long (and long long)
conversion of negative numbers to always result in -1.
While at it, rearrange the nearby comment so it fits in 80 chars per line,
like the rest of this file does.

PR:		107130
MFC after:	1 day
2006-12-24 22:24:39 +00:00
jasone
9667303e99 Implement chunk allocation/deallocation hysteresis by caching one spare
chunk per arena, rather than immediately deallocating all unused chunks.
This fixes a potential performance issue when allocating/deallocating
an object of size (4kB..1MB] in a loop.

Reported by:	davidxu
2006-12-23 00:18:51 +00:00
jmg
406c54c0f9 add a missing the...
MFC after:	3 days
2006-12-19 20:20:39 +00:00
rodrigc
0ce5d91ed1 Consistently use a socklen_t type where required, and eliminate
GCC warning "dereferencing type-punned pointer will
break strict-aliasing rules".

Reviewed by:	rrs
2006-12-16 06:03:43 +00:00
ume
705f242eca Merge BIND9 9.3.3 into main chunk.
Obtained from:	ISC
MFC after:	1 week
2006-12-15 20:59:55 +00:00
ume
89a3ca4811 Vendor import of BIND 9.3.3 2006-12-15 20:49:44 +00:00
ume
bf42d1f92c This commit was generated by cvs2svn to compensate for changes in r165254,
which included commits to RCS files with non-trunk default branches.
2006-12-15 20:49:44 +00:00
pjd
6e9534365d chflags(2) returns EPERM when user tries to set or remove the SF_SNAPSHOT flag. 2006-12-15 19:23:27 +00:00
rrs
45136271b2 This adds the "system calls"
sctp_getaddrlen()
 sctp_connectx()
 sctp_bindx()
 sctp_opt_info()
 sctp_getpaddrs()
 sctp_freepaddrs()
 sctp_getladdrs()
 sctp_freeladdrs()
 sctp_sendmsg()
 sctp_getassocid()
 sctp_send()
 sctp_sendx()
 sctp_sendmsgx()
 sctp_recvmsg()
 sctp_peeloff()

Manual pages will be forthcoming (and the commit to porters-handbook)
2006-12-15 12:01:50 +00:00
imp
7cc2522d0a band-aide until _SC_PHYS_PAGES actually is defined 2006-12-14 22:14:14 +00:00
pjd
fbddb38d93 Add support for _SC_PHYS_PAGES, which is not standard, but can be found in
Solaris and Linux.
2006-12-14 14:32:59 +00:00
pjd
1080ddcf3f Document _SC_PAGESIZE. There are still 85 undocumented variables.
Obtained from:	NetBSD
2006-12-14 14:27:15 +00:00
pjd
8ce2a07776 - truncate(2) returns EFBIG if the length argument was greater than the
maximum file size.
- truncate(2) returns EINVAL if the length argument was less than 0.
2006-12-13 22:51:23 +00:00
pjd
481eab3722 Append-only flag also denies chown(2). 2006-12-13 22:17:58 +00:00
pjd
235da7c5d9 Much more correct EFTYPE description. 2006-12-13 13:46:01 +00:00
pjd
575c21f380 Better wording. 2006-12-13 13:26:32 +00:00
pjd
d6502b0c19 Append-only flag also denies chmod(2). Is this correct behaviour? 2006-12-13 13:22:57 +00:00
pjd
05020e0446 Be more precise with EPERM description. When chown(2) is a no-op, it will
return 0.
2006-12-13 11:46:38 +00:00
pjd
22da39b273 Write permission if of course only needed for the parent directory of
the object beeing created.

Pointed out by:	bde
2006-12-13 11:26:03 +00:00
pjd
b095a4d2ba mkfifo(2) returns EACCES when write permission is denied for a component of
the path prefix.
2006-12-13 09:58:49 +00:00
pjd
35794d75f2 Be more specific when ELOOP can be returned. 2006-12-12 20:06:52 +00:00
pjd
b94e298b13 symlink(2) return EACCES if a component of the name2 path prefix denies
write permission.
2006-12-12 20:05:04 +00:00
pjd
29ffd27401 Correct ENOENT description. 2006-12-12 19:57:17 +00:00
pjd
024a6b9fb4 The 'name1' argument to symlink(2) is only limited to 1023 characters,
its components are not checked.
2006-12-12 19:48:15 +00:00
pjd
96e0c4dbe7 mkdir(2) creates directory, not file. 2006-12-12 15:00:08 +00:00
julian
dc3e4a0741 Remove reference to confusing behaviour just removed from
the kse_exit() syscall. Describe the correct behaviour.
2006-12-12 08:13:02 +00:00
pjd
291ec8d867 When directory is given as an argument for unlink(2), EPERM is returned
not matter if this is regular directory or a mount point.
2006-12-10 13:04:36 +00:00
pjd
c3cd93f756 If the named file has its immutable or append-only flag set, utimes(2)
returns EPERM.
2006-12-09 23:13:05 +00:00
pjd
516c13f08d If the parent directory of the named file has its immutable flag set,
mkfifo(2) returns EPERM.
2006-12-09 23:06:01 +00:00
pjd
827d52e622 If the parent directory of the destination file has its immutable flag set,
symlink(2) returns EPERM.
2006-12-09 23:01:38 +00:00
pjd
8a2099c5a1 - If the source file has its immutable or append-only flag set, link(2)
returns EPERM.
- If the parent directory of the destination file has its immutable flag set,
  link(2) returns EPERM.
2006-12-09 22:56:40 +00:00
pjd
5785bcc5bc If the named file has its immutable or append-only flag set, truncate(2)
and ftruncate(2) return EPERM.

Note, that if the append-only flag is set even increasing size of the file
is not permitted.
2006-12-09 22:49:28 +00:00
pjd
6f1b6d133c If the named file has its immutable flag set, chown(2) returns EPERM. 2006-12-09 22:41:26 +00:00
pjd
3d3c519dec If the named file has its immutable flag set, chmod(2) returns EPERM. 2006-12-09 22:41:01 +00:00
pjd
c995b500b2 Add reference to chflags(2). 2006-12-09 22:39:28 +00:00
pjd
c7ad47675e If the parent directory of the named file has its immutable flag set,
mkdir(2) returns EPERM.
2006-12-09 22:35:55 +00:00
pjd
1960fa1f5d - If the directory to be removed has its immutable, undeletable or append-only
flag set, rmdir(2) returns EPERM.
- If the parent directory of the directory to be removed has its immutable or
  append-only flag set, rmdir(2) returns EPERM.
2006-12-09 19:44:38 +00:00
pjd
94128f1de1 - If the parent directory of the file pointed at by the from argument has its
immutable or append-only flag set, rename(2) returns EPERM.
- If the parent directory of the file pointed at by the to argument has its
  immutable flag set, rename(2) returns EPERM.
2006-12-09 19:42:58 +00:00
pjd
991a488b1d Correct last commit. The parent directory of the file to be removed can
have undeletable flag set.
2006-12-09 19:40:24 +00:00
pjd
bb93464d9e When immutable, undeletable or append-only flag is set, rename(2)
return EPERM.
2006-12-09 19:19:46 +00:00
pjd
35ec935f3b When undeletable flag is set, unlink(2) return EPERM. 2006-12-09 19:18:39 +00:00
ru
f1573baff3 Grammar.
OK'ed by:	sam
2006-12-04 20:34:25 +00:00
sam
6f9b2bd1bc document recent change to return ECONNRESET for tcp sockets
MFC after:	1 month
2006-12-04 18:39:11 +00:00
ume
6c74892876 Use _kevent() instead of kevent().
Requested by:	nork
2006-12-04 17:08:43 +00:00
dds
782cf0f37f Minor clarification. 2006-12-03 19:26:17 +00:00
maxim
520a9a218b o As POSIX requires confstr(3) returns zero on errors, not -1.
PR:		misc/106234
Submitted by:	Guy Harris
MFC after:	1 week
2006-12-03 08:22:36 +00:00
yar
3caf2aa43d Note that, thanks to the work by Alan Cox et al, some arch'es
don't need sendfile() buffers any more.

The report on the work referenced can be found at
http://usenix.org/events/usenix05/tech/general/elmeleegy.html

MFC after:	1 week
2006-11-24 11:44:19 +00:00
jhb
aacfa06ebd Document that the data field for NOTE_EXIT holds the process exit status.
Submitted by:	Jared Yanovich -phirerunner at comcast.net-
MFC after:	2 weeks
2006-11-20 22:20:04 +00:00
trhodes
a5378c36b6 Add an entry for PT_GETLWPLIST.
Nudged by:	jhb
Reviewed by:	davidxu
2006-11-09 11:27:18 +00:00
cognet
93ee84a578 Cleanup: we always have to use __error() now, and we shouldn't provide a
errno symbol, so completely remove the !_REENTRANT case.

Spotted out by:	ru
2006-11-09 01:28:16 +00:00
ru
adde7c231a Remove a forgotten file. 2006-11-08 21:29:20 +00:00
cognet
367bc6b8e0 Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by:	bde
2006-11-06 22:07:47 +00:00
cognet
55a9fb22cc Provide definitions suitable for arm big-endian. 2006-11-06 20:49:23 +00:00
rwatson
ef1d02698e Remove sys/uio.h include -- this is no longer required by the extattr
system call API.

MFC after:	3 weeks
2006-11-06 15:12:43 +00:00
lawrance
20a2ef67d2 Document return values for res_query and res_search.
h_errno is not an extern int, just a macro providing an integer lvalue.

PR:		doc/50573
Submitted by:	Ronald F.Guilmette <rfg@monkeys.com>
Reviewed by:	trhodes
MFC after:	3 days
2006-11-04 09:42:22 +00:00
danger
b5fdd84df7 - clock_gettime is in time.h instead of sys/time.h
Approved by: trhodes (mentor), keramida (mentor)
PR: docs/104707
MFC-after: 3 days
2006-11-04 09:35:36 +00:00
kmacy
73954d8d22 - change ABI for user trap handler for sun4v (eventually will sync sparc64 no
hardware set up to test at the moment)

Approved by: scottl (standing in for mentor rwatson)
2006-11-03 23:43:18 +00:00
ru
6332347a51 Replace the SEE ALSO xrefs with a more reasonable set stolen from POSIX. 2006-11-02 14:10:56 +00:00
pjd
1f52d4e246 Document MNT_GJOURNAL option. 2006-11-01 23:40:44 +00:00
bde
fd31361d3d Backed out rev.1.10 (a special case for amd64). The amd64 mcount code
never needed any frame pointers for itself.
2006-10-28 13:34:35 +00:00
ru
e80cd771cb Add missing markup bits.
Submitted by:	Emil Mikulic
2006-10-28 13:05:10 +00:00
ume
89159bd1c6 Merge res_send.c of BIND9 9.3.3rc2 into main chunk. It includes
following fix:

	Retransmission timeouts should be based on which attempt
	it is to the nameserver and not the nameserver itself.

Obtained from:	ISC
MFC after:	3 days
2006-10-24 14:41:43 +00:00
ume
abf24ba802 Import of BIND 9.3.3rc2 2006-10-24 14:25:49 +00:00
kib
e6083a98d8 Revert the rev. 1.4, it causes breakage on most arches except i386.
Remove the const qualifier from ap argument for __v2printf, that induced
that breakage, and seems to be the real reason for bad code. ap is modified
inside the __v2printf body by va_arg macro.

Pointy hat to:	kib
Approved by:	pjd (mentor)
2006-10-23 07:25:25 +00:00
simon
16797e6408 Minor markup fix: A comma should be seperated by space from macro
argument.  This resulted in "pwritev,()" instead of the intended
"pwritev()," in the output.

MFC after:	3 days
2006-10-21 20:36:50 +00:00
ru
85a0824042 Avoid a potential hard sentence break. 2006-10-21 18:03:53 +00:00
kib
3c7ee268c4 Workaround for (what seems to be) compiler error for gcc 3.4.6. On
i386 with default optimization level (-O2), va_list pointer ap in the
__v2printf function is advanced before the use. That cause argument
shift and garbage instead last argument in printf-family when xprintf is
activated.

The nsswitch is easy victim of the bug.

Reviewed by:	kan
Approved by:	kan (mentor)
MFC after:	1 week
2006-10-21 11:49:07 +00:00
ache
9a7ddac59a file == NULL:
Issue __sflush() before possible setting O_APPEND mode or ftruncate(),
write to wrong place may occurse oserwise.
Use simplified _sseek() to the start, if no O_APPEND is set, instead
of _fseeko() (_sseek() to the end, if O_APPEND, occurse later, as for
file != NULL).
Don't check seek error return, as original fopen() and freopen() never
does.

file != NULL:
Add missing _sseek() to the end.
2006-10-16 14:31:56 +00:00
ache
98e47524e9 Honor errno obtained from __sflags
Move errno restoring after FUNLOCKFILE in one case
2006-10-16 09:57:15 +00:00
ache
5b6b5391fa Back out ftruncate error handling. There can some file tipes
f.e. sockets when ftruncate normally fail.
2006-10-16 09:39:15 +00:00
ache
ce03393cc5 Do real seek
Catch ftruncate errors

PR:             104295
Submitted by:   ru (seek)
2006-10-15 16:24:31 +00:00
ru
113e32ee73 Forgot to bump the document date. 2006-10-13 20:34:44 +00:00
ru
b942ce05ed Some word smithing adopted from the PR.
PR:		docs/54451
Originally by:	Andreas Fuchs
Adopted by:	jhb
MFC after:	3 days
2006-10-13 20:28:58 +00:00
ru
89970b0707 Add missing comma. 2006-10-13 16:11:12 +00:00
ru
1db31f4d88 Use normal parentheses.
PR:		docs/84549
Submitted by:	Gary W. Swearingen
MFC after:	3 days
2006-10-12 20:50:26 +00:00
ru
d510dd202f Don't say "rightmost" when referring to the least significant bit.
PR:		docs/94803
MFC after:	3 days
2006-10-12 15:08:41 +00:00
ru
6cd9b8b511 More accurately document the implementation details of internal storage.
PR:		docs/82508
2006-10-12 14:31:17 +00:00
ru
edfb232c7d Link select(2) to FD_CLR(3), FD_ISSET(3), FD_SET(3), and FD_ZERO(3).
PR:		docs/57974
MFC after:	3 days
2006-10-12 13:46:33 +00:00
ru
f31ae74951 Document S_IRWXU and permission bits for group/other.
PR:		docs/57153
MFC after:	3 days
2006-10-12 13:35:07 +00:00
ru
dc9cd76103 Document what "msgsz" argument really denotes. [1]
Don't say that "msgsz" can be less than 0, it cannot
as it's unsigned (POSIX has the same bug).

PR:		docs/101145 [1]
MFC after:	3 days
2006-10-12 11:42:41 +00:00
trhodes
784213457b Note that the value from getenv() should not be modified by applications.
PR:		60544
Reviewed by:	ru
2006-10-12 08:39:24 +00:00
kmacy
ad9b4ceef9 fix bus error in newsyslog by making sure that fields in struct fpemu
that are accessed as 8 byte quantities are 8 byte aligned
2006-10-12 04:38:41 +00:00
maxim
6a25457482 o Follow the trend and try to explain what the slow device is.
Not ideal but better than nothing.

Obtained from:	OpenBSD, NetBSD
2006-10-11 13:33:02 +00:00
maxim
f4bd36942d o From kern_prot.c::p_cansignal():
UNIX signalling semantics require that processes in the same
session always be able to deliver SIGCONT to one another,
overriding the remaining protections.

Fix SIGCONT special case description similar to rev. 1.22 kill.2.

PR:		docs/58710
Submitted by:	Ryan Younce
MFC after:	2 weeks
2006-10-10 11:37:41 +00:00
kmacy
3785d22822 Fix TLS on sparc64 for statically and dynamically linked binaries
Approved by: rwatson (mentor)
Reviewed by: jmg and marcel
2006-10-08 02:50:34 +00:00
trhodes
1f27dd98e0 getenv.3: Put "is" on a line with other words
getobjformat.3: "takes precedence over" is not an envrionment variable.

PR:		75545
Submitted by:	n-kogane@syd.odn.ne.jp
MFC after:	3 days
2006-10-07 21:27:21 +00:00
trhodes
a906aad1ec Reword previous delta a little bit.
Submitted by:	ru
2006-10-07 10:49:20 +00:00
trhodes
57665efa96 Fix ambiguity in description. Note that the aio_return() system call should
only be called once after failure or completion of an AIO request.  Bump doc
date while I'm here.

Noticed by:	Samy Al Bahra
2006-10-07 05:34:51 +00:00
trhodes
d96e9c3643 Add missing word "returns."
Noticed by:	Samy Al Bahra
2006-10-07 05:13:32 +00:00
ache
152e82b738 Automatically re-stir every 400000 calls
Obtained from:  OpenBSD
2006-10-04 01:17:23 +00:00
ru
81bed6b884 Revise markup in recently added manpages. 2006-09-30 10:34:13 +00:00
ru
1da895d121 Fix markup, language, function prototype, and example code. 2006-09-30 10:24:00 +00:00
ru
930749d9ee Markup nit. 2006-09-29 22:57:22 +00:00
vd
2fdf351700 Fix typo
PR:		docs/103666
Submitted by:	vd
Approved by:	maxim
2006-09-26 09:47:46 +00:00
ache
b8fd741213 Keep compatible parts in sync with OpenBSD v1.21, add some comments.
No functional changes.
2006-09-23 14:48:31 +00:00
ache
b4df5c3aa1 Remove code #ifndef'ed in prev. commit to stay in sync with OpenBSD
v1.21 which just do that.
2006-09-22 18:59:03 +00:00
ache
eb7bc007cc Be more GNU compatible:
don't be greedy on the GNU "::" extension when arg separated by whitespace
and POSIX_CORRECTLY is set. From POSIX point of view this is unclear
situation, so minimal assumption looks right.
2006-09-22 17:01:38 +00:00
kan
5f08ee5bca Do not declare __evOptMonoTime static in one place and extern
in another. GCC4 does not like that.
2006-09-22 01:52:26 +00:00
kan
ac7b520bb5 Use correct type in va_arg argument. 2006-09-21 14:40:20 +00:00
davidxu
8f17739963 remove thr_getscheduler, thr_setscheduler, thr_setschedparam,
add rtprio_thread.
2006-09-21 04:22:46 +00:00
maxim
93ed40a8c9 o Don't fseek() on closed file.
Submitted by:	pgollucci@p6m7g8.com, Mark Costlow
MFC after:	3 weeks
2006-09-18 09:34:48 +00:00
ru
f4eec08060 Markup fixes. 2006-09-17 21:27:35 +00:00
ru
b4db035948 Remove more traces of Alpha. 2006-09-17 20:53:30 +00:00
joel
4d276cbac6 Remove reference to T/TCP.
Reviewed by:	andre
2006-09-13 19:48:00 +00:00
brian
c4fc7dad18 Fix a typo 2006-09-10 20:41:33 +00:00
mbr
283bae6f03 Sync with NetBSD rev. 1.16 + 1.17
Coverity CID 2292: Plug memory leak.
Coverity CID 2291: Move function call before allocating storage to prevent
memory leak on error.

MFC after:    1 month
2006-09-09 22:33:21 +00:00
mbr
958b62e8da Sync with NetBSD rev. 1.29
Coverity CID 2293: Fix memory leak.

MFC after:	1 month
2006-09-09 22:32:07 +00:00
mbr
5fb3f2afad Sync with NetBSD rev. 1.6 + 1.7
Coverity CID 779 + 780: Avoid NULL pointer dereference.

MFC after:    1 month
2006-09-09 22:29:16 +00:00
mbr
f5fc251a25 Sync with NetBSD rev. 1.20 + 1.21
Coverity CID 2284: Fix multiple memory leaks.
Coverity CID 710: Remove unreachable code.

MFC after:    1 month
2006-09-09 22:26:47 +00:00
mbr
a71d32ed3c Sync with NetBSD rev. 1.10
Coverity CID 2276: Don't leak memory on error.

MFC after:    1 month
2006-09-09 22:22:39 +00:00
mbr
cbf797decd Sync with NetBSD rev. 1.15
Coverity CID 2275: Avoid memory leak on error.

MFC after:    1 month
2006-09-09 22:21:15 +00:00
mbr
a197a4c83b Sync part of NetBSD rev. 1.14
Fix unpaired sigblock which possibly leaves the process with all
signals blocked.

MFC after:	2 weeks
2006-09-09 22:18:57 +00:00
mbr
bc9ee76c28 Sync with NetBSD rev. 1.16 + 1.17
Coverity CID 3651: Don't leak ifaddrs on getaddrinfo failure.
Coverity CID 2283: Don't leak sys_auth on error.

MFC after:    1 month
2006-09-09 22:14:42 +00:00
jasone
ce0ab81797 Change the way base allocation is done for internal malloc data
structures, in order to avoid the possibility of attempted recursive
lock acquisition for chunks_mtx.

Reported by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
2006-09-08 17:52:15 +00:00
ru
cb0ad18d63 alloca() cannot check if the allocation is valid; mention the consequences.
Obtained from:	OpenBSD
2006-09-05 16:30:11 +00:00
ru
32ef646170 GC dead code. If we want to stay polite to the foreign compilers,
we can find another way to issue an #error, but using a preprocessed
assembler for that purpose and clobbering libc.a with an empty .o
just for the sake of #error reporting is way too much of a burden.
2006-09-05 16:21:26 +00:00
marcel
587bff4653 Whitespace fix. 2006-09-02 01:07:21 +00:00
marcel
d9435a56c2 Enable TLS on PowerPC. 2006-09-01 19:14:14 +00:00
marcel
64cbc41da3 Fix style(9) in code copied from rtld. 2006-09-01 17:35:48 +00:00
marcel
aa70489a8b Enable TLS on ia64. 2006-09-01 06:18:43 +00:00
marcel
a2087dd751 Fix the variant I allocation for KSE: Allow a larger TCB and assume
that the documented TCB is at the tail of the extended TCB. In other
words, the base of the TCB has a negative offset from the TLS.
2006-09-01 06:13:16 +00:00
marcel
0b6bc8a47b Avoid dead code elimination of the assignment to TP by using inline
assembly.
2006-08-30 00:57:35 +00:00
marcel
007866fe9c Prevent dead code elimination for the TP assignmient by using inline
assembly.
2006-08-30 00:39:07 +00:00
ceri
0db75312ec Note that the system only allows a maximum of kern.kq_calloutmax timers.
PR:		docs/102353
Submitted by:	phk
MFC after:	1 week
2006-08-25 15:19:47 +00:00
ru
4d582ffe09 Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
cognet
cf0232c4fc If __ARMEB__ is defined, we're already using the network byte order, so
there's no need to to anything in the hton* functions, beside returning
the parameter.

Spotted out by: Oleksandr Tymoshenko <gonzo@freebsd.org>
2006-08-21 14:42:47 +00:00
wes
4ac35ea6d7 Document EAGAIN failure per PR. (Finally!)
PR:		24125
2006-08-16 02:56:51 +00:00
pjd
85e4bd1f98 We operate on 'statfs' structures, not on 'fsstat' structures.
MFC after:	3 days
2006-08-15 18:17:03 +00:00
dd
04502e68b1 Improve the wording. Remove the appositive about strcmp, putting the
first sentence back to the way it was. Add a second sentence that
explains the case when strcmp is called.
2006-08-14 08:21:27 +00:00
cperciva
230593e64f Correctly handle the case in calloc(num, size) where
(size_t)(num * size) == 0
but both num and size are nonzero.

Reported by:	Ilja van Sprundel
Approved by:	jasone
Security:	Integer overflow; calloc was allocating 1 byte in
		response to a request for a multiple of 2^32 (or 2^64)
		bytes instead of returning NULL.
2006-08-13 21:54:47 +00:00
marcel
bf73c5645f Define NO_TLS on PowerPC.
See also: PR ia64/91846
2006-08-09 19:01:27 +00:00
maxim
41a38f71c9 o It speaks about struct msqid_ds not struct shmid_ds.
PR:		docs/101314
Submitted by:	Vasil Dimov
MFC after:	1 week
2006-08-09 18:05:44 +00:00
phk
1c0399f798 Return length from fwopen() file callback instead of zero.
The symptom is that syslog() fails to log anything but the "ident"
string if LOG_PERROR is specified to openlog(3) and the extensible
printf is in action.

For unclear, likely quaint historical reasons, syslog uses fwopen()
on a stack buffer, rather than using the more straightforward
and faster snprintf().

Along the way, fflush(3) is called, and since the callback writer
function returns zero instead of the length "written", __SERR
naturally gets set on the filedescriptor.

The extensible printf, in difference from the normal printf refuses
to output anything to an __SERR marked filedescriptor, and thus
the actual syslog message is supressed.

MFC:	after 2 weeks
2006-08-07 20:12:18 +00:00
ume
f44836f7cb Check if the filedes of kevent is expected one. Though our
old resolver opened just one socket, BIND9's resolver may
open more than one sockets.  And, BIND9's resolver doesn't
close the socket on timeout.  So, we need this check.

Reported by:	freebsd-cvs-src__at__oldach.net (Helge Oldach), bz
Hinted by:	rwatson
2006-08-04 12:26:07 +00:00
ume
c9a3ba7309 _close() should be called instead of close() here. 2006-08-04 10:21:11 +00:00
yar
209e4786e7 Commit the results of the typo hunt by Darren Pilgrim.
This change affects documentation and comments only,
no real code involved.

PR:		misc/101245
Submitted by:	Darren Pilgrim <darren pilgrim bitfreak org>
Tested by:	md5(1)
MFC after:	1 week
2006-08-04 07:56:35 +00:00
delphij
513c2a1064 In DCE 1.1, the time_low value is defined as an unsigned 32-bit
integer.  Presently, our implementation employs an approach that
converts the value to int64_t, then back to int, unfortunately,
this approach can be problematic when the the difference between
the two time_low is larger than 0x7fffffff, as the value is then
truncated to int.

To quote the test case from the original PR, the following is
true with the current implementation:

865e1a56-b9d9-11d9-ba27-0003476f2e88 < 062ac45c-b9d9-11d9-ba27-0003476f2e88

However, according to the DCE specification, the expected result
should be:

865e1a56-b9d9-11d9-ba27-0003476f2e88 > 062ac45c-b9d9-11d9-ba27-0003476f2e88

This commit adds a new intermediate variable which uses int64_t
to store the result of subtraction between the two time_low values,
which would not introduce different semantic of the MSB found in
time_low value.

PR:		83107
Submitted by:	Steve Sears <sjs at acm dot org>
MFC After:	1 month
2006-08-03 03:34:36 +00:00
jasone
c606303b8c Conditionally expand the size_invs lookup table in arena_run_reg_dalloc()
so that architectures with a quantum of 8 (rather than 16) work.

Restore arm's quantum to 8.

Submitted by:	jmg
2006-07-27 19:09:32 +00:00
cognet
8bef7869ab Use 4 as QUANTUM_2POW_MIN on arm as it is on any other architecture, to avoid
triggering an assertion later.
2006-07-27 14:36:28 +00:00
jasone
2f036ab081 Fix cpp logic in arena_malloc() to adjust size when assertions are enabled,
even if stats gathering is disabled. [1]

Remove 'size' parameter from several functions that do not use it.

Reported by:	[1] ache
2006-07-27 04:00:12 +00:00
imp
4a3f59d005 Remove stale comment about arm 2006-07-26 16:56:56 +00:00
yar
dfd296d48e Respect MK_INET6_SUPPORT. 2006-07-26 08:36:46 +00:00
yar
082a928eac Fix build w/o INET6.
Submitted by:	Andre Albsmeier <Andre.Albsmeier siemens com>
2006-07-26 08:35:46 +00:00
nork
9fb25aacbb Add missing ;.
Pointy hat to:	myself
Approved by:	deischen (implicitly)
2006-07-23 15:53:12 +00:00
ume
d2efba70b7 do not overload the port number on to the return value of
str2number().  this could result in an unexpected code path.

Obtained from:	KAME
MFC after:	1 week
2006-07-23 15:31:03 +00:00
nork
799a5bd29c Add missing syscalls.
Reviewed by:	deischen
Approved by:	deischen
2006-07-23 13:08:54 +00:00
ume
538856133a stop use of mutex lock in ICMP lookup.
MFC after:	1 week
2006-07-23 07:07:49 +00:00
ume
7169bc1ce5 remove obsolete comments.
MFC after:	3 days
2006-07-22 14:36:56 +00:00
ume
636a28fc75 simplification in explore_numeric: unified the post-process with
GET_AI and GET_PORT.  Commented on an impossible case.

Obtained from:	KAME
MFC after:	1 week
2006-07-21 19:02:28 +00:00
ume
34bbbddd7e RFC3493 requires use of inet_aton for AF_INET.
Obtained from:	KAME
MFC after:	1 week
2006-07-21 19:00:22 +00:00
ume
9cc6e84d28 clean-up: rewrote explore_null and explore_numeric without using sentinel.
we do not need it since we make (at most) a single addrinfo entry in these
cases.

Obtained from:	KAME
MFC after:	1 week
2006-07-21 18:57:44 +00:00
ume
cd6fe37440 - draft-ietf-ipngwg-icmp-namelookups-09
- make it compilable

It still requires root privilege and is experimental.

Obtained from:	KAME
MFC after:	1 week
2006-07-21 18:55:51 +00:00
stefanf
01c3a07e52 Use a prototype for res_init().
MFC after:	3 days
2006-07-17 09:27:26 +00:00
maxim
e03f872cad o compat_group() and files_group() are more complicated than I thought
in rev. 1.34.  Mainly I missed the fact that the buffer is used for two
purposes:

1) storing a group line from the group file;

2) __gr_parse_entry() parses the buffer and tries to put the group
members to the remaining part of the buffer and can fail if there
is no enough room for them.

Re-arrange the buffer size checks to account the latter case.

Submitted by:	Kirk R Webb
MFC after:	2 weeks
2006-07-14 17:45:33 +00:00
rwatson
1c2b8b40e8 Following repo-copy of mac_is_present_np.3 to mac_is_present.3, remove
old file, update references, etc.  The C function is already named
mac_is_present().

Obtained from:	TrustedBSD Project
2006-07-07 14:02:17 +00:00
jasone
64896f5bfe Use some math tricks in arena_run_reg_dalloc() to avoid actual division, as
well as avoiding a switch statement.  This change has no significant impact
to performance when branch prediction is successful at predicting the sizes
of objects passed to free(), but in the case that the object sizes are
semi-random, this change has the potential to prevent many branch prediction
misses, thus improving performance substantially.

Take advantage of alignment guarantees in ipalloc(), and pad object sizes to
something less than a power of two when possible.  This has the potential
to substantially reduce internal fragmentation for objects allocated via
posix_memalign().

Avoid an unnecessary pow2_ceil() call in arena_ralloc().

Submitted by:	djam8193ah@hotmail.com
2006-07-01 16:51:10 +00:00
jasone
e6aa0aff3e Make the behavior of malloc(0) standards-compliant by getting rid of nil,
and instead creating a small allocation for each malloc(0) call.  The
optional SysV compatibility behavior remains unchanged.

Add a couple of assertions.

Fix a couple of typos in error message strings.
2006-06-30 20:54:15 +00:00
keramida
bc2961a729 twalk() expects an `action' function not a comparison function.
The text is correct in the "DESCRIPTION" section, so fix "SYNOPSIS"
to use the correct name.

PR:		docs/90498
Submitted by:	Vasil Dimov
MFC after:	3 days
2006-06-23 13:36:33 +00:00
kib
b90260e703 Make the mincore(2) return ENOMEM when requested range is not fully mapped.
Requested by:	Bruno Haible <bruno at clisp org>
Reviewed by:	alc
Approved by:	pjd (mentor)
MFC after:	1 month
2006-06-21 12:59:05 +00:00
jasone
c69739a898 Add a missing case for the switch statement in arena_run_reg_dalloc(). [1]
Fix a leak in chunk_dealloc(). [2]

Reported by:	[1] djam8193ah@hotmail.com,
		[2] Ville-Pertti Keinonen <will@exomi.com>
2006-06-20 20:38:25 +00:00
maxim
3e4e0ea538 o Make grep ^strlcpy work: put a return value type on separate line. 2006-06-15 15:56:55 +00:00
maxim
569fed19c7 o Sort .Xrs. 2006-06-13 12:49:14 +00:00
phk
71b866ca8e Add xref to statfs(2) 2006-06-13 12:23:22 +00:00
delphij
6a40c2e8f1 - ANSIfy.
- Remove two unnecessary casts.

These changes would help gcc4 compile.
2006-06-05 18:22:13 +00:00