summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix two nits in previous commit pointed out by pjd@.des2012-01-231-2/+1
| | | | MFC after: 3 weeks
* Clarify the implementation-defined behaviour in case of close(2)kib2012-01-221-1/+5
| | | | | | returning error. MFC after: 1 week
* The sys/uio.h header is needed only for readv(2), preadv(2), writev(2) andpjd2012-01-222-4/+4
| | | | | | | pwritev(2). Document it more precisely. Reviewed by: jilles MFC after: 3 days
* Use getcontextx(3) internal API instead of getcontext(2) to providekib2012-01-211-4/+13
| | | | | | | | | | | | | the signal handlers with the context information in the deferrred case. Only enable the use of getcontextx(3) in the deferred signal delivery code on amd64 and i386. Sparc64 seems to have some undetermined issues with interaction of alloca(3) and signal delivery. Tested by: flo (who also provided sparc64 harware access for me), pho Discussed with: marius MFC after: 1 month
* Add API for obtaining extended machine context states that cannot bekib2012-01-2119-10/+693
| | | | | | | | | | | fit into existing mcontext_t. On i386 and amd64 do return the extended FPU states using getcontextx(3). For other architectures, getcontextx(3) returns the same information as getcontext(2). Tested by: pho MFC after: 1 month
* This commit adds profiling support for powerpc64. Now we can do applicationandreast2012-01-201-1/+1
| | | | | | | | | | | | | profiling and kernel profiling. To enable kernel profiling one has to build kgmon(8). I will enable the build once I managed to build and test powerpc (32-bit) kernels with profiling support. - add a powerpc64 PROF_PROLOGUE for _mcount. - add macros to avoid adding the PROF_PROLOGUE in certain assembly entries. - apply these macros where needed. - add size information to the MCOUNT function. MFC after: 3 weeks, together with r230291
* Conditionalize the __floatunsisf and __floatunsidf functions, added indas2012-01-201-0/+4
| | | | | | NetBSD's rev 1.6 of this file, on !defined(SOFTFLOAT_FOR_GCC). These functions are provided by libgcc, so we don't need them. This should unbreak mips.
* Fix a small nit noted by bde: exp_x should be of type float, not double.das2012-01-201-1/+1
|
* Add a change I missed in r230367 (don't inline arm's fenv.h functions).das2012-01-201-1/+0
|
* Remove an errant `#define dprintf printf'. It seems to be leftoverdas2012-01-201-2/+0
| | | | | debugging code that nothing depends on. (I've had this in my tree for years without issue.)
* Don't inline fenv.h functions on arm for now. Inlining makes sense:das2012-01-204-13/+33
| | | | | | | | the function bodies require only 2 to 10 instructions. However, it leads to application binaries that refer to a private ABI, namely, the softfloat innards in libc. This could complicate future changes in the implementation of the floating-point emulation layer, so it seems best to have programs refer to the official fe* entry points in libm.
* Merge in the latest SoftFloat changes from NetBSD. (NetBSD isn't thedas2012-01-2019-16/+555
| | | | | | | original vendor, but we're using their heavily modified version.) This brings in functions for long double emulation (both extended and quad formats), which may be useful for testing, and also for replacing libc/sparc64/fpu/.
* Rev 228065 (change bsd.own.mk -> bsd.init.mk) broke pam_unix.so by causingpeter2012-01-181-2/+2
| | | | | | | | | | | | the LDADD/DPADD to lose the -lpam, and causing openpam_dynamic() to fail due to "openpam_get_options" being undefined. This would cause obscure console log messages like: openpam_dynamic(): No error: 0 openpam_load_module(): no pam_unix.so found and other helpful messages which are no help in diagnosing the problem. Fortunately this change was not mfc'ed to 9.x, it isn't broken there.
* Fix two issues related to the use of SIGINFO in fetch(1) to displaydes2012-01-183-7/+75
| | | | | | | | | | | | | progress information. The first is that fetch_read() (used in the HTTP code but not the FTP code) can enter an infinite loop if it has previously been interrupted by a signal. The second is that when it is interrupted, fetch_read() will discard any data it may have read up to that point. Luckily, both bugs are extremely timing-sensitive and therefore difficult to trigger. PR: bin/153240 Submitted by: Mark <markjdb@gmail.com> MFC after: 3 weeks
* Remove unnecessary includes from these libutil man pages.ghelmer2012-01-163-4/+0
| | | | Requested by bde (as was the previous commit).
* Fix more disorder in prototypes and constants.ghelmer2012-01-161-46/+43
| | | | | | Fix header comments for each section of constants. Fix whitespace in #define lines. Fix unnecessary parenthesis in constants.
* Insert read memory barriers.davidxu2012-01-162-1/+2
|
* Computations on NaNs are supposed to return one of the input NaNs unchanged.das2012-01-162-4/+3
| | | | | | | Fix a few places in the sparc64 floating-point emulator where this wasn't being handled properly. Submitted by: bde
* Add an implementation of fenv.h intended for platforms that lack an FPU anddas2012-01-164-6/+205
| | | | | | | use softfloat. Thanks to Ian Lepore for testing and debugging this patch. The fenv regression tests pass (at least for Ian's arm chip) with this change.
* Implement FLT_ROUNDS for arm. Some (all?) arm FPUs lack support fordas2012-01-162-1/+64
| | | | | | | | dynamic rounding modes, but FPUless chips that use softfloat can support it because everything is emulated anyway. (We presently have incomplete support for hardware FPUs.) Submitted by: Ian Lepore
* Remove functions from softfloat's Symbol.map that don't need to be exported.das2012-01-162-20/+14
| | | | | | Also use the proper number of underscores for internal names. (Changing the names should be fine, since apparently the symbols are currently unused.)
* Convert softfloat to use the standard exception flag and rounding macrosdas2012-01-165-34/+34
| | | | | | in fenv.h instead of the non-standard and incomplete ones in ieeefp.h. Thanks to Ian Lepore for testing this patch.
* Correct some bugs that resulted from arm/_fpmath.h being blindly copieddas2012-01-161-1/+2
| | | | | | | from the x86 version, which has a completely different long double format. Submitted by: Maks Verver
* Make man page wording more clear:eadler2012-01-151-1/+1
| | | | | | | PR: docs/164078 Submitted by: Taras <ds@ukrhub.net> Approved by: bcr MFC after: 3 days
* In kvm_argv(), the case when the supplied buffer was too short to hold thetrociny2012-01-151-23/+31
| | | | | | | | | | requested value was handled incorrectly, and the function retuned NULL instead of the truncated result. Fix this and also remove unnecessary check for buf != NULL, which alway retuns true. MFC after: 3 days
* Remove wtmpcvt(1).ed2012-01-131-1/+0
| | | | | | | | The wtmpcvt(1) utility converts wtmp files to the new format used by utmpx(3). Now that HEAD has been branched to stable/9 and 9.0 is released, there is no need for it in HEAD. MFC after: never
* Move struct pidfh definition into pidfile.c, and leave a forward declarationghelmer2012-01-122-12/+13
| | | | | | | | | for pidfh in libutil.h in its place. This allows us to hide the contents of the pidfh structure, and also allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the pidfile_* function prototypes. Suggested by pjd.
* Fix disorder in MAN and MLINKS lists.ghelmer2012-01-121-37/+37
| | | | Requested by bde.
* More prototype formatting fixes, struct member formatting fixes,ghelmer2012-01-121-10/+17
| | | | | | and namespace fix for property_find() prototype. Provided by bde.
* pidfile_open() no longer uses fcntl() to set the close-on-exec flag.ghelmer2012-01-121-2/+1
|
* Fix prototype formatting (indentation, long lines, and continued lines).ghelmer2012-01-111-23/+30
| | | | Requested by bde.
* Fix namespace issues with prototype parameter names.ghelmer2012-01-111-32/+32
| | | | | | Add missing prototype parameter names. Requested by bde.
* Fix forward structure declaration and prototype disorder.ghelmer2012-01-111-34/+33
| | | | Requested by bde.
* jilles pointed out that O_CLOEXEC could be used in the open(2) flagsghelmer2012-01-111-14/+1
| | | | | | rather than using fcntl(2) later, and in addition to saving a system call, removes a possible race with fork/exec from threads or signal handlers.
* Constify arguments.pjd2012-01-112-3/+3
|
* Add link for pidfile_fileno.3 to pidfile.3 - thanks again pjd!ghelmer2012-01-101-1/+2
|
* Style fixes courtesy of pjd.ghelmer2012-01-102-2/+5
|
* Document that pidfile_open() now sets the FD_CLOEXEC flag on the openghelmer2012-01-101-0/+4
| | | | | file descriptor, and that errors can be returned as a result of the fcntl(2) system call.
* Revert unintentional commit of changes to getnetgrent.c.ghelmer2012-01-101-28/+13
|
* Add pidfile_fileno() to obtain the file descriptor for an openghelmer2012-01-104-15/+67
| | | | pidfile.
* Set the FD_CLOEXEC flag on the open pidfile file descriptor.ghelmer2012-01-101-0/+14
| | | | Discussed with: pjd, des
* Add aligned_alloc(3).ed2012-01-094-9/+55
| | | | | | | | | The C11 folks reinvented the wheel by introducing an aligned version of malloc(3) called aligned_alloc(3), instead of posix_memalign(3). Instead of returning the allocation by reference, it returns the address, just like malloc(3). Reviewed by: jasone@
* X11BASE has been deprecated for a long time and will die sooneadler2012-01-091-1/+1
| | | | | | Approved by: x11 (eadler) Approved by: brucec MFC after: 1 week
* Properly sort functions by name.ed2012-01-081-3/+3
|
* Two other places where we can use WEAK_ALIAS.andreast2012-01-082-6/+2
|
* Convert files to UTF-8 and add some copyright markers where missing.uqs2012-01-0714-16/+17
|
* Implement fdlopen(3), an rtld interface to load shared object by filekib2012-01-074-3/+47
| | | | | | | | descriptor. Requested and tested by: des (previous version) Reviewed by: des, kan (previous version) MFC after: 2 weeks
* Handle the internal scope address representation of the KAME IPv6ume2012-01-071-1/+2
| | | | | | | stack for the node-local multicast address. Spotted by: Rainer Bredehorn <Bredehorn__at__gmx.de> MFC after: 1 week
* Handle memory allocation failures in devstat_getdevs(), devstat_selectdevs(),ghelmer2012-01-061-10/+30
| | | | | | | and devstat_buildmatch(). PR: bin/83359 Reviewed by: ken
* Use the macro WEAK_ALIAS. Tested on 32 and 64-bit.andreast2012-01-062-20/+10
|
OpenPOWER on IntegriCloud