summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* - forgot to bump a dateDaniel Gerzo2009-01-061-1/+1
| | | | Notes: svn path=/head/; revision=186819
* catch up wtih r175955 by ume:Daniel Gerzo2009-01-061-53/+2
| | | | | | | - the support of AI_ALL and AI_V4MAPPED has been completely removed. Notes: svn path=/head/; revision=186817
* Note that the protocol argument can be set to 0.Tom Rhodes2009-01-051-1/+6
| | | | | | | | PR: 127890 Reviewed by: rwatson Notes: svn path=/head/; revision=186769
* Document that kldunloadf can return EINVAL.Tom Rhodes2008-12-251-1/+5
| | | | | | | PR: 125639 Notes: svn path=/head/; revision=186489
* Add support for the FPA floating-point format on ARM. TheMarcel Moolenaar2008-12-233-3/+23
| | | | | | | | | | | | FPA floating-point format is identical to the VFP format, but is always stored in big-endian. Introduce _IEEE_WORD_ORDER to describe the byte-order of the FP representation. Obtained from: Juniper Networks, Inc Notes: svn path=/head/; revision=186461
* Add an ENVIRONMENT section to note that the RSH variable can be set toMurray Stokely2008-12-141-0/+7
| | | | | | | | | | | override the use of the rsh(1) program in rcmd(3). PR: docs/51133 Obtained from: NetBSD, partially MFC after: 3 weeks Notes: svn path=/head/; revision=186095
* Merge the resolver part of BIND 9.4.3 into HEAD.Hajimu UMEMOTO2008-12-147-28/+182
| | | | | | | | | | | | | It includes the following fix: 2426. [bug] libbind: inet_net_pton() can sometimes return the wrong value if excessively large netmasks are supplied. [RT #18512] Reported by: Maksymilian Arciemowicz <cxib__at__securityreason.com> Notes: svn path=/head/; revision=186090
* Consolidate some variable initializations. No substantive change.David Schultz2008-12-112-13/+13
| | | | Notes: svn path=/head/; revision=185904
* Move the xprintf hook to where it belongs; it shouldn't be in theDavid Schultz2008-12-101-6/+4
| | | | | | | middle of vfprintf's variable declarations. Notes: svn path=/head/; revision=185825
* o Use full month name in .Dd macro.Maxim Konovalov2008-12-091-1/+1
| | | | Notes: svn path=/head/; revision=185789
* Import the strndup(3) function.Konstantin Belousov2008-12-064-3/+75
| | | | | | | | | | | Copyright attribution is kept the same as in original NetBSD source. Submitted by: Florian Smeets <flo kasimir com> Obtained from: NetBSD MFC after: 2 weeks Notes: svn path=/head/; revision=185690
* Order the str*.c files mostly alphabetical.Konstantin Belousov2008-12-061-3/+3
| | | | | | | | Submitted by: Florian Smeets <flo kasimir com> MFC after: 2 weeks Notes: svn path=/head/; revision=185689
* Add an easier example.Pawel Jakub Dawidek2008-12-051-1/+16
| | | | | | | Reviewed by: trasz Notes: svn path=/head/; revision=185641
* The times(3) function returns the number of CLK_TCKs since theGiorgos Keramidas2008-12-011-4/+9
| | | | | | | | | | | startup time of FreeBSD, not since the UNIX Epoch. PR: docs/122359 Submitted by: Viktor &#352;tujber MFC after: 1 week Notes: svn path=/head/; revision=185519
* Fix fread() to return a correct value on platforms where sizeof(int) !=Ruslan Ermilov2008-12-011-1/+1
| | | | | | | | | | sizeof(size_t), i.e. on all 64-bit platforms. Reported by: Andrey V. Elsukov MFC after: 3 days Notes: svn path=/head/; revision=185516
* Fix a lock order reversal bug that could cause deadlock during fork(2).Jason Evans2008-12-011-11/+37
| | | | | | | Reported by: kib Notes: svn path=/head/; revision=185514
* It's silly to claim recv(2) is to be removed in favour of recvfrom(2)Ivan Voras2008-11-301-1/+0
| | | | | | | | | (at least at this time :) ). Approved by: gnn (mentor) Notes: svn path=/head/; revision=185489
* Adjust an assertion to handle the case where a lock is contested, butJason Evans2008-11-301-1/+1
| | | | | | | | | spinning is avoided due to running on a single-CPU system. Reported by: stefanf Notes: svn path=/head/; revision=185483
* Do not spin when trying to lock on a single-CPU system.Jason Evans2008-11-301-11/+13
| | | | | | | Reported by: davidxu Notes: svn path=/head/; revision=185468
* MFp4:Bjoern A. Zeeb2008-11-292-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring in updated jail support from bz_jail branch. This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to updated checks it is even possible to have jails without an IP address at all, which basically gives one a chroot with restricted process view, no networking,.. SCTP support was updated and supports IPv6 in jails as well. Cpuset support permits jails to be bound to specific processor sets after creation. Jails can have an unrestricted (no duplicate protection, etc.) name in addition to the hostname. The jail name cannot be changed from within a jail and is considered to be used for management purposes or as audit-token in the future. DDB 'show jails' command was added to aid debugging. Proper compat support permits 32bit jail binaries to be used on 64bit systems to manage jails. Also backward compatibility was preserved where possible: for jail v1 syscalls, as well as with user space management utilities. Both jail as well as prison version were updated for the new features. A gap was intentionally left as the intermediate versions had been used by various patches floating around the last years. Bump __FreeBSD_version for the afore mentioned and in kernel changes. Special thanks to: - Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches and Olivier Houchard (cognet) for initial single-IPv6 patches. - Jeff Roberson (jeff) and Randall Stewart (rrs) for their help, ideas and review on cpuset and SCTP support. - Robert Watson (rwatson) for lots and lots of help, discussions, suggestions and review of most of the patch at various stages. - John Baldwin (jhb) for his help. - Simon L. Nielsen (simon) as early adopter testing changes on cluster machines as well as all the testers and people who provided feedback the last months on freebsd-jail and other channels. - My employer, CK Software GmbH, for the support so I could work on this. Reviewed by: (see above) MFC after: 3 months (this is just so that I get the mail) X-MFC Before: 7.2-RELEASE if possible Notes: svn path=/head/; revision=185435
* Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.Konstantin Belousov2008-11-272-0/+14
| | | | | | | | | | | | | | | | | Threading library calls _pre before the fork, allowing the rtld to lock itself to ensure that other threads of the process are out of dynamic linker. _post releases the locks. This allows the rtld to have consistent state in the child. Although child may legitimately call only async-safe functions, the call may need plt relocation resolution, and this requires working rtld. Reported and debugging help by: rink Reviewed by: kan, davidxu MFC after: 1 month (anyway, not before 7.1 is out) Notes: svn path=/head/; revision=185369
* Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.Pawel Jakub Dawidek2008-11-171-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bring huge amount of changes, I'll enumerate only user-visible changes: - Delegated Administration Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc. - L2ARC Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content. - slog Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2). - vfs.zfs.super_owner Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one. - chflags(2) Not all the flags are supported. This still needs work. - ZFSBoot Support to boot off of ZFS pool. Not finished, AFAIK. Submitted by: dfr - Snapshot properties - New failure modes Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests - Refquota, refreservation properties Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots. - Sparse volumes ZVOLs that don't reserve space in the pool. - External attributes Compatible with extattr(2). - NFSv4-ACLs Not sure about the status, might not be complete yet. Submitted by: trasz - Creation-time properties - Regression tests for zpool(8) command. Obtained from: OpenSolaris Notes: svn path=/head/; revision=185029
* On i386, the primary function that SYSCALL() generates is with thePeter Wemm2008-11-153-3/+3
| | | | | | | | __sys_ prefix. Make END() match. This didn't cause a compile error, but the function size is attached to the .weak symbol, not the real one. Notes: svn path=/head/; revision=184996
* Several cleanups related to pipe(2).Ed Schouten2008-11-111-6/+1
| | | | | | | | | | | | | | | | | | | | | - Use `fildes[2]' instead of `*fildes' to make more clear that pipe(2) fills an array with two descriptors. - Remove EFAULT from the manual page. Because of the current calling convention, pipe(2) raises a segmentation fault when an invalid address is passed. - Introduce kern_pipe() to make it easier for binary emulations to implement pipe(2). - Make Linux binary emulation use kern_pipe(), which means we don't have to recover td_retval after calling the FreeBSD system call. Approved by: rdivacky Discussed on: arch Notes: svn path=/head/; revision=184849
* Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.Ed Schouten2008-11-097-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | Looking at our source code history, it seems the uname(), getdomainname() and setdomainname() system calls got deprecated somewhere after FreeBSD 1.1, but they have never been phased out properly. Because we don't have a COMPAT_FREEBSD1, just use COMPAT_FREEBSD4. Also fix the Linuxolator to build without the setdomainname() routine by just making it call userland_sysctl on kern.domainname. Also replace the setdomainname()'s implementation to use this approach, because we're duplicating code with sysctl_domainname(). I wasn't able to keep these three routines working in our COMPAT_FREEBSD32, because that would require yet another keyword for syscalls.master (COMPAT4+NOPROTO). Because this routine is probably unused already, this won't be a problem in practice. If it turns out to be a problem, we'll just restore this functionality. Reviewed by: rdivacky, kib Notes: svn path=/head/; revision=184789
* Add one more EACCES clause to rename.2.Edward Tomasz Napierala2008-11-071-0/+5
| | | | | | | Approved by: rwatson (mentor) Notes: svn path=/head/; revision=184750
* Replace the non-standard disclaimer with the standard one from /COPYRIGHTWarner Losh2008-11-0419-152/+152
| | | | | | | Approved by: jedgar@ Notes: svn path=/head/; revision=184607
* Revert to preferring mmap(2) over sbrk(2) when mapping memory, due toJason Evans2008-11-032-13/+18
| | | | | | | | | | potential extreme contention in the kernel for multi-threaded applications on SMP systems. Reported by: kris Notes: svn path=/head/; revision=184602
* Implement support for RPCSEC_GSS authentication to both the NFS clientDoug Rabson2008-11-033-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and server. This replaces the RPC implementation of the NFS client and server with the newer RPC implementation originally developed (actually ported from the userland sunrpc code) to support the NFS Lock Manager. I have tested this code extensively and I believe it is stable and that performance is at least equal to the legacy RPC implementation. The NFS code currently contains support for both the new RPC implementation and the older legacy implementation inherited from the original NFS codebase. The default is to use the new implementation - add the NFS_LEGACYRPC option to fall back to the old code. When I merge this support back to RELENG_7, I will probably change this so that users have to 'opt in' to get the new code. To use RPCSEC_GSS on either client or server, you must build a kernel which includes the KGSSAPI option and the crypto device. On the userland side, you must build at least a new libc, mountd, mount_nfs and gssd. You must install new versions of /etc/rc.d/gssd and /etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf. As long as gssd is running, you should be able to mount an NFS filesystem from a server that requires RPCSEC_GSS authentication. The mount itself can happen without any kerberos credentials but all access to the filesystem will be denied unless the accessing user has a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There is currently no support for situations where the ticket file is in a different place, such as when the user logged in via SSH and has delegated credentials from that login. This restriction is also present in Solaris and Linux. In theory, we could improve this in future, possibly using Brooks Davis' implementation of variant symlinks. Supporting RPCSEC_GSS on a server is nearly as simple. You must create service creds for the server in the form 'nfs/<fqdn>@<REALM>' and install them in /etc/krb5.keytab. The standard heimdal utility ktutil makes this fairly easy. After the service creds have been created, you can add a '-sec=krb5' option to /etc/exports and restart both mountd and nfsd. The only other difference an administrator should notice is that nfsd doesn't fork to create service threads any more. In normal operation, there will be two nfsd processes, one in userland waiting for TCP connections and one in the kernel handling requests. The latter process will create as many kthreads as required - these should be visible via 'top -H'. The code has some support for varying the number of service threads according to load but initially at least, nfsd uses a fixed number of threads according to the value supplied to its '-n' option. Sponsored by: Isilon Systems MFC after: 1 month Notes: svn path=/head/; revision=184588
* Add the ffsll and flsll functions. These are ffs and fls operatingKonstantin Belousov2008-11-035-8/+122
| | | | | | | | | | | on long long arguments. Reviewed by: bde (previous version, that included asm implementation for all ffs and fls functions on i386 and amd64) MFC after: 2 weeks Notes: svn path=/head/; revision=184587
* Fix style.Konstantin Belousov2008-11-031-1/+1
| | | | Notes: svn path=/head/; revision=184586
* Sync with OpenBSD's dirname(3) - license change, avoid strcpy() overXin LI2008-11-032-68/+46
| | | | | | | | string constant, use memcpy() instead of strncpy() and improve code readibility. No functional change. Notes: svn path=/head/; revision=184578
* Add missing END() macros, as per rev 184547 for amd64. The lack of thesePeter Wemm2008-11-0243-4/+59
| | | | | | | is mostly harmless, but it does upset some of valgrind's functionality. Notes: svn path=/head/; revision=184548
* We've been lax about matching END() macros in asm code for some time. ThisPeter Wemm2008-11-0227-4/+46
| | | | | | | | | | is used to set the ELF size attribute for functions. It isn't normally critical but some things can make use of it (gdb for stack traces). Valgrind needs it so I'm adding it in. The problem is present on all branches and on both i386 and amd64. Notes: svn path=/head/; revision=184547
* In example use of err(3) and errx(3), use sysexits(3) constants.Robert Watson2008-10-311-4/+5
| | | | | | | | MFC after: 3 days Submitted by: Bruce Cran <bruce at cran dot org dot uk> Notes: svn path=/head/; revision=184511
* Pass a pointer to warn2 so the warn2 == IN_ALL would not be anXin LI2008-10-301-1/+1
| | | | | | | always-false condition. Notes: svn path=/head/; revision=184458
* Finish what revision 1.40 started. Revision 1.40 removed a false statementAlan Cox2008-10-241-8/+6
| | | | | | | | | | from the description but not the errors section. This revision removes it from the errors statement. Add a statement about the non-portability of non-page-aligned offsets. Notes: svn path=/head/; revision=184226
* Fix a typo.Roman Divacky2008-10-231-1/+1
| | | | | | | Approved by: kib (mentor) Notes: svn path=/head/; revision=184203
* Fix a typo. q is already a pointer.Konstantin Belousov2008-10-221-1/+1
| | | | | | | | Reported by: ache Pointy hat to: kib Notes: svn path=/head/; revision=184185
* Remove doubtful structure definition with variable array members.Konstantin Belousov2008-10-221-67/+75
| | | | | | | | | | | | | | | I believe this is not a valid C99 construct. Use directly calculated offsets into the supplied buffer, using specified members length, to fill appropriate structure. Either use sysctl, or copy the value of the UNAME_x environment variable, instead of unconditionally doing sysctl, and then overriding a returned value with user-specified one. Noted and tested by: rdivacky Notes: svn path=/head/; revision=184177
* - License change to a less restrictive one;Xin LI2008-10-191-33/+16
| | | | | | | | | | | - ANSIfy; - Convert do {} while loop -> while {} for clarity; - Sync RCS ID with OpenBSD; Obtained from: OpenBSD Notes: svn path=/head/; revision=184059
* Further simplify the code.Xin LI2008-10-191-11/+2
| | | | | | | Submitted by: Christoph Mallon <christoph.mallon gmx.de> Notes: svn path=/head/; revision=184055
* Use strlcpy() in !localized case to avoid the -1's.Xin LI2008-10-171-2/+1
| | | | Notes: svn path=/head/; revision=183990
* MTC r183949:Alexander Leidinger2008-10-171-0/+5
| | | | | | | | | | Allow to define MALLOC_PRODUCTION with a make variable instead of polluting the global CFLAGS. Reviewed by: jasone Notes: svn path=/head/; revision=183969
* Let libstand(3) build on ARM.Rafal Jaworowski2008-10-141-0/+4
| | | | | | | This is a pre-requisite for loader(8) + U-Boot support library on this arch. Notes: svn path=/head/; revision=183876
* Add unistd.h to the getosreldate(3) manpage.Konstantin Belousov2008-09-301-1/+2
| | | | | | | | | Update referenced example to include unistd.h per manpage. Update example to be more style(9)-ish, silence warnings and add FreeBSD id to the source file. Notes: svn path=/head/; revision=183495
* Support for CPU sets is going to appear in 7.1 before 8.0.John Baldwin2008-09-292-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=183464
* Fix some ifdef logic in the libc syncicache() bit that I somehow missed in theNathan Whitehorn2008-09-241-1/+3
| | | | | | | last commit. Now it really can use a runtime-set cacheline size. Notes: svn path=/head/; revision=183320
* Allow the cacheline size on PowerPC to be set at runtime. This is essential forNathan Whitehorn2008-09-241-16/+16
| | | | | | | | supporting 64-bit CPUs, which often have 128-byte cache lines instead of the standard 32. Notes: svn path=/head/; revision=183319
* <osreldate.h> does not have a forward declration of getosreldate(), soCraig Rodrigues2008-09-201-1/+0
| | | | | | | | | remove it from this man page. MFC after: 3 days Notes: svn path=/head/; revision=183217