summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the num variable to avoid uninitialized data.kevlo2012-09-271-2/+2
| | | | | | This fixes the bug introduced by r238378. Reviewed by: pfg
* Revert r240850 and remove redundant NULL check before free(3).kevlo2012-09-241-8/+4
| | | | | | free(3) handles NULL parameter fine. Reviewed by: kib, Garrett Cooper
* Partial revert of r239963:pfg2012-09-241-4/+0
| | | | | | | | | | | | | | | | | The following change caused rpc.lockd to exit after startup: ____ libtirpc: be sure to free cl_netid and cl_tp When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. ____ MFC after: 3 days Reported by: David Wolfskill Tested by: David Wolfskill
* * ld80/s_expl.c:kargl2012-09-232-9/+6
| | | | | | | | | | | | | | | | . Fix the threshold for expl(x) where |x| is small. . Also update the previously incorrect comment to match the new threshold. * ld128/s_expl.c: . Re-order logic in exceptional cases to match the logic used in other long double functions. . Fix the threshold for expl(x) where is |x| is small. . Also update the previously incorrect comment to match the new threshold. Submitted by: bde Approved by: das (mentor)
* Fix whitespace issue.kargl2012-09-231-1/+1
| | | | Approved by: das (mentor, implicit)
* * ld80/s_expl.c:kargl2012-09-232-13/+17
| | | | | | | | | | | | | | | | | . Guard a comment from reformatting by indent(1). . Re-order variables in declarations to alphabetical order. . Remove a banal comment. * ld128/s_expl.c: . Add a comment to point to ld80/s_expl.c for implementation details. . Move the #define of INTERVAL to reduce the diff with ld80/s_expl.c. . twom10000 does not need to be volatile, so move its declaration. . Re-order variables in declarations to alphabetical order. . Add a comment that describes the argument reduction. . Remove the same banal comment found in ld80/s_expl.c. Reviewed by: bde Approved by: das (mentor)
* * Update the lookup table to use 53-bit high and low values.kargl2012-09-231-131/+134
| | | | | | | | | | | | | Also, update the comment to describe the choice of using a high and low decomposition of 2^(i/INTERNVAL) for 0 <= i <= INTERVAL in preparation for an implementation of expm1l. * Move the #define of INTERVAL above the comment, because the comment refers to INTERVAL. Reviewed by: bde Approved by: das (mentor)
* Avoid NULL dereferencekevlo2012-09-231-2/+4
|
* * Use ENTERI() and RETURNI() to toggle the rounding precision ifkargl2012-09-223-6/+21
| | | | | | | | | necessary, so that cosl(), sinl() and tanl() work on i386 even for naive callers. Suggested by: bde Reviewed by: bde Approved by: das (mentor)
* * Make STRICT_ALIGN() work for doubles as well as for floats. Thiskargl2012-09-221-2/+2
| | | | | | | | | | | | | | | only affects i386. The double case was intentionally left broken as an optimization, but we are getting closer to supporting applications and/or kernels that change the (FreeBSD i386) default rounding precision from FP_PD to FP_PE and never change it back, and this requires the STRICT_ALIGN()s that were added to support FP_PE to actually work in all precisions. * Remove an extraneous semicolon at the end of a macro that was supposed to be function-like. Submitted by: bde Approved by: das (mentor)
* Make nfs_readdir() more careful about using response data, cached in globalmav2012-09-211-20/+24
| | | | | | buffer. For now it fixes bug when following `ls` command will return data from previous one aborted by pager. Also it should allow to read several directories same time, for example, for recursive tracerse.
* Don't use global nfs_root_node variable as per-file storage. There aremav2012-09-211-51/+35
| | | | fields that should be file-specific.
* Restore handling of the third argument (id) of hid_start_parse(), same asmav2012-09-203-9/+23
| | | | | | | | | | | | it is done in NetBSD/OpenBSD, and as it was here before r205728. I personally think this API or its implementation is incorrect, as it is not correct to filter collections based on report ID, as they are orthogonal in general case, but I see no harm from supporting this feature. PR: usb/171810 Submitted by: Vitaly Magerya <vmagerya@gmail.com> MFC after: 1 month
* Remove the restrict qualifier to match function prototype.kevlo2012-09-201-1/+1
|
* strsignal(): Reindent.jilles2012-09-191-21/+21
|
* strsignal(): Do not append signal numbers to messages for known signals.jilles2012-09-191-1/+1
| | | | | Messages for known signals looked like "Terminated: 15" instead of "Terminated".
* Optimise i387 trigonometric functions. Replace "andw 0x400,%ax \ jnz" withtijl2012-09-163-16/+16
| | | | "sahf \ jp", "fprem1" with "fprem" and "fstsw %ax" with "fnstsw %ax".
* Correct double "the the"eadler2012-09-141-1/+1
| | | | | Approved by: cperciva MFC after: 3 days
* Bump date missed in r202756eadler2012-09-141-1/+1
| | | | | | | PR: docs/171624 Submitted by: bdrewery Approved by: gabor MFC after: 3 days
* Use libmd if and only if OpenSSL is not available.des2012-09-142-2/+10
| | | | | PR: bin/171402 MFC after: 3 days
* Adding missing return statements during error conditions.eadler2012-09-141-2/+8
| | | | | | | | PR: kern/171187 Submitted by: Mark Johnston <markjdb@gmail.com> Reviewed by: des Approved by: cperciva MFC after: 2 weeks
* According to a clarification at http://austingroupbugs.net/view.php?id=503emaste2012-09-122-4/+3
| | | | | | | ptsname may set errno, so avoid saving and restoring errno across the function. PR: standards/171572
* Avoid mapping ENOENT to ENOTDIR for non-existent path components.emaste2012-09-121-2/+0
| | | | | | | | | | | | | | | The ENOTDIR mapping was introduced in r235266 for kern/128933 based on an interpretation of the somewhat ambiguous language in the POSIX realpath specification. The interpretation is inconsistent with Solaris and Linux, a regression from 9.0, and does not appear to be permitted by the description of ENOTDIR: 20 ENOTDIR Not a directory. A component of the specified pathname existed, but it was not a directory, when a directory was expected. PR: standards/171577 MFC after: 3 days
* Fix IEC / SI binary prefixes (Ki, Mi, Gi, etc) production by humanize_number(3)bapt2012-09-121-1/+1
| | | | | | PR: bin/171487 Submitted by: matthew MFC after: 1 week
* Describe in detail required conditions for receiving the SCM_CREDSglebius2012-09-121-4/+18
| | | | | control message and suggest to use LOCAL_CREDS setsockopt() for reliability.
* r235638 is not the clean way to add support for building on ancient FreeBSDobrien2012-09-112-5/+3
| | | | | | | | versions. Instead use Imp's good work on "legacy" and follow the outcome of the previous TRB discussions on this topic. Now use the libc getline() if it exists, and only where it doesn't create a bootstraping version.
* Minor mdoc fix.joel2012-09-111-5/+5
|
* Add the same warning to rand48(3) as to rand(3) and random(3).des2012-09-112-5/+10
| | | | MFC after: 3 days
* If the IdlePDPT is not present, PAE is not activekevlo2012-09-101-1/+0
|
* When calling the C++ demangler, make sure to free the returned buffer,rpaulo2012-09-071-6/+24
| | | | | | which might have been reallocated. Pointed out by: stefanf
* libc/amd64: Do not export .cerror.jilles2012-09-0612-88/+9
| | | | | | | | | | | | | | | | | For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit in the FBSDprivate_1.0 version. It looks like there is no reason for this since it is not used from other libraries. Given that it cannot be accessed from C and its strange calling convention, it is rather unlikely that other things rely on it. Perhaps it is from a time when symbols could not be hidden. Most of the amd64 assembler code jumps to .cerror using the GOT. It can jump to it directly now, as in non-PIC mode. There are also some minor size optimizations to instructions but they yield virtually no benefit in the size of libc.so.7 due to padding. Reviewed by: kib
* Avoid segfault if name is invalid. Basically, onlytrhodes2012-09-061-2/+5
| | | | | | | check for CTL_USER if the sysctl fails with ENOENT. PR: 169056 Reviewed by: jhb
* Remove trailing whitespace.joel2012-09-061-53/+53
|
* Minor mdoc fix.joel2012-09-061-1/+0
|
* Add Intel Ivy Bridge support to hwpmc(9).fabient2012-09-064-52/+1017
| | | | | | | | | | Update offcore RSP token for Sandy Bridge. Note: No uncore support. Will works on Family 6 Model 3a. MFC after: 1 month Tested by: bapt, grehan
* Add support for demangling C++ symbols. This requires linking libproc withrpaulo2012-09-062-2/+22
| | | | | | libc++rt/libsupc++. Discussed with: theraven
* Fix test cases to work with the latest version of the API.rpaulo2012-09-062-3/+4
|
* libc/i386: Do not export .cerror.jilles2012-09-0511-41/+19
| | | | | | | | | | | | | | | | | | | | | | | For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit in the FBSDprivate_1.0 version. It looks like there is no reason for this since it is not used from other libraries. Given that it cannot be accessed from C and its strange calling convention, it is rather unlikely that other things rely on it. Perhaps it is from a time when symbols could not be hidden. Not exporting .cerror causes it to be jumped to directly instead of via the PLT. This change also takes advantage of .cerror's new status by not saving and loading %ebx before jumping to it. (Therefore, .cerror now saves and loads %ebx itself.) Where there was a conditional jump to a jump to .cerror, the conditional jump has been changed to jump to .cerror directly (many modern CPUs don't do static prediction and in any case it is not much of a benefit anyway). This change makes libc.so.7 a few kilobytes smaller. Reviewed by: kib
* When WIFCONTINUED was added, the number of "first" macros grew fromjhb2012-09-051-1/+1
| | | | | | three to four. MFC after: 1 week
* Bump dates.des2012-09-042-2/+2
| | | | Reminded by: bz@
* Add a prominent warning about these functions' unsuitability fordes2012-09-042-13/+17
| | | | cryptographic purposes, and recommend using arc4random(3) instead.
* Add __BEGIN_DECLS and __END_DECLS to make libprocstat more C++-friendly.trociny2012-09-041-0/+2
| | | | | Submitted by: Daniel Dettlaff <dmilith gmail com> MFC after: 1 week
* Make sure we visit both symbol sections even if one of them doesn'trpaulo2012-09-021-24/+21
| | | | exist. This makes it possible to dtrace some C++ programs like devd.
* Rework all non-contributed files that use `struct timezone'.ed2012-09-012-2/+2
| | | | | | | | | | | | | | This structure is not part of POSIX. According to POSIX, gettimeofday() has the following prototype: int gettimeofday(struct timeval *restrict tp, void *restrict tzp); Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is not used). Remove dead error handling code. Also use NULL for a nul-pointer instead of integer 0. While there, change all pieces of code that only use tv_sec to use time(3), as this provides less overhead.
* Bring some changes from Bull's NFSv4 libtirpc implementation.pfg2012-09-019-19/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We especifically ignored the glibc compatibility changes but this should help interaction with Solaris and Linux. ____ Fixed infinite loop in svc_run() author Steve Dickson Tue, 10 Jun 2008 12:35:52 -0500 (13:35 -0400) Fixed infinite loop in svc_run() ____ __rpc_taddr2uaddr_af() assumes the netbuf to always have a non-zero data. This is a bad assumption and can lead to a seg-fault. This patch adds a check for zero length and returns NULL when found. author Steve Dickson Mon, 27 Oct 2008 11:46:54 -0500 (12:46 -0400) ____ Changed clnt_spcreateerror() to return clearer and more concise error messages. author Steve Dickson Thu, 20 Nov 2008 08:55:31 -0500 (08:55 -0500) ____ Converted all uid and gid variables of the type uid_t and gid_t. author Steve Dickson Wed, 28 Jan 2009 12:44:46 -0500 (12:44 -0500) ____ libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed These fields in the rpcbind GETADDR call are being passed uninitialized to CLNT_CALL. In the case of x86_64 at least, this usually leads to a segfault. On x86, it sometimes causes segfaults and other times causes garbage to be sent on the wire. rpcbind generally ignores the r_owner field for calls that come in over the wire, so it really doesn't matter what we send in that slot. We just need to send something. The reference implementation from Sun seems to send a blank string. Have ours follow suit. author Jeff Layton Fri, 13 Mar 2009 11:44:16 -0500 (12:44 -0400) ____ libtirpc: be sure to free cl_netid and cl_tp When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. author Jeff Layton Fri, 13 Mar 2009 11:47:36 -0500 (12:47 -0400) Obtained from: Bull GNU/Linux NFSv4 Project MFC after: 3 weeks
* Teach libdwarf about the DW_FORM_flag_present dwarf attribute, sodim2012-08-294-0/+9
| | | | | | | programs using libdwarf (such as ctfconvert) don't error out on files containing the attribute. MFC after: 2 weeks
* In suspend_common(), don't wait for a thread which is in creation, becausedavidxu2012-08-275-4/+64
| | | | | | | pthread_suspend_all_np() may have already suspended its parent thread. Add locking code in pthread_suspend_all_np() to only allow one thread to suspend other threads, this eliminates a deadlock where two or more threads try to suspend each others.
* Add libcxxrt's objects (prefixing them with cxxrt_ to avoid collisions)dim2012-08-251-1/+18
| | | | | | | to libc++.a and libc++_p.a, to make static linking of C++ executables with libc++ easier. This is similar to the approach used in libstdc++. MFC after: 2 weeks
* Sprinkle a bit of style.Makefile(5) across various clang Makefiles. Nodim2012-08-232-14/+14
| | | | | | functional changes. MFC after: 3 days
* Eliminate redundant code, _thr_spinlock_init() has already been calleddavidxu2012-08-231-3/+0
| | | | in init_private(), don't call it again in fork() wrapper.
OpenPOWER on IntegriCloud