summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Don't calculate len too early.pjd2011-03-261-1/+1
|
* Follow style(9) in example code and handle opendir(3) error.pjd2011-03-261-4/+7
|
* Document O_CLOEXEC.kib2011-03-251-4/+16
| | | | | Reviewed by: jhb MFC after: 1 week
* Move the code around so that libc behaviour does not depend on a variabletrasz2011-03-221-8/+4
| | | | that was supposed to be kernel-only. There should be no functional changes.
* index(3): Mention that index/rindex are deprecated and not specified byjilles2011-03-201-1/+14
| | | | | | POSIX.1-2008. MFC after: 1 week
* When building libc with the syscall compatibility, don't also generate themarcel2011-03-171-1/+4
| | | | | | | | | syscall assembly files. This results in conflicting dependencies and can cause unexpected results for parallel builds. This is because the .c file and the .S file both generate the same .o file. Submitted by: Simon Gerraty <sjg@juniper.net> Sponsored by: Juniper Networks
* Don't add sigwait.c to MISRCS here when sigwait.c lives under ../sys andmarcel2011-03-171-1/+1
| | | | it's already added to SRCS there.
* From fts.c comment:pjd2011-03-162-0/+2
| | | | | | | | | | | | | | The "FTS_NOSTAT" option can avoid a lot of calls to stat(2) if it knows that a directory could not possibly have subdirectories. This is decided by looking at the link count: a subdirectory would increment its parent's link count by virtue of its own ".." entry. This assumption only holds for UFS-like filesystems that implement links and directories this way, so we must punt for others. It looks like ZFS is a UFS-like file system, as the above also holds for ZFS. Add ZFS to the list of file systems that allow for such optimization. MFC after: 1 month
* rfork(2): Discourage rfork_thread-like approaches.jilles2011-03-151-17/+3
| | | | | | | | | Calling rfork_thread(3) does not interoperate with pthreads and global state is not properly protected. Remove the BUGS section suggesting LinuxThreads entirely. With the current pthread library libthr, all threads are kernel-level entities so there seems little reason to use LinuxThreads.
* Move cap_enter(2) and cap_getmode(2) symbols from FBSD_1.1 to FBSD_1.2.rwatson2011-03-121-2/+2
| | | | | | | Suggested by: kib Obtained from: Capsicum Project Sponsored by: Google MFC after: 3 months
* Now that TLS generally is available on sparc64 since r219534 turn onmarius2011-03-111-1/+1
| | | | | | support for it. Note that while sparc64 also supports the static TLS model and thus tls_model("initial-exec"), using the default model turned out to yield slightly better buildstone performance.
* Correct a typo in the malloc(3) manpage. Malloc options are set in therstone2011-03-071-2/+2
| | | | | | | MALLOC_OPTIONS environment variable, not JEMALLOC_OPTIONS. Reviewed by: jasone Approved by: emaste (mentor)
* Because we call __printf_out() with a on-stack buffer, also callpjd2011-03-061-2/+4
| | | | | | __printf_flush() so we are sure it won't be referenced after we return. MFC after: 2 weeks
* Fix various issues in how %#T is handled:pjd2011-03-061-7/+11
| | | | | | | | | | - If precision is 0, don't print period followed by no digits. - If precision is 0 stop printing units as soon as possible (eg. if we have three years and five days and precision is 0 print only 3y5d). - If precision is not 0, print all units (eg. 3y0d0h0m0s.00). MFC after: 2 weeks
* Move getloginclass(2) and setloginclass(2) to FBSD_1.2, where they should'vetrasz2011-03-061-2/+2
| | | | been added in the first place.
* Add FBSD_1.2; syscalls added in 9-CURRENT are supposed to go there.trasz2011-03-061-0/+3
| | | | Suggested by: kib
* Add manual page for getloginclass(2) and setloginclass(2).trasz2011-03-062-2/+100
|
* Add two new system calls, setloginclass(2) and getloginclass(2). This makestrasz2011-03-051-0/+2
| | | | | | | | | it possible for the kernel to track login class the process is assigned to, which is required for RCTL. This change also make setusercontext(3) call setloginclass(2) and makes it possible to retrieve current login class using id(1). Reviewed by: kib (as part of a larger patch)
* Make acl_strip_np(3) use new trivial ACL format for NFSv4 ACls (threetrasz2011-03-041-1/+1
| | | | | | | | entries instead of six). This makes "setfacl -b" do the right thing for ACLs on ZFS. UFS recognizes both kinds of trivial ACLs; no change there. MFC after: 2 months
* Make cap_new(2) and cap_getmode(2) symbols from libc public so applicationsrwatson2011-03-033-1/+105
| | | | | | | | | | | | can link against them. Add man pages for the new system calls, with one errant forward reference to changes not yet present in FreeBSD, but soon will be. Reviewed by: anderson Obtained from: Capsicum Project Sponsored by: Google, Inc. Discussed with: benl, kris, pjd MFC after: 3 months
* Add description of ECAPMODE to errno(2) man page.rwatson2011-03-031-0/+2
| | | | | | | Discussed with: anderson Obtained from: Capsicum Project Sponsored by: Google, Inc. MFC after: 3 months
* Add text string for ECAPMODE to libc.rwatson2011-03-031-0/+1
| | | | | | | Discussed with: anderson Obtained from: Capsicum Project Sponsored by: Google, Inc. MFC after: 3 months
* Put in a temporary workaround for ctfmerge hanging on processingdim2011-03-011-0/+4
| | | | | | | | | | | | | | | | kernel.debug (or possibly other files), when WITH_CTF is active. This is caused by a bug in clang's integrated assembler, causing malloc to sometimes hang during initialization in statically linked executables that use threading, such as the copy of ctfmerge that is built during the bootstrap stage of buildworld. The bug has been submitted upstream: http://llvm.org/bugs/show_bug.cgi?id=9352 Note that you might have to rebuild and install libc first, to get your kernel build to finish, because the ctfmerge binary built during bootstrap is linked with your base system's copy of libc.a, which might already contain a bad copy of malloc.o.
* Remove duplicate "in".brucec2011-03-011-1/+1
| | | | | Suggested by: Rob Farmer <rfarmer at predatorlabs.net> MFC after: 3 days
* Revert some of r177626. "in in" is valid in certain sentences.brucec2011-02-281-1/+1
| | | | | PR: 121490 MFC after: 3 days
* Fix style(9) issues in pututxline(3).ed2011-02-251-5/+10
| | | | | | | Also, make sure to initialize the `ret' variable properly. Reported by: Cedric Jonas <cedric c84 eu> Patch by: Garrett Cooper <yanegomi gmail com>
* Add the BSD-licensed Citrus iconv to the base system with default offgabor2011-02-2563-0/+8778
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setting. It can be built by setting the WITH_ICONV knob. While this knob is unset, the library part, the binaries, the header file and the metadata files will not be built or installed so it makes no impact on the system if left turned off. This work is based on the iconv implementation in NetBSD but a great number of improvements and feature additions have been included: - Some utilities have been added. There is a conversion table generator, which can compare conversion tables to reference data generated by GNU libiconv. This helps ensuring conversion compatibility. - UTF-16 surrogate support and some endianness issues have been fixed. - The rather chaotic Makefiles to build metadata have been refactored and cleaned up, now it is easy to read and it is also easier to add support for new encodings. - A bunch of new encodings and encoding aliases have been added. - Support for 1->2, 1->3 and 1->4 mappings, which is needed for transliterating with flying accents as GNU does, like "u. - Lots of warnings have been fixed, the major part of the code is now WARNS=6 clean. - New section 1 and section 5 manual pages have been added. - Some GNU-specific calls have been implemented: iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into() - Support for GNU's //IGNORE suffix has been added. - The "-" argument for stdin is now recognized in iconv(1) as per POSIX. - The Big5 conversion module has been fixed. - The iconv.h header files is supposed to be compatible with the GNU version, i.e. sources should build with base iconv.h and GNU libiconv. It also includes a macro magic to deal with the char ** and const char ** incompatibility. - GNU compatibility: "" or "char" means the current local encoding in use - Various cleanups and style(9) fixes. Approved by: delphij (mentor) Obtained from: The NetBSD Project Sponsored by: Google Summer of Code 2009
* Remove sysctl vm.max_proc_mmap used to protect from KVA space exhaustion.pluknet2011-02-241-3/+0
| | | | | | | | | | | | | | As it was pointed out by Alan Cox, that no longer serves its purpose with the modern UMA allocator compared to the old one used in 4.x days. The removal of sysctl eliminates max_proc_mmap type overflow leading to the broken mmap(2) seen with large amount of physical memory on arches with factually unbound KVA space (such as amd64). It was found that slightly less than 256GB of physmem was enough to trigger the overflow. Reviewed by: alc, kib Approved by: avg (mentor) MFC after: 2 months
* Fix bzero() for 64-bit.jchandra2011-02-221-19/+1
| | | | | | | | The existing implementation of bzero incorrectly clears bytes when the start address is not word aligned. Fix it by using REG_SHI macro which works on both 32 and 64 bit. Submitted by: Artem Belevich (fbsdlist at src cx)
* Fix typos - remove duplicate "the".brucec2011-02-215-5/+5
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Add a utility, utxrm(8).ed2011-02-191-2/+3
| | | | | | | | | | Most of the ports I broke when I imported utmpx, were simple management utilities for the utmp database, allowing you to add/remove entries manually. Add a small tool called utxrm(8), which allows you to remove an entry from the utmpx database by hand. This is useful when a login daemon crashes or fails to remove the entry during shutdown.
* Properly styleify utmpx code and document error codes in man page.ed2011-02-194-56/+107
| | | | Submitted by: Garrett Cooper
* Turn off default generation of userland dot symbols on powerpc64 now thatnwhitehorn2011-02-189-23/+14
| | | | | we have a binutils that supports it. Kernel dot symbols remain on to assist DDB.
* Don't forget to bump man page date for r218711.ed2011-02-151-1/+1
|
* Remove dead reference to regexp(3). Use regex(3) instead.ed2011-02-151-1/+1
| | | | | PR: docs/149950 Submitted by: arundel@
* Document some more sysconf(3) variables.brucec2011-02-131-1/+58
| | | | MFC after: 1 month
* Introduce a non-portable function pthread_getthreadid_np(3) to retrievejkim2011-02-072-0/+2
| | | | | | | calling thread's unique integral ID, which is similar to AIX function of the same name. Bump __FreeBSD_version to note its introduction. Reviewed by: kib
* rfork_thread(3): Mark deprecated in favor of pthread_create(3).jilles2011-02-061-2/+10
|
* Remove duplicate .note.GNU-stack section declaration. bcopy alreadykib2011-02-043-6/+0
| | | | | | made the neccessary provisions. Reported by: arundel
* Make sys_signame upper case.jilles2011-02-042-33/+33
| | | | | | | | | | | | This matches the constants from <signal.h> with 'SIG' removed, which POSIX requires kill and trap to accept and 'kill -l' to write. 'kill -l', 'trap', 'trap -l' output is now upper case. In Turkish locales, signal names with an upper case 'I' are now accepted, while signal names with a lower case 'i' are no longer accepted, and the output of 'killall -l' now contains proper capital 'I' without dot instead of a dotted capital 'I'.
* Fix n32 compile.jchandra2011-01-271-0/+1
| | | | | | | These changes are needed to fix n32 compile after the recent change of mips n32 MACHINE_ARCH to mipsn32eb/mipsn32el. Reviewed by: imp, bz (earlier version)
* Emit .note.GNU-stack for the syscall stubs generated by libc only onkib2011-01-251-2/+9
| | | | | | | architectures that support this .note. In particular, do not unneccessary emit the notes on ia64 and sparc64, which ABI require non-executable stacks. Tested by: marcel
* Document PT_FLAG_FORKED, PT_FOLLOW_FORK, pl_tdname and pl_child_pid.kib2011-01-251-5/+40
| | | | MFC after: 2 weeks
* getgroups(2): Remove mention of <sys/param.h> and refer to sysconf(3).jilles2011-01-211-3/+9
| | | | | | | | | Because {NGROUPS_MAX} may become variable, its value should be obtained using sysconf(3). If a #define is used anyway, it should be obtained by including <limits.h> as that is in POSIX like getgroups(2) itself is. <sys/param.h> is not in POSIX. MFC after: 1 week
* mknod(2): The required include is <sys/stat.h>, not <unistd.h>.jilles2011-01-161-2/+2
| | | | | | | | | This is what SUSv4 requires, and also the only thing that works if strict standards compliance is requested or mknodat() is needed. PR: standards/123688 Submitted by: gcooper MFC after: 1 week
* Mark assembler sources from libc as working with non-executable stack.kib2011-01-1424-2/+44
| | | | Reviewed and tested by: nwhitehorn
* Implement __pthread_map_stacks_exec() callback for libc, to change thekib2011-01-083-0/+39
| | | | stack protection to allow execution for single-threaded processes.
* Fix some style(9) issues.kib2011-01-081-4/+5
| | | | | | | Do not use strlcpy() where simple assignment is enough. Noted by: bde (long time ago) MFC after: 1 week
* Fix struct FILE * leak on error (in disabled by default hesiod support code).kib2011-01-081-0/+1
| | | | | | Submitted by: henning petersen <henning.petersen t-online de> PR: 153756 MFC after: 1 week
* Retire TARGET_ABI.imp2011-01-071-5/+1
| | | | | | | | | | | | | | | Implement MACHINE_ARCH=mips64e[lb] to build N64 images. This replaces MACHINE_ARCH=mipse[lb] TARGET_ABI=n64. MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires WITHOUT_CDDL due to atomic issues in libzfs. I've not investigated this much, but implemented this to preserve as much of the TARGET_ABI functionality that I could. Since its presence doesn't affect the working cases, I've kept it in for now. Added mips64e[lb] to make universe, so more kernels build. And I think this (finally) closes the curtain on the tbemd tree.
OpenPOWER on IntegriCloud