aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert r231673 and r231682 for now, until we can run a full makeDimitry Andric2012-02-145-115/+29
| | | | | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks Notes: svn path=/head/; revision=231714
* Fix a misplaced __NO_TLS locations, and change a GNUism to a C11ism forDavid Chisnall2012-02-142-3/+5
| | | | | | | | | consistency. Approved by: brooks (mentor) Notes: svn path=/head/; revision=231682
* Cleanup of xlocale:David Chisnall2012-02-145-29/+113
| | | | | | | | | | | | | | | | | | | - Address performance regressions encountered by das@ by caching per-thread data in TLS where available. - Add a __NO_TLS flag to cdefs.h to indicate where not available. - Reorganise the xlocale.h definitions into xlocale/*.h so that they can be included from multiple places. - Export the POSIX2008 subset of xlocale when POSIX2008 says it should be exported, independently of whether xlocale.h is included. - Fix the bug where programs using ctype functions always assumed ASCII unless recompiled. - Fix some style(9) violations. Reviewed by: brooks (mentor) Approved by: dim (mentor) Notes: svn path=/head/; revision=231673
* wctob() returns EOF and not WEOF.Xin LI2012-02-141-2/+2
| | | | | | | | Noticed by: Zhihao Yuan <lichray gmail com> MFC after: 1 week Notes: svn path=/head/; revision=231632
* Add thread-local storage support for arm:Oleksandr Tymoshenko2012-02-142-4/+5
| | | | | | | | - Switch to Variant I TCB layout - Use function from rtld for TCB allocation/deallocation Notes: svn path=/head/; revision=231619
* Add __aeabi_read_tp function required for thread-local storageOleksandr Tymoshenko2012-02-142-1/+43
| | | | | | | Reviewed by: cognet Notes: svn path=/head/; revision=231616
* Globally replace u_int*_t from (non-contributed) man pages.Ed Schouten2012-02-1212-54/+54
| | | | | | | | | | | | | | The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month Notes: svn path=/head/; revision=231564
* MFp4 204292:Bjoern A. Zeeb2012-02-111-0/+12
| | | | | | | | | | | | | Ignore the NAT_T extension types so we can at least dump the SADB from the in-base libipsec/setkey without error when NAT_T support is present in the kernel, though not printing the additional information yet. However in case there is no NAT_T support in kernel still consider them to be an error. MFC after: 8 weeks Notes: svn path=/head/; revision=231532
* Replace utxrm(8) by utx(8).Ed Schouten2012-02-111-1/+1
| | | | | | | | | | | | | At first, I added a utility called utxrm(8) to remove stale entries from the user accounting database. It seems there are cases in which we need to perform different operations on the database as well. Simply rename utxrm(8) to utx(8) and place the old code under the "rm" command. In addition to "rm", this tool supports "boot" and "shutdown", which are going to be used by an rc-script which I am going to commit separately. Notes: svn path=/head/; revision=231530
* Use the correct constant (with same value) for comparying the SA type.Bjoern A. Zeeb2012-02-111-1/+1
| | | | | | | | | PR: kern/142741 Submitted by: Matthijs Kooiman (matthijs stdin.nl) MFC after: 3 days Notes: svn path=/head/; revision=231515
* Set read buffer size to multiple of sizeof(struct futx).Ed Schouten2012-02-111-7/+12
| | | | | | | | | | | | If the utmpx database gets updated while an application is reading it, there is a chance the reading application processes partially overwritten entries. To solve this, make sure we always read a multiple of sizeof(struct futx) at a time. MFC after: 2 weeks Notes: svn path=/head/; revision=231514
* Switch getifaddrs(3) to the new API introduced in r231505. Also removeBjoern A. Zeeb2012-02-111-122/+47
| | | | | | | | | | | | | | | | conditional code parts not used by or applicable to FreeBSD. The new implementation is supposed to be able to cope with changes to the 'l' versions of the msghdr structs now used as well as to if_data allowing future changes without breaking things. This restores carp(4) config support in HEAD after r231504. Reviewed by: glebius, brooks MFC After: 3 months Notes: svn path=/head/; revision=231506
* Introduce a new NET_RT_IFLISTL API to query the address list. It worksBjoern A. Zeeb2012-02-111-1/+15
| | | | | | | | | | | | | | on extended and extensible structs if_msghdrl and ifa_msghdrl. This will allow us to extend both the msghdrl structs and eventually if_data in the future without breaking the ABI. Bump __FreeBSD_version to allow ports to more easily detect the new API. Reviewed by: glebius, brooks MFC after: 3 days Notes: svn path=/head/; revision=231505
* Backout changes from r228571. Remove if_data from struct ifa_msghdr again.Bjoern A. Zeeb2012-02-111-1/+1
| | | | | | | | | | While this breaks carp on HEAD temporary, it restores the upgrade path from stable, and head before 20111215. Reviewed by: glebius, brooks Notes: svn path=/head/; revision=231504
* Make code more stable by checking NULL pointers.David Xu2012-02-111-2/+6
| | | | Notes: svn path=/head/; revision=231503
* Unbreak build.Ed Schouten2012-02-101-1/+1
| | | | | | | libprocstat still uses __si_namebuf. Notes: svn path=/head/; revision=231384
* Detect file modification properly by using tv_nsec.Ed Schouten2012-02-101-1/+2
| | | | | | | | | | POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond precision to detect file modification. MFC after: 2 weeks Notes: svn path=/head/; revision=231383
* Switch MIPS TLS implementation to Variant I:Oleksandr Tymoshenko2012-02-102-13/+20
| | | | | | | | Save pointer to the TLS structure taking into account TP_OFFSET and TCB structure size. Notes: svn path=/head/; revision=231350
* Fix NULL ptr dereference in setusercontext if pwd is null,Eitan Adler2012-02-091-3/+6
| | | | | | | | | | | | | | LOGIN_SETPRIORITY is set, and setting the priority (rtprio or setpriority) fails. PR: kern/164238 Submitted by: Alexander Wittig <alexander@wittig.name> Reviewed by: des Approved by: cperciva MFC after: 1 month Notes: svn path=/head/; revision=231306
* More accurately document what happens on error.Eitan Adler2012-02-091-3/+6
| | | | | | | | | | PR: docs/127908 Submitted by: Matthew D. Fuller <fullermd@over-yonder.net> Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=231299
* Acknowledge that jail_attach and jail_remove can return EPERM.Jamie Gritton2012-02-081-1/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=231236
* eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r andBrooks Davis2012-02-081-7/+0
| | | | | | | | | | | ether_nota_r and do not use static variables so remove the note copied from ethers.3 saying they do. Reported by: bms MFC after: 3 days Notes: svn path=/head/; revision=231196
* Add a comment to the example that pidfile_* functions can handle pfh being NULL.Pawel Jakub Dawidek2012-02-081-0/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=231193
* Note that calling pidfile_write(3) multiple times is fine.Pawel Jakub Dawidek2012-02-081-1/+4
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=231192
* Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessorDimitry Andric2012-02-074-4/+4
| | | | | | | | | set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp. MFC after: 1 week Notes: svn path=/head/; revision=231118
* Plug a memory leak. When a cached thread is reused, don't clear sleepDavid Xu2012-02-072-12/+19
| | | | | | | | | | queue pointers, just reuse it. PR: 164828 MFC after: 1 week Notes: svn path=/head/; revision=231106
* Using the O_CLOEXEC flag on open(2) caused the pidfile lock to be lostGuy Helmer2012-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | when the child process execs daemon's target program thanks to flock(2) semantics. So, we apparently have to leak the open pidfile's file descriptor to keep the lock for the pidfile(3) functions to work properly. Test case demonstrated by trociny: ref8-amd64:/home/trociny% uname -r 8.2-STABLE ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10 ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10 daemon: process already running, pid: 19799 kopusha:~% uname -r 10.0-CURRENT kopusha:~% daemon -p /tmp/sleep.pid sleep 10 kopusha:~% daemon -p /tmp/sleep.pid sleep 10 kopusha:~% Notes: svn path=/head/; revision=231087
* Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,Dimitry Andric2012-02-0519-0/+197
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that builds the following additional llvm/clang tools: - bugpoint - llc - lli - llvm-ar - llvm-as - llvm-bcanalyzer - llvm-diff - llvm-dis - llvm-extract - llvm-ld - llvm-link - llvm-mc - llvm-nm - llvm-objdump - llvm-prof - llvm-ranlib - llvm-rtdyld - llvm-stub - macho-dump - opt These tools are mainly useful for people that want to manipulate llvm bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker with llvm and clang themselves. MFC after: 2 weeks Notes: svn path=/head/; revision=231057
* | Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE whichAndreas Tobler2012-02-054-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | has the same API as __weak_reference(). Give 'x' in SYS.h a more meaningful name. Tested on 32- and 64-bit PowerMac. Reviewed by: bde Notes: svn path=/head/; revision=231044
* | Try to avoid ambiguity when sysctl returns ENOMEM additionallyMikolaj Golub2012-02-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | checking the returned oldlen: when ENOMEM is due to the supplied buffer being too short the return oldlen is equal to buffer size. Without this additional check kvm_getprocs() gets stuck in loop if the returned ENOMEM was due the exceeded memorylocked limit. This is easily can be observed running `limits -l 1k top'. Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week Notes: svn path=/head/; revision=230873
* | Make the sys/ucontext.h self-contained by changing the return typeKonstantin Belousov2012-02-018-8/+8
| | | | | | | | | | | | | | | | | | | | of __getcontextx_size(3) from size_t to int. PR: ports/164654 MFC after: 1 month Notes: svn path=/head/; revision=230864
* | Move descriptions of file caching commands out of the file locking section.Tijl Coosemans2012-01-281-17/+17
| | | | | | | | | | | | | | Approved by: kib (mentor) Notes: svn path=/head/; revision=230648
* | Remove a left-over reference to make.conf(5) which was used as a place toSergey Kandaurov2012-01-271-2/+1
| | | | | | | | | | | | | | | | | | | | store the VM_STACK compile option to enable MAP_STACK support in its earliest stage of development. Found by: mux Notes: svn path=/head/; revision=230613
* | Consensus between bde and pjd seemed to be that if the function namesGuy Helmer2012-01-261-8/+8
| | | | | | | | | | | | | | | | | | are lined up, then any * after a long type should appear after the type instead of being in front of the function name on the following line. Notes: svn path=/head/; revision=230601
* | Make the comments consistent (capitalization, punctuation, andGuy Helmer2012-01-261-6/+10
| | | | | | | | | | | | | | | | | | format). Requested by bde Notes: svn path=/head/; revision=230600
* | Restore the parenthesis that are necessary around the constant values.Guy Helmer2012-01-261-7/+7
| | | | | | | | | | | | | | Requested by bde. Notes: svn path=/head/; revision=230599
* | Fix two nits in previous commit pointed out by pjd@.Dag-Erling Smørgrav2012-01-231-2/+1
| | | | | | | | | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=230478
* | Clarify the implementation-defined behaviour in case of close(2)Konstantin Belousov2012-01-221-1/+5
| | | | | | | | | | | | | | | | | | returning error. MFC after: 1 week Notes: svn path=/head/; revision=230460
* | The sys/uio.h header is needed only for readv(2), preadv(2), writev(2) andPawel Jakub Dawidek2012-01-222-4/+4
| | | | | | | | | | | | | | | | | | | | pwritev(2). Document it more precisely. Reviewed by: jilles MFC after: 3 days Notes: svn path=/head/; revision=230456
* | Use getcontextx(3) internal API instead of getcontext(2) to provideKonstantin Belousov2012-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 Notes: svn path=/head/; revision=230430
* | Add API for obtaining extended machine context states that cannot beKonstantin Belousov2012-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 Notes: svn path=/head/; revision=230429
* | This commit adds profiling support for powerpc64. Now we can do applicationAndreas Tobler2012-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 Notes: svn path=/head/; revision=230400
* | Conditionalize the __floatunsisf and __floatunsidf functions, added inDavid Schultz2012-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. Notes: svn path=/head/; revision=230380
* | Fix a small nit noted by bde: exp_x should be of type float, not double.David Schultz2012-01-201-1/+1
| | | | | | | | Notes: svn path=/head/; revision=230371
* | Add a change I missed in r230367 (don't inline arm's fenv.h functions).David Schultz2012-01-201-1/+0
| | | | | | | | Notes: svn path=/head/; revision=230370
* | Remove an errant `#define dprintf printf'. It seems to be leftoverDavid Schultz2012-01-201-2/+0
| | | | | | | | | | | | | | | | debugging code that nothing depends on. (I've had this in my tree for years without issue.) Notes: svn path=/head/; revision=230369
* | Don't inline fenv.h functions on arm for now. Inlining makes sense:David Schultz2012-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. Notes: svn path=/head/; revision=230367
* | Merge in the latest SoftFloat changes from NetBSD. (NetBSD isn't theDavid Schultz2012-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/. Notes: svn path=/head/; revision=230363
* | Rev 228065 (change bsd.own.mk -> bsd.init.mk) broke pam_unix.so by causingPeter Wemm2012-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. Notes: svn path=/head/; revision=230311
* | Fix two issues related to the use of SIGINFO in fetch(1) to displayDag-Erling Smørgrav2012-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 Notes: svn path=/head/; revision=230307