Commit Graph

13479 Commits

Author SHA1 Message Date
Benedict Reuschling
e9e38bc2e7 Sync with OpenBSD rev. 1.13:
strtonum does not require limits.h

Obtained from:  OpenBSD
Discussed with: ru@
MFC after:      5 days
2010-10-21 18:21:19 +00:00
Ed Schouten
9301df8179 Fix error handling logic of pututxline(3).
Instead of only returning NULL when the entry is invalid and can't be
matched against the current database, also return it when it cannot open
the log files properly.
2010-10-21 15:10:35 +00:00
Ulrich Spörlein
2914feeb7e mdoc: make pages render with mandoc
It's a bit more pedantic regarding .Bl list elements. This has an added
benefit of unbreaking the ipfw(8) manpage, where groff was silently
skipping one list element.
2010-10-21 12:27:13 +00:00
Pawel Jakub Dawidek
42e2e8990a Remove code duplication by introducing static gctl_param_add() function which
is now used by both gctl_ro_param() and gctl_rw_param().
2010-10-21 10:38:14 +00:00
Pawel Jakub Dawidek
91cca30d9c - Simplify gctl_get_handle() a bit.
- Prefer 'unsigned int' over 'u_int' in userland code.
2010-10-21 10:36:36 +00:00
David Xu
de1e74c6a5 Revert revision 214007, I realized that MySQL wants to resolve
a silly rwlock deadlock problem, the deadlock is caused by writer
waiters, if a thread has already locked a reader lock, and wants to
acquire another reader lock, it will be blocked by writer waiters,
but we had already fixed it years ago.
2010-10-20 02:34:02 +00:00
David Xu
a24bcc04b2 Set default type to PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, this
is the type we are using.
2010-10-18 23:37:56 +00:00
Pawel Jakub Dawidek
9a95b55311 Add links for libradius(3) functions. 2010-10-18 12:35:10 +00:00
David Xu
7672cbaaf9 Unbreak buildworld by including pthread_rwlockattr_setkind_np and
pthread_rwlockattr_getkind_np.
2010-10-18 09:44:21 +00:00
David Xu
bc15e58058 sort function name. 2010-10-18 05:16:44 +00:00
David Xu
7047ff7588 s/||/&& 2010-10-18 05:15:26 +00:00
David Xu
a6b9b59e04 Add pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the
functions set or get pthread_rwlock type, current supported types are:
   PTHREAD_RWLOCK_PREFER_READER_NP,
   PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
   PTHREAD_RWLOCK_PREFER_WRITER_NP,
default is PTHREAD_RWLOCK_PREFER_WRITER_NONCECURSIVE_NP, this maintains
binary compatible with old code.
2010-10-18 05:09:22 +00:00
Hans Petter Selasky
951acbc0ff - Add support for libusbhid in 32-bit compatibility mode.
- Add missing check for ugd_actlen being too small.
- Add missing inclusion guard to usbvar.h header file.
- This also fixes buildworld breakage since r213852.
2010-10-16 11:20:53 +00:00
Dimitry Andric
73438aeedc Remove two .endp's without matching .proc in lib/csu/ia64/crtn.S.
This allows it to assemble with newer binutils.

Reviewed by:	marcel
2010-10-15 21:40:20 +00:00
Hans Petter Selasky
698e791af5 - Add missing LibUSB API functions:
* libusb_strerror()
  * libusb_get_driver[_np]()
  * libusb_detach_kernel_driver[_np]()
- Factor out setting of non-blocking flag inside libusb.
- Add missing NULL check after libusb_get_device() call.
- Correct some wrong error codes due to copy and paste error.

PR:	usb/150546
Submitted by:	Robert Jenssen, Alexander Leidinger
Approved by:    thompsa (mentor)
2010-10-14 20:50:33 +00:00
Hans Petter Selasky
51fd3d75fe - Add support for LibUSB in 32-bit compatibility mode.
Approved by:    thompsa (mentor)
2010-10-14 20:38:18 +00:00
Hans Petter Selasky
a122154901 - Fix some compile warnings regarding comparing signed to unsigned.
Approved by:    thompsa (mentor)
2010-10-14 20:18:39 +00:00
Hans Petter Selasky
f1b5fa6e49 LibUSB (new API):
- Add a new API function to check the connected
status of the USB handle in the LibUSB v1.0 and
LibUSB v0.1 interfaces.

Approved by:    thompsa (mentor)
2010-10-14 20:04:36 +00:00
Rui Paulo
565424b2fd Clang related fixes:
* When calling syslog(), pass a format string.
* Define YY_NO_INPUT on nslexer.l

Submitted by:	Norberto Lopes <nlopes.ml at gmail.com>
2010-10-13 16:57:06 +00:00
Warner Losh
1aee0aeb6d Revert 212517 to restore pristine state of this file 2010-10-13 16:34:08 +00:00
Andriy Gapon
84803238a8 camlib.c: update one overlooked comment 2010-10-11 21:34:35 +00:00
Martin Matuska
e0f0e66dfe Upgrade xz to git snapshot as of 20101010
Approved by:	delphij (mentor)
MFC after:	1 month
2010-10-11 21:16:50 +00:00
Ed Schouten
eaeeb89e75 Fix reference to nonexistent manpage getuid(3).
Submitted by:	pluknet
2010-10-11 20:30:57 +00:00
Andriy Gapon
5bcc8fafda cam_get_device, cam_open_device: make behavior simpler and more deterministic
Remove or re-work support for the several features from the past:
- remove incomplete support for trimming slice/partition names
- remove mapping from old device names "sd" and "st"
- remove whitespace trimming
- remove unconditional skipping of leading 'r' in a device name
- skip leading 'n' or 'e' only if the following device name matches
  a list of known devices that support no-rewind and eject-on-close
  features; currently this is only sa(4)
- reflect the above changes in comments in code and in cam(3)
- remove a note cautioning against use of cam_get_device and
  cam_open_device in cam(3)

Reviewed by:	mjacob
2010-10-11 09:27:37 +00:00
Ulrich Spörlein
0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Ulrich Spörlein
7558f6b4f3 mdoc: fix manlint warnings by unbreaking mdoc syntax 2010-10-08 12:39:49 +00:00
David Xu
0935fc89af Oops, don't remove -fexceptions flag. 2010-10-08 01:53:33 +00:00
David Xu
0c3c9625a0 unwind.h was imported, gcc directory is no longer needed. 2010-10-08 01:47:14 +00:00
Dimitry Andric
14837164d2 Upgrade Clang and LLVM to the 2.8 release. See here for release notes:
http://llvm.org/releases/2.8/docs/ReleaseNotes.html

Approved by:	rpaulo (mentor)
2010-10-07 20:31:07 +00:00
Dimitry Andric
998bc5802e Vendor import of clang 2.8 release:
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_28@115870

Approved by:	rpaulo (mentor)
2010-10-07 16:35:05 +00:00
Dimitry Andric
49011b52fc Vendor import of llvm 2.8 release:
http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_28@115866

Approved by:	rpaulo (mentor)
2010-10-07 16:32:35 +00:00
Konstantin Belousov
3ac535965a Missed space.
Submitted by:	brueffer
MFC after:	1 week
2010-10-06 09:24:33 +00:00
Konstantin Belousov
866dcc9462 Add cross-references to lrand48(3) and arc4random(3) from rand(3)
and random(3).

Submitted by:	Valentin Nechayev <netch netch kiev ua>
MFC after:	1 week
2010-10-06 09:05:47 +00:00
Hajimu UMEMOTO
c618a8562e When no protocol entry is found, getproto*_r(3) should
return zero.

Spotted by:	Kostik Belousov <kostikbel__at__gmail.com>
MFC after:	2 weeks
2010-10-05 15:40:59 +00:00
Ed Maste
2cf6dafa3e Handle null return from XML_ParserCreate and fix a few memory leaks on
error conditions.

Submitted by:	Mark Johnston <mjohnston at sandvine dot com>
MFC after:	2 weeks
2010-10-05 15:27:44 +00:00
Dimitry Andric
e7032b4cdd Change libvgl's set4pixels() and set2lines() functions from plain
'inline' to 'static inline'.  Otherwise, a C99 compiler (such as clang)
will output an undefined symbol for those functions in the resulting
object file.  (Even gcc will do this, when you use "-std=c99".)

This should fix the "undefined reference to `set4pixels'" errors that
some people were seeing during ports building, when their world was
compiled with clang.

Approved by:	rpaulo (mentor)
2010-10-04 18:16:38 +00:00
Hajimu UMEMOTO
f700faa590 Clear errno for each method dispatch.
Spotted by:	Kostik Belousov <kostikbel__at__gmail.com>
MFC after:	2 weeks
2010-10-04 15:28:01 +00:00
George V. Neville-Neil
51cc3ad710 Fix punctuation and grammar, mostly by ending sentences with a period.
MFC after:	1 day
2010-10-04 14:32:14 +00:00
Dimitry Andric
b3b74eb4e1 Use __FBSDID() instead of RCSID() in most .S files under lib/msun/i386,
and one under lib/msun/amd64.  This avoids adding the identifiers to the
.text section, and moves them to the .comment section instead.

Suggested by:	bde
Approved by:	rpaulo (mentor)
2010-10-01 20:14:36 +00:00
Jilles Tjoelker
220856f376 libc: Remove the i386 assembler version of strlen(3).
On anything modern, the C version, which processes a word at a time, is much
faster. The Intel optimization manual explicitly warns against using REP
prefixes with SCAS or CMPS, which is exactly what the assembler version
does.

A simple test on a Phenom II showed the C version, compiled with -O2, to be
about twice as fast determining the length of 100000 strings between 0 and
255 bytes long.

MFC after:	2 weeks
2010-10-01 13:10:11 +00:00
Dimitry Andric
3c1594be0a Retire the amd64 and i386 specific inline assembly versions of ldexp.c,
as they are slower than the generic version in C, at least on modern
hardware.  This leaves us with just five implementations.

Suggested by:	bde
Approved by:	rpaulo (mentor)
2010-09-30 19:20:21 +00:00
David Xu
722488013d change code to use unwind.h. 2010-09-30 12:59:56 +00:00
Dimitry Andric
12894d9d66 Apply the same workaround for clang to amd64's version of ldexp.c (as in
r212976): order the incoming arguments to fscale as st(0), st(1), and
mark temp2 volatile (only in case of compilation with clang) to force
clang to pop it correctly.  No binary change when compiled with gcc.

This fixes ldexp() when compiled with clang on amd64, which makes
drand48() and friends work correctly again, and this in turn fixes
perl's tempfile().

Reported by:	Renato Botelho, Derek Tattersall
Approved by:	rpaulo (mentor)
2010-09-29 21:20:29 +00:00
David Xu
ec92603cf9 Check invalid mutex in _mutex_cv_unlock. 2010-09-29 06:06:58 +00:00
David Xu
bbb64c2143 In current code, statically initialized and destroyed object have
same null value, the code can not distinguish between them, to
fix the problem, now a destroyed object is assigned to a non-null
value, and it will be rejected by some pthread functions.
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP is changed to number 1, so that
adaptive mutex can be statically initialized correctly.
2010-09-28 04:57:56 +00:00
Ed Maste
f657d618ce Increase maximum network timeout from 20s to 120s. Given that an ETIMEDOUT
return from sendrecv probably means a failure to boot we might as well be
generous in the timeout period.
2010-09-28 01:30:49 +00:00
David Xu
1d5b5089aa Report death event to debugger before moving to gc list, otherwise
debugger may can not find it on thread list.
2010-09-26 06:45:24 +00:00
David Xu
8be6abcdc6 Only access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined. 2010-09-25 09:43:24 +00:00
David Xu
9f1dc4c107 Add missing field. 2010-09-25 08:36:46 +00:00
David Xu
8690b9f6dd Because old _pthread_cleanup_push/pop do not have frame address,
it is incompatible with stack unwinding code, if they are invoked,
disable stack unwinding for current thread, and when thread is
exiting, print a warning message.
2010-09-25 06:27:09 +00:00