Pawel Jakub Dawidek
3bb2bdaef6
Append-only flag also denies chmod(2). Is this correct behaviour?
2006-12-13 13:22:57 +00:00
Pawel Jakub Dawidek
0b149517f3
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
Pawel Jakub Dawidek
e4c1f0293f
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
Pawel Jakub Dawidek
e67ec1d4a1
mkfifo(2) returns EACCES when write permission is denied for a component of
...
the path prefix.
2006-12-13 09:58:49 +00:00
Pawel Jakub Dawidek
1619e03af7
Be more specific when ELOOP can be returned.
2006-12-12 20:06:52 +00:00
Pawel Jakub Dawidek
a2b7d92ad6
symlink(2) return EACCES if a component of the name2 path prefix denies
...
write permission.
2006-12-12 20:05:04 +00:00
Pawel Jakub Dawidek
554bc5f287
Correct ENOENT description.
2006-12-12 19:57:17 +00:00
Pawel Jakub Dawidek
b8f5525f70
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
Pawel Jakub Dawidek
1212ac8123
mkdir(2) creates directory, not file.
2006-12-12 15:00:08 +00:00
Julian Elischer
558c08c358
Remove reference to confusing behaviour just removed from
...
the kse_exit() syscall. Describe the correct behaviour.
2006-12-12 08:13:02 +00:00
Pawel Jakub Dawidek
ba4b9e0121
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
Pawel Jakub Dawidek
e799094d84
If the named file has its immutable or append-only flag set, utimes(2)
...
returns EPERM.
2006-12-09 23:13:05 +00:00
Pawel Jakub Dawidek
b10ec4d0dc
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
Pawel Jakub Dawidek
2f51879266
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
Pawel Jakub Dawidek
46db118b7e
- 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
Pawel Jakub Dawidek
9becb00c0a
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
Pawel Jakub Dawidek
442cc490fd
If the named file has its immutable flag set, chown(2) returns EPERM.
2006-12-09 22:41:26 +00:00
Pawel Jakub Dawidek
54ec563e0d
If the named file has its immutable flag set, chmod(2) returns EPERM.
2006-12-09 22:41:01 +00:00
Pawel Jakub Dawidek
4e3f043c22
Add reference to chflags(2).
2006-12-09 22:39:28 +00:00
Pawel Jakub Dawidek
93dbfff0f9
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
Pawel Jakub Dawidek
3e6f3ff080
- 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
Pawel Jakub Dawidek
b7715d3d86
- 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
Pawel Jakub Dawidek
483a0e04d8
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
Pawel Jakub Dawidek
d1eb7b96e7
When immutable, undeletable or append-only flag is set, rename(2)
...
return EPERM.
2006-12-09 19:19:46 +00:00
Pawel Jakub Dawidek
858e6c9cbd
When undeletable flag is set, unlink(2) return EPERM.
2006-12-09 19:18:39 +00:00
Ruslan Ermilov
a82e937c0b
Grammar.
...
OK'ed by: sam
2006-12-04 20:34:25 +00:00
Sam Leffler
78e3a7fdd5
document recent change to return ECONNRESET for tcp sockets
...
MFC after: 1 month
2006-12-04 18:39:11 +00:00
Hajimu UMEMOTO
909e7467d8
Use _kevent() instead of kevent().
...
Requested by: nork
2006-12-04 17:08:43 +00:00
Diomidis Spinellis
aeecffebe5
Minor clarification.
2006-12-03 19:26:17 +00:00
Maxim Konovalov
88ce725781
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
Yaroslav Tykhiy
df19774d2f
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
John Baldwin
8cc7b0f93d
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
Tom Rhodes
c74824fe88
Add an entry for PT_GETLWPLIST.
...
Nudged by: jhb
Reviewed by: davidxu
2006-11-09 11:27:18 +00:00
Olivier Houchard
c0b6c4a212
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
Ruslan Ermilov
7c11ac3da0
Remove a forgotten file.
2006-11-08 21:29:20 +00:00
Olivier Houchard
05b432d2d1
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
Olivier Houchard
9cef667a1a
Provide definitions suitable for arm big-endian.
2006-11-06 20:49:23 +00:00
Robert Watson
21f62f0771
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
Sam Lawrance
6b0a380f6d
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
Daniel Gerzo
137e54d3db
- 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
Kip Macy
7b5cdd4faf
- 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
Ruslan Ermilov
f19110addc
Replace the SEE ALSO xrefs with a more reasonable set stolen from POSIX.
2006-11-02 14:10:56 +00:00
Pawel Jakub Dawidek
a722f8df9e
Document MNT_GJOURNAL option.
2006-11-01 23:40:44 +00:00
Bruce Evans
81f2acfc06
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
Ruslan Ermilov
0f0eddbb01
Add missing markup bits.
...
Submitted by: Emil Mikulic
2006-10-28 13:05:10 +00:00
Hajimu UMEMOTO
b021e5e1ed
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
Hajimu UMEMOTO
7c35eabcb2
Import of BIND 9.3.3rc2
2006-10-24 14:25:49 +00:00
Konstantin Belousov
525cd732f9
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 L. B. Nielsen
27111d392c
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
Ruslan Ermilov
2aeccd6ea7
Avoid a potential hard sentence break.
2006-10-21 18:03:53 +00:00
Konstantin Belousov
129ccff2fb
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
Andrey A. Chernov
b0bf75c83c
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
Andrey A. Chernov
5a8d08f52b
Honor errno obtained from __sflags
...
Move errno restoring after FUNLOCKFILE in one case
2006-10-16 09:57:15 +00:00
Andrey A. Chernov
6f8d08b39a
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
Andrey A. Chernov
b48be86ce1
Do real seek
...
Catch ftruncate errors
PR: 104295
Submitted by: ru (seek)
2006-10-15 16:24:31 +00:00
Ruslan Ermilov
08e9f8c84f
Forgot to bump the document date.
2006-10-13 20:34:44 +00:00
Ruslan Ermilov
531ba7c084
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
Ruslan Ermilov
9a29fb3baf
Add missing comma.
2006-10-13 16:11:12 +00:00
Ruslan Ermilov
b13b4f6ffd
Use normal parentheses.
...
PR: docs/84549
Submitted by: Gary W. Swearingen
MFC after: 3 days
2006-10-12 20:50:26 +00:00
Ruslan Ermilov
948ec60d36
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
Ruslan Ermilov
e965ede2b5
More accurately document the implementation details of internal storage.
...
PR: docs/82508
2006-10-12 14:31:17 +00:00
Ruslan Ermilov
17cba6de53
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
Ruslan Ermilov
942bfcd744
Document S_IRWXU and permission bits for group/other.
...
PR: docs/57153
MFC after: 3 days
2006-10-12 13:35:07 +00:00
Ruslan Ermilov
09bd310c91
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
Tom Rhodes
79d9a182ab
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
Kip Macy
5fe4c0e842
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 Konovalov
1be947e9f8
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 Konovalov
5c35171af3
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
Kip Macy
b84c7a797c
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
Tom Rhodes
0b0ea94893
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
Tom Rhodes
dfe25dc456
Reword previous delta a little bit.
...
Submitted by: ru
2006-10-07 10:49:20 +00:00
Tom Rhodes
1ae5dc92c0
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
Tom Rhodes
ef5566e8fc
Add missing word "returns."
...
Noticed by: Samy Al Bahra
2006-10-07 05:13:32 +00:00
Andrey A. Chernov
f68412f927
Automatically re-stir every 400000 calls
...
Obtained from: OpenBSD
2006-10-04 01:17:23 +00:00
Ruslan Ermilov
ad136d1e29
Revise markup in recently added manpages.
2006-09-30 10:34:13 +00:00
Ruslan Ermilov
bb4b8a9dd4
Fix markup, language, function prototype, and example code.
2006-09-30 10:24:00 +00:00
Ruslan Ermilov
64437d397b
Markup nit.
2006-09-29 22:57:22 +00:00
Vasil Dimov
23883885a3
Fix typo
...
PR: docs/103666
Submitted by: vd
Approved by: maxim
2006-09-26 09:47:46 +00:00
Andrey A. Chernov
d3ff3b5f2f
Keep compatible parts in sync with OpenBSD v1.21, add some comments.
...
No functional changes.
2006-09-23 14:48:31 +00:00
Andrey A. Chernov
6843acf8ac
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
Andrey A. Chernov
f27c7b4713
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
Alexander Kabaev
714b79b953
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
Alexander Kabaev
500b77c7ed
Use correct type in va_arg argument.
2006-09-21 14:40:20 +00:00
David Xu
d31279c4e7
remove thr_getscheduler, thr_setscheduler, thr_setschedparam,
...
add rtprio_thread.
2006-09-21 04:22:46 +00:00
Maxim Konovalov
0ba6effc8c
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
Ruslan Ermilov
a73a3ab56b
Markup fixes.
2006-09-17 21:27:35 +00:00
Ruslan Ermilov
b31a663480
Remove more traces of Alpha.
2006-09-17 20:53:30 +00:00
Joel Dahl
f832d58dc8
Remove reference to T/TCP.
...
Reviewed by: andre
2006-09-13 19:48:00 +00:00
Brian Somers
cd0ac75c13
Fix a typo
2006-09-10 20:41:33 +00:00
Martin Blapp
794295bab8
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
Martin Blapp
8306b5154c
Sync with NetBSD rev. 1.29
...
Coverity CID 2293: Fix memory leak.
MFC after: 1 month
2006-09-09 22:32:07 +00:00
Martin Blapp
c317a5c2f6
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
Martin Blapp
f340bd4070
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
Martin Blapp
dc9fde8d4f
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
Martin Blapp
b0718451b8
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
Martin Blapp
b0eb405d46
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
Martin Blapp
e0c693387f
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
Jason Evans
820e03699c
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
Ruslan Ermilov
4d6ff03d50
alloca() cannot check if the allocation is valid; mention the consequences.
...
Obtained from: OpenBSD
2006-09-05 16:30:11 +00:00
Ruslan Ermilov
3c03c7095e
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 Moolenaar
ee35caa0b3
Whitespace fix.
2006-09-02 01:07:21 +00:00
Marcel Moolenaar
ce2dfbd199
Enable TLS on PowerPC.
2006-09-01 19:14:14 +00:00
Marcel Moolenaar
9d353fbc3f
Fix style(9) in code copied from rtld.
2006-09-01 17:35:48 +00:00
Marcel Moolenaar
bc14049e96
Enable TLS on ia64.
2006-09-01 06:18:43 +00:00
Marcel Moolenaar
3614156c7d
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 Moolenaar
f3cec68877
Avoid dead code elimination of the assignment to TP by using inline
...
assembly.
2006-08-30 00:57:35 +00:00
Marcel Moolenaar
7d3f85133a
Prevent dead code elimination for the TP assignmient by using inline
...
assembly.
2006-08-30 00:39:07 +00:00
Ceri Davies
d2b2ccea4c
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
Ruslan Ermilov
2b46c64c9c
Remove alpha left-overs.
2006-08-22 08:03:01 +00:00
Olivier Houchard
9a1d419396
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 Peters
25dbf7fe4e
Document EAGAIN failure per PR. (Finally!)
...
PR: 24125
2006-08-16 02:56:51 +00:00
Pawel Jakub Dawidek
225ee44c8a
We operate on 'statfs' structures, not on 'fsstat' structures.
...
MFC after: 3 days
2006-08-15 18:17:03 +00:00
Dima Dorfman
01510e402d
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
Colin Percival
e981a4e863
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 Moolenaar
5011eea82f
Define NO_TLS on PowerPC.
...
See also: PR ia64/91846
2006-08-09 19:01:27 +00:00
Maxim Konovalov
edd5ce3102
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
Poul-Henning Kamp
5b1deb3ce8
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
Hajimu UMEMOTO
45c89f1e05
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
Hajimu UMEMOTO
500fe2a19c
_close() should be called instead of close() here.
2006-08-04 10:21:11 +00:00
Yaroslav Tykhiy
776fc0e90e
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
Xin LI
da4ab3aa26
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
Jason Evans
b3dcb52814
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
Olivier Houchard
4cfa5e0135
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
Jason Evans
b8f9774731
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
Warner Losh
c40855dbed
Remove stale comment about arm
2006-07-26 16:56:56 +00:00
Yaroslav Tykhiy
11eb328ec5
Respect MK_INET6_SUPPORT.
2006-07-26 08:36:46 +00:00
Yaroslav Tykhiy
720fc1c7dc
Fix build w/o INET6.
...
Submitted by: Andre Albsmeier <Andre.Albsmeier siemens com>
2006-07-26 08:35:46 +00:00
Norikatsu Shigemura
27a9d57fed
Add missing ;.
...
Pointy hat to: myself
Approved by: deischen (implicitly)
2006-07-23 15:53:12 +00:00
Hajimu UMEMOTO
e24e9d9988
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
Norikatsu Shigemura
e257c93bbc
Add missing syscalls.
...
Reviewed by: deischen
Approved by: deischen
2006-07-23 13:08:54 +00:00
Hajimu UMEMOTO
18d2f53d00
stop use of mutex lock in ICMP lookup.
...
MFC after: 1 week
2006-07-23 07:07:49 +00:00
Hajimu UMEMOTO
816dc28540
remove obsolete comments.
...
MFC after: 3 days
2006-07-22 14:36:56 +00:00
Hajimu UMEMOTO
da83bf18e4
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
Hajimu UMEMOTO
0cf41987df
RFC3493 requires use of inet_aton for AF_INET.
...
Obtained from: KAME
MFC after: 1 week
2006-07-21 19:00:22 +00:00
Hajimu UMEMOTO
0aceddcef7
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
Hajimu UMEMOTO
b88ad6b5d6
- 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
Stefan Farfeleder
33ef612ede
Use a prototype for res_init().
...
MFC after: 3 days
2006-07-17 09:27:26 +00:00
Maxim Konovalov
0ec15b18a2
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
Robert Watson
1e5294bc0a
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
Jason Evans
5355c74026
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
Jason Evans
00d8242c2b
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
Giorgos Keramidas
1d3a1c8bce
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
Konstantin Belousov
455dd7d4c7
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
Jason Evans
0fc8aff0c4
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 Konovalov
f0a3522b5d
o Make grep ^strlcpy work: put a return value type on separate line.
2006-06-15 15:56:55 +00:00
Maxim Konovalov
05922cdfcc
o Sort .Xrs.
2006-06-13 12:49:14 +00:00
Poul-Henning Kamp
dfe969585d
Add xref to statfs(2)
2006-06-13 12:23:22 +00:00
Xin LI
1cec70ad72
- ANSIfy.
...
- Remove two unnecessary casts.
These changes would help gcc4 compile.
2006-06-05 18:22:13 +00:00
Konstantin Belousov
3d5fa0356e
Replace absolute addressing in the call instructions with position-independend
...
calls. This eliminates TEXTREL from libc, making its text segment relocatable.
PR: i386/85242
Approved by: kan (mentor)
MFC after: 1 month
2006-06-05 14:59:33 +00:00
Maxim Konovalov
d230fe5161
o Record a file offset for a last successfully parsed group file line.
...
If the initial buffer size (1KB) for the given group line is not big
enough, reset the offset. It helps to do not miss this line when
getrg() reallocates the larger buffer and tries to parse the line again.
PR: bin/52433, kern/55031, bin/83696, misc/97640, misc/98111
Submitted by: bsw71@mail.ru , Philip M. Gollucci, Justin Erenkrantz
Glanced at: nectar
MFC after: 1 month
2006-06-01 15:45:06 +00:00
Maxim Konovalov
332a76f71b
o Document the fact truncate(2) has no effect for !VDIR or !VREG files.
...
Submitted by: ceri
2006-06-01 14:20:43 +00:00
Ruslan Ermilov
84c929db19
Fix the output.
...
Noticed by: rodrigc
2006-05-27 09:04:43 +00:00
Warner Losh
6e66cb3b79
GC old a.out and K&R support.
2006-05-23 02:52:14 +00:00
Andrey A. Chernov
4151a8cb14
Reflect int -> size_t changes in glob.h
2006-05-22 06:53:35 +00:00
Andrey A. Chernov
4b767fa67f
Reflect size_t changes in glob.h
...
Obtained from: NetBSD (mostly)
2006-05-22 06:33:19 +00:00
Andrey A. Chernov
55cd304ad1
Remove pending actions asked in comments for SHLIB_MAJOR bump, done.
...
Reviewed by: ume
2006-05-22 05:12:44 +00:00
Andrey A. Chernov
ba87bfdcd4
Remove the kludge, as asked in the Makefile:
...
# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c.
Reviewed by: ume
2006-05-22 05:04:53 +00:00
Hajimu UMEMOTO
794063c03f
Bump library majro version for gethostbyaddr(3).
2006-05-21 15:15:21 +00:00
Hajimu UMEMOTO
473c8b2ecf
Nuke some compatibility crufts of resolver for 6.X and earlier.
...
X-MFC after: never
2006-05-21 11:29:26 +00:00
Hajimu UMEMOTO
1bdf356bd3
Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
...
arch.
X-MFC after: never
2006-05-21 11:27:28 +00:00
Hajimu UMEMOTO
734aa10414
Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
...
too short. This conforms to RFC3493, POSIX and XPG6.
Obtained from: NetBSD
2006-05-21 11:22:31 +00:00
Hajimu UMEMOTO
d808369aa1
Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
...
support.
X-MFC after: never
2006-05-21 11:19:36 +00:00
Hajimu UMEMOTO
f62c4786e1
Vendor import of BIND 9.3.2
2006-05-21 11:10:07 +00:00
Hajimu UMEMOTO
135a67244d
This commit was generated by cvs2svn to compensate for changes in r158782,
...
which included commits to RCS files with non-trunk default branches.
2006-05-21 11:10:07 +00:00
Craig Rodrigues
e6d1e46944
Remove reference to "System call restart" in intro(2). intro(2) does not
...
have such a reference. Add a reference instead to SA_RESTART in
sigaction(2).
2006-05-20 21:49:03 +00:00
Maxim Konovalov
3953c11715
o .Xr strtonum(3).
...
MFC after: 1 week
2006-05-20 21:11:35 +00:00
Jung-uk Kim
1761ec1040
Correct decoding a string containing '/'.
...
PR: 97485
Submitted by: Mikko Tyolajarvi < mbsd at pacbell dot net >
2006-05-19 19:06:38 +00:00
Giorgos Keramidas
79652c510a
* Document the fact that non-superusers cannot change file flags for
...
objects with SF_IMMUTABLE, SF_APPEND, or SF_NOUNLINK.
* Document that non-superusers cannot set or clear any SF_* flag
(setting fails with EPERM, clearing is silently ignored).
* Document that superusers cannot change any flag if one of
SF_IMMUTABLE, SF_APPEND, SF_NOUNLINK is set and securelevel is
greater than 0.
* Document SF_SNAPSHOT and note that it is maintained by the
system and is, for this reason, impossible to set to clear by
any user.
PR: docs/33877
Submitted by: harti
Help by: George Marsellis <gam9478@njit.edu>
MFC after: 1 week
2006-05-16 20:24:41 +00:00
Hajimu UMEMOTO
3da59cd007
Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:
...
http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html
gethostbyaddr_r() is changed as well.
It breaks ABI backward compatibility on 64 bit arch. So, we fix it
on 32 bit arch only for now.
Reported by: Rostislav Krasny <rosti.bsd@gmail.com>
2006-05-12 15:37:23 +00:00
David Xu
3a31b448c0
Save errno before calling pthread_mutex_lock because pthread_mutex_lock
...
may change errno unexpectly.
2006-05-11 09:10:33 +00:00
Jason Evans
3212b810d8
Increase the minimum chunk size by a power of two (32kB --> 64kB, assuming
...
4kB pages), in order to avoid dangerous rounding error when calculating
fullness limits during run promotion/demotion.
Convert a structure bitfield to a normal field in areana_run_t. This should
have been changed along with the other fields in revision 1.120.
2006-05-10 00:07:45 +00:00
Brian S. Dean
de76bc3609
A few minor wording changes and a clarification about error conditions.
2006-05-03 17:33:29 +00:00
Hajimu UMEMOTO
b947683ce1
Fix alignment problem on AMD64.
...
Reported by: Pascal Hofstee <caelian__at__gmail.com>
Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Tested by: Pascal Hofstee <caelian__at__gmail.com>
2006-05-02 23:02:32 +00:00
Hajimu UMEMOTO
eb59e992e1
cache' couldn't co-exist with
compat'.
...
Submitted by: "Michael Bushkov" <bushman__at__rsu.ru>
2006-04-30 21:25:00 +00:00
Hajimu UMEMOTO
06a99fe36f
- Extend the nsswitch to support Services, Protocols and Rpc
...
databases.
- Make nsswitch support caching.
Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Sponsored by: Google Summer of Code 2005
2006-04-28 12:03:38 +00:00
Jason Evans
f7768b9f34
Change the semantics of brk_max to dynamically deal with data segment
...
bounds. [1]
Modify logic for utilizing the data segment, such that it is possible to
create huge allocations there.
Shrink the data segment when deallocating a chunk, if it is at the end of
the data segment.
Rename chunk_size to csize in huge_malloc(), in order to avoid masking a
static variable of the same name. [1]
Reported by: Paul Allen <nospam@ugcs.caltech.edu>
2006-04-27 01:03:00 +00:00
Daniel Eischen
babd660805
Oops, correct the weak reference (s/fclose/fcloseall).
...
Spotted by: Antoine Brodin (antoine _dot_ brodin _at_ laposte _dot_ net)
2006-04-22 16:47:59 +00:00
Daniel Eischen
ca7f278f1d
Now that libc has fcloseall(), remove _cleanup() from the list
...
of FreeBSD private symbols.
2006-04-22 15:11:33 +00:00
Daniel Eischen
b62c955c52
Add fcloseall() to libc. This removes the need to export _cleanup().
...
Linux also provides an fcloseall() implementation.
Discussed on: arch
2006-04-22 15:09:15 +00:00
Tom Rhodes
38467e931c
Update for rev 1.205 of vm_mmap.c.
...
Submitted by: fanf
2006-04-21 07:22:55 +00:00
Ceri Davies
c499f23b6e
Correct usage example.
...
PR: docs/95059
Submitted by: Jos Backus
MFC after: 4 days
2006-04-18 21:37:24 +00:00
Maxim Konovalov
9b63b79ee0
o dbm_close(3) returns void not zero or anything else. Touch .Dd.
...
PR: docs/80070
Submitted by: Aleksej Saushev
MFC after: 2 weeks
2006-04-16 16:33:26 +00:00
Marius Strobl
f2189783c9
For _Qp_{fge,fgt,fle,flt}() the SCD states that "Exceptions mimic fcmpeq",
...
this means they should set the cmpe flag when calling __fpu_compare().
Submitted by: stefanf
MFC after: 2 weeks
2006-04-16 14:32:53 +00:00
Hajimu UMEMOTO
d3ac2b30d4
- make reentrant version of netdb functions glibc style API, and
...
expose them to outside of libc.
- make netdb functions NSS friendly.
Reviewed by: arch@ and current@ (no objection)
2006-04-15 16:20:27 +00:00
Daniel Eischen
797f4fb875
Don't export __gdtoa. The only known ports that rely on
...
this or the deprecated POSIX functions {e,g,f}cvt() have
newer versions that do not (rely on them).
Requested by: marius
2006-04-15 15:35:20 +00:00
Maxim Konovalov
6ad8b89261
o Document SO_NOSIGPIPE, touch .Dd.
...
PR: docs/78479
Submitted by: Mikko Tyolajarvi
MFC after: 2 weeks
2006-04-15 13:37:35 +00:00
Ruslan Ermilov
1427d59bee
List pwritev in the NAME section.
2006-04-14 19:34:07 +00:00
Jens Schweikhardt
e4b2624f46
s/soley/solely
2006-04-13 18:19:44 +00:00
Marius Strobl
ea84e2b899
- Move _Qp_* and __dtoul from FBSDprivate to the list of FBSD_1.0 symbols
...
as well as add __sparc_utrap_install to FBSD_1.0; these are required by
the SCD libc 64 psABI and thus meant to be officially exported symbols.
- Remove the __fpu_* entries as well as the __sigtramp entry altogether as
these are internal to the libc FPU emulation and the signal trampoline
initialization in sigaction(2) respectively and thus don't need to be
externally visible.
- Add __sparc_utrap_setup to the list of FBSDprivate symbols as it's used
in src/lib/csu/sparc64/crt1.c to initialize the libc FPU emulation (I
think alternatively src/lib/csu/sparc64/crt1.c could be changed to use
__sparc_utrap_install instead, at the expense of increasing the size of
executables a bit).
- Add an entry for the vfork symbol to the FBSD_1 list and entries for it's
associated symbols generated by the RSYSCALL() macro to the FBSDprivate
list. There's some magic in place that automatically generates code for
vfork() if there's no explicit MD code for it so it might make sense to
move these symbols from the MD symbol map files to a MI one.
The last two changes make the libc symbol versioning useable on sparc64.
Ok'ed by: deischen
2006-04-11 19:43:36 +00:00
Christian Brueffer
ba1cb6f3ea
Document that VIS_CSTYLE encodes space (040) as '\s'.
...
PR: 95546
Submitted by: Jan Schaumann <jschauma@netmeister.org>
MFC after: 3 days
2006-04-09 16:39:43 +00:00
Hajimu UMEMOTO
f76963aba1
Don't test if RES_INIT is set to see res_state structure is
...
initialized. Some application may reset RES_INIT. Use the
way in __res_vinit(), instead.
2006-04-08 18:19:35 +00:00
Jason Evans
f90cbdf17f
Add an unreachable return statement, in order to avoid a compiler warning
...
for non-standard optimization levels.
Reported by: Michael Zach <zach@webges.com>
2006-04-05 18:46:24 +00:00
Jason Evans
50ff9670e2
Only initialize the first per-chunk page map element for free runs. This
...
makes run split/coalesce operations of complexity lg(n) rather than n.
2006-04-05 04:15:12 +00:00
Jason Evans
94fc7dc0d5
Add malloc_usable_size() to the RETURN VALUES section.
2006-04-04 20:27:53 +00:00
Jason Evans
cf01f0d7c5
Add init_lock, and use it to protect against allocator initialization
...
races. This isn't currently necessary for libpthread or libthr, but
without it external threads libraries like the linuxthreads port are
not safe to use.
Reported by: ganbold@micom.mng.net
2006-04-04 19:46:28 +00:00
Jason Evans
1c6d5bde6c
Refactor per-run bitmap manipulation functions so that bitmap offsets only
...
have to be calculated once per allocator operation.
Make nil const.
Update various comments.
Remove/avoid division where possible.
For the one division operation that remains in the critical path, add a
switch statement that has a case for each small size class, and do division
with a constant divisor in each case. This allows the compiler to generate
optimized code that does not use hardware division [1].
Obtained from: peter [1]
2006-04-04 03:51:47 +00:00
Poul-Henning Kamp
75239a017f
Add missing #if's for NO_FLOATING_POINT
2006-04-01 19:06:54 +00:00
Hajimu UMEMOTO
3c3c80e4c8
fix indent.
2006-04-01 15:53:39 +00:00
Daniel Eischen
9fe1984e64
Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,
...
this is used by some 3rd party applications when {e,f,g}cvt() are
not found. POSIX defines the xcvt() funtions but says they are
deprecated in favor or sprintf(). We'll import these functions
from OpenBSD and remove __gdtoa() from the exported interfaces
when libc version is bumped.
2006-04-01 02:56:09 +00:00
Jason Evans
cd70100e5d
Optimize runtime performance, primary using the following techniques:
...
* Avoid choosing an arena until it's certain that an arena is needed
for allocation.
* Convert division/multiplication to bitshifting where possible.
* Avoid accessing TLS variables in single-threaded code.
* Reduce the amount of pointer dereferencing.
* Move lock acquisition in critical paths to only protect the the code
that requires synchronization, and completely remove locking where
possible.
2006-03-30 20:25:52 +00:00