summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Copy releng/7.3 to release/7.3.0 to mark 7.3-RELEASE.release/7.3.0_cvsKen Smith2010-03-211768-1769/+1769
| | | | | | Approved by: re (implicit) This commit was manufactured to restore the state of the 7.3-RELEASE image.
* MFC 197331, 197394:John Baldwin2010-01-294-3/+184
| | | | | | | | | | Add getpagesizes(3) function that returns either the number of page sizes supported by the system or a specified subset of the supported page sizes. Approved by: re (kib) Notes: svn path=/stable/7/; revision=203170
* MFC r201892:Xin LI2010-01-232-4/+8
| | | | | | | | | Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3). Reviewed by: davidxu Notes: svn path=/stable/7/; revision=202856
* MFC r200799:Xin LI2010-01-201-8/+3
| | | | | | | K&R -> ANSI prototype. Notes: svn path=/stable/7/; revision=202667
* MFC: r202176Christian Brueffer2010-01-1912-45/+54
| | | | | | | Miscellaneous mdoc, spelling and inconsistency fixes. Notes: svn path=/stable/7/; revision=202633
* MFC: r201603Christian Brueffer2010-01-191-1/+1
| | | | | | | Fix a double free(). Notes: svn path=/stable/7/; revision=202631
* MFC: r201836Christian Brueffer2010-01-151-3/+2
| | | | | | | Remove unnecessary quoting and markup, add missing punctuation. Notes: svn path=/stable/7/; revision=202414
* MFC 199607, 200797, 201270, 201669:John Baldwin2010-01-131-35/+41
| | | | | | | | | Use pthread_once() to initialize the thread-local storage for localtime() and gmtime() and _once() to initialize gmt state rather than home-rolled versions using pthread mutex locks. Notes: svn path=/stable/7/; revision=202202
* MFC r197163Alan Cox2010-01-041-1/+11
| | | | | | | | | Add the FBSD_1.2 namespace. Discussed with: deischen Notes: svn path=/stable/7/; revision=201519
* MFC r201201:Konstantin Belousov2010-01-012-11/+45
| | | | | | | | | | Document CLOCK_SECOND, add cross-reference from time(3) to clock_gettime(2). MFC r201204: Document _FAST and _PRECISE clocks. Notes: svn path=/stable/7/; revision=201363
* MFC of r200832, tzdata2009tEdwin Groothuis2009-12-291-1/+1
| | | | | | | | | | | zic: - Fix URL / reference to Calendrical Calculations: Third Edition libc/stdtime: - Fix typo in tzfile.5 (no changes in our part) Notes: svn path=/stable/7/; revision=201184
* MFC r199244:Peter Pentchev2009-12-241-1/+1
| | | | | | | | | | Fix the grammar in the isgraph(3) description, almost as per the PR. PR: 140455 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Notes: svn path=/stable/7/; revision=200963
* MFC r200589: cpuset(2): fix a typo and a markup error in the man pageJilles Tjoelker2009-12-221-2/+2
| | | | Notes: svn path=/stable/7/; revision=200837
* MFC 199606, 199614:John Baldwin2009-12-173-1/+73
| | | | | | | | | | | | Add an internal _once() method. This works identical to pthread_once(3) with the additional property that it is safe for routines in libc to use in both single-threaded and multi-threaded processes. Multi-threaded processes use the pthread_once() implementation from the threading library while single-threaded processes use a simplified "stub" version internal to libc. Notes: svn path=/stable/7/; revision=200649
* MFC 200061:John Baldwin2009-12-071-2/+2
| | | | | | | | | | The fd_mask type is an unsigned long, not an int, so treat the mask as a long instead of an int when examining the results of select() to look for RPC requests. Previously this routine would ignore RPC requests to sockets whose file descriptor mod 64 was greater than 31 on a 64-bit platform. Notes: svn path=/stable/7/; revision=200225
* MFC: r199988Christian Brueffer2009-12-041-2/+3
| | | | | | | Add an .Nm for strncat. Notes: svn path=/stable/7/; revision=200093
* MFC revs 199781,199782,199784,199786:Garrett Wollman2009-12-0210-16/+18
| | | | | | | | | | | | | | | | | | | | Eliminate dead stores. In __mbsconv(), if prec was zero, nconv could have been used uninitialized. Initialize it to a safe value so that there's no chance of returning an error if stack garbage happens to be equal to (size_t)-1 or (size_t)-2. In clnt_raw_create(), avoid minor race condition initializing the file-scope variable clntraw_private. Mark head rev 199785 as merged; 7-STABLE's version of svc_raw_reply() doesn't have the same bug (or even look all that similar). Found by: Clang static analyzer Notes: svn path=/stable/7/; revision=200017
* Merge rev. 199180 to 7.x-STABLE, the change to isblank(3):Peter Pentchev2009-11-251-2/+2
| | | | | | | | | | Fix the grammar as in the PR, and then some. PR: 140454 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Notes: svn path=/stable/7/; revision=199794
* MFC: r199320Christian Brueffer2009-11-231-1/+1
| | | | | | | Fix grammar. Notes: svn path=/stable/7/; revision=199710
* MFC: r199317Christian Brueffer2009-11-231-0/+1
| | | | | | | Fix a memory leak in acl_from_text() in case the conversion succeeded. Notes: svn path=/stable/7/; revision=199702
* MFC: r199255, r199257Christian Brueffer2009-11-201-10/+2
| | | | | | | | | | Improved the manpage description. The committed wording was provided by jhb. Remove a note about vfork(4) going to be eliminated, it's here to stay. Notes: svn path=/stable/7/; revision=199569
* MFC: r199046Christian Brueffer2009-11-161-1/+1
| | | | | | | Fix a copy+paste error by checking the correct variable against MM_NULLACT. Notes: svn path=/stable/7/; revision=199315
* MFC of r197189Edwin Groothuis2009-10-291-2/+8
| | | | | | | | | | Improve the way failure of pthread_key_create() gets detected. PR: threads/138603 Submitted by: Mikulas Patocka Notes: svn path=/stable/7/; revision=198579
* MFC r197958:Konstantin Belousov2009-10-141-1/+3
| | | | | | | | | In nanosleep(2), note that the calling thread is put to sleep, not the whole process. Also explicitely name the parameter that specifies sleep interval. Notes: svn path=/stable/7/; revision=198081
* MFC: r197312Christian Brueffer2009-10-121-2/+2
| | | | | | | Fix setfib(1) section number. Notes: svn path=/stable/7/; revision=197979
* MFC: rev. 197681Joe Marcus Clarke2009-10-041-1/+1
| | | | | | | | | | | Correct the pthread stub prototype for pthread_mutexattr_settype to allow for the type argument. This is known to fix some pthread_mutexattr_settype() invocations, especially when it comes to pulseaudio. Approved by: kib Notes: svn path=/stable/7/; revision=197759
* MFC 193023+193024:Xin LI2009-09-282-1/+18
| | | | | | | | | | Add an option to enforce strict RFC 1034 compliance. Document how to enable strict RFC 1034 enforcements. PR: kern/129477 Notes: svn path=/stable/7/; revision=197601
* MFC of r192625, r192890, r194783, r196587:Edwin Groothuis2009-08-318-376/+922
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r192625: MFC of tzcode2009e: Upgrade of the tzcode from 2004a to 2009e. Changes are numerous, but include... - New format of the output of zic, which supports both 32 and 64 bit time_t formats. - zdump on 64 bit platforms will actually produce some output instead of doing nothing for a looooooooong time. - linux_base-fX, with X >= at least 8, will work without problems related to the local time again. The original patch, based on the 2008e, has been running for a long time on both my laptop and desktop machine and have been tested by other people. After the installation of this code and the running of zic(8), you need to run tzsetup(8) again to install the new datafile. r192890: MFC of tzcode2009h - Clarify the license for the tzcode: public domain r194783: Remove duplicate if-statement on gmt_is_set in gmtsub(). r196587: MFC of tzcode2009k zic.c: Do not end a binary file with a POSIX-style time zone string for locations that end up in permanent DST (thanks to Andreas Schwab). Notes: svn path=/stable/7/; revision=196683
* - MFC r194583:Stanislav Sedov2009-08-151-5/+9
| | | | | | | | | Fix strncmp on arm. Return 0 as result without performing the main cycle only if the len passed is equal to 0. If end address overflows use last possible address as the end address. Notes: svn path=/stable/7/; revision=196249
* MFC: Change the ABI of some of the structures used by the SYSV IPC API:John Baldwin2009-07-318-39/+97
| | | | | | | | | | | | | | | | | | | | | - Various members of struct ipc_perm use appropriate types instead of unsigned short. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int which should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The existing versions of the __semctl(), msgctl(), and shmctl() system calls have been renamed to freebsd7_*() and implement the old ABI. New versions of these system calls provide the new ABI. The new system calls also use newer symbol versions in libc so old and new binaries will both work under new kernels. - Specific to 7.x: the kern_msgctl(), kern_semctl(), and kern_shmctl() functions now use ABI shims that transparently "rename" the functions to kern_new_*() for all new modules. Existing compat functions under the old names remain to provide compatibility for older kernel modules. Notes: svn path=/stable/7/; revision=196006
* Implement %z for strptime.Xin LI2009-07-261-0/+28
| | | | | | | | PR: kern/63064 Submitted by: Stefan `Sec` Zehl <sec 42 org> (with some small changes) Notes: svn path=/stable/7/; revision=195888
* MFC r194494 to improve support for 7.x worlds on >=8.0 kernels:Brooks Davis2009-07-245-20/+42
| | | | | | | | | | | | | | | | | | | | | | | | In preparation for raising NGROUPS and NGROUPS_MAX, change base system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. Notes: svn path=/stable/7/; revision=195859
* MFC: Several cleanups to the syscall tables:John Baldwin2009-07-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | - Add explicit prototypes for lkmnosys() and lkmressys() in <sys/sysent.h> and remove hacks for those routines from makesyscalls.sh. - Change the LKM syscall entries in the freebsd32 table to use lkmnosys rather than nosys. - Use NOPROTO for __syscall() to remove more magic logic from makesyscalls.sh. - Retire the unused nfsclnt() system call and mark it as UNIMPL rather than NOIMPL. - Remove the NOIMPL system call type. - Allow multiple flags in the type system call type field. Use this to retire CPT_NOA. - Update the comment descriptions for COMPAT[45] system calls in various generated files. - Update comments in syscalls.master. - Include defintions for audit identifiers for compat system calls in <sys/sysproto.h>. Notes: svn path=/stable/7/; revision=195854
* MFC: Add a new 'void closefrom(int lowfd)' system call. When called, itJohn Baldwin2009-07-144-1/+58
| | | | | | | | closes any open file descriptors >= 'lowfd'. Bump __FreeBSD_version to 702104. Notes: svn path=/stable/7/; revision=195694
* MFC r194932Xin LI2009-07-081-3/+49
| | | | | | | | | | | | Lock around access to nc_file and netconfig_info ("ni"). The RPC part of libc is still not thread safe but this would at least reduce the problems we have. PR: threads/118544 Submitted by: Changming Sun <snnn119 gmail com> Notes: svn path=/stable/7/; revision=195431
* If the running kernel has support for shm_open() and shm_unlink() asJohn Baldwin2009-06-111-0/+28
| | | | | | | | | | | system calls (i.e. 8.0+), then invoke the system calls instead of using open/fcntl/unlink. This is a direct commit instead of an MFC since libc in 8.0 always uses the system calls directly. MFC after: 1 week Notes: svn path=/stable/7/; revision=194040
* MFC: Add a feature_present(3) function which checks to see if a named kernelJohn Baldwin2009-06-104-2/+138
| | | | | | | feature is present by checking the kern.features sysctl MIB. Notes: svn path=/stable/7/; revision=193948
* merge r176058: more missing namespace wrappers for libthrDag-Erling Smørgrav2009-06-092-0/+2
| | | | Notes: svn path=/stable/7/; revision=193788
* merge r173793: silence aliasing warning.Dag-Erling Smørgrav2009-06-081-1/+2
| | | | Notes: svn path=/stable/7/; revision=193751
* merge r177605,177607,177855: add missing namespace wrappers for libthrDag-Erling Smørgrav2009-06-082-0/+10
| | | | Notes: svn path=/stable/7/; revision=193747
* merge r173763: fix aliasing bugDag-Erling Smørgrav2009-06-087-15/+47
| | | | Notes: svn path=/stable/7/; revision=193745
* merge r174221: remove unnecessary castsDag-Erling Smørgrav2009-06-084-11/+11
| | | | Notes: svn path=/stable/7/; revision=193741
* Remove double-inserted END() macros.Attilio Rao2009-06-012-2/+0
| | | | | | | Reported by: sobomax Notes: svn path=/stable/7/; revision=193286
* MFC r192760:Attilio Rao2009-05-302-0/+2
| | | | | | | | Use the END() macro appropriately in order to improve debugging for tools (Valgrind mainly). Notes: svn path=/stable/7/; revision=193134
* MFC r178253 and r178256:Xin LI2009-05-294-12/+77
| | | | | | | | | | Implement fdopendir(3) by splitting __opendir2() into two parts, the upper part deals with the usual __opendir2() calls, and the rest part with an interface translator to expose fdopendir(3) functionality. Manual page was obtained from kib@'s work for *at(2) system calls. Notes: svn path=/stable/7/; revision=193019
* Merge r192129+r190661:Xin LI2009-05-281-5/+7
| | | | | | | | | Properly handle malloc() failures. PR: bin/83338 Notes: svn path=/stable/7/; revision=192999
* MFC: r192410Christian Brueffer2009-05-231-2/+2
| | | | | | | | Since audit(4) isn't based on posix1e, remove the commented out audit.h header, xref libbsm(3). Notes: svn path=/stable/7/; revision=192632
* MFC rev 191654:Bruce M Simpson2009-05-171-18/+16
| | | | | | | | | | | | | | | Fix an obvious bug in getsourcefilter()'s use of struct __msfilterreq; the kernel will return in msfr_nsrcs the number of source filters in-mode for a given multicast group. However, the filters themselves were never copied out, as the libc function clobbers this field with zero, causing the kernel to assume the provided vector of struct sockaddr_storage has zero length. This bug would only affect users of SSM multicast, which is shimmed in 7.x. Picked up during mtest(8) refactoring. Notes: svn path=/stable/7/; revision=192251
* MFC r185514 (by jasone):Konstantin Belousov2009-05-031-11/+37
| | | | | | | | | | Fix a lock order reversal bug that could cause deadlock during fork(2). Reported and tested by: makc Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=191767
* MFC r191414Christian Brueffer2009-04-232-2/+2
| | | | | | | | | | Correct the information about when the respective functionality first appeared in FreeBSD. Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=191425