summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Take a sentence into the present by removing a reference to FreeBSD 3.0.Christian Brueffer2007-07-141-4/+2
| | | | | | | | Approved by: re (blanket) MFC after: 3 days Notes: svn path=/head/; revision=171447
* - Modular congestion control, with RFC2581 being the default.Randall Stewart2007-07-141-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CMT_PF states added (w/sysctl to turn the PF version on) - sctp_input.c had a missing incr of cookie case when the auth was bad. This meant a free was called without an increment to refcnt, added increment like rest of code. - There was a case, unlikely, when the scope of the destination changed (this is a TSNH case). In that case, it would not free the alloc'ed asoc (in sctp_input.c). - When listed addresses found a colliding cookie/Init, then the collided upon tcb was not unlocked in sctp_pcb.c - Add error checking on arguments of sctp_sendx(3) to prevent it from referencing a NULL pointer. - Fix an error return of sctp_sendx(3), it was returing ENOMEM not -1. - Get assoc id was changed to use the sanctified socket api method for getting a assoc id (PEER_ADDR_INFO instead of PEER_ADDR_PARAMS). - Fix it so a peeled off socket will get a proper error return if it trys to send to a different address then it is connected to. - Fix so that select_a_stream can avoid an endless loop that could hang a caller. - time_entered (state set time) was not being set in all cases to the time we went established. Approved by: re(ken smith) Notes: svn path=/head/; revision=171440
* Fix a typo that prevented the quad symbols from being exportedDaniel Eischen2007-07-061-1/+1
| | | | | | | | | | (s/SYM_MAP/SYM_MAPS/). Reported by: kan Approved by: re@ (Ken Smith) Notes: svn path=/head/; revision=171278
* Fix remaining syntax errors (missing semicolons)Peter Wemm2007-07-051-2/+2
| | | | | | | | Submitted by: Björn König <bkoenig@cs.tu-berlin.de> Approved by: re (kensmith, followup commits) Notes: svn path=/head/; revision=171261
* Add missing \ characters in PSEUDO() macro on arm. Oops.Peter Wemm2007-07-041-2/+2
| | | | | | | | Submitted by: cognet Approved by: re (kensmith) Notes: svn path=/head/; revision=171222
* Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate toPeter Wemm2007-07-049-9/+119
| | | | | | | | | | | | call the pad-less versions of the corresponding syscalls if the running kernel supports it. Check kern.osreldate once per program and cache the result to select the appropriate syscall. This maintains userland compatability with kernel.old's from quite a while back. Approved by: re (kensmith) Notes: svn path=/head/; revision=171219
* Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudoPeter Wemm2007-07-047-22/+35
| | | | | | | | | | | | | syscalls, unless WITHOUT_SYSCALL_COMPAT is defined. The default case will have the .c wrappers still. If you define WITHOUT_SYSCALL_COMPAT, the .c wrappers will go away and libc will make direct syscalls. After 7-stable starts, the direct syscall method will be default. Approved by: re (kensmith) Notes: svn path=/head/; revision=171218
* Adjust the syscall stub macros to be consistent in their meaning. InPeter Wemm2007-07-045-34/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | particular: SYSCALL() makes a syscall, with errno handling, and continues execution directly after the macro in the non-error case. RSYSCALL() is just like SYSCALL(), but returns after success. Both SYSCALL(name) and RSYSCALL(name) export "__sys_name" as a strong symbol, with "_name" and "name" as weak aliases. PSEUDO() is just like RSYSCALL(), but skipping the "name" weak alias. It still does "__sys_name" and "_name". Change i386 to add errno handling to PSEUDO. The same for amd64 and sparc64, with appear to have copied the behavior. ia64 was correct (as was alpha). Just remove some apparently unused variants of the macros. (untested!) I believe powerpc is correct. Fix arm to not export "name" from the PSEUDO case. Remove apparently extra unused variants. (untested!) The errno problem manifested on i386/amd64/sparc64 by having "PSEUDO" classified syscalls return without setting errno. eg: "addr = mmap()" could return with "addr" = 22 instead of setting errno to 22 and returning -1. Approved by: re (kensmith) Notes: svn path=/head/; revision=171217
* Fix missing prototype warnings. (Compile errors with -Werror on)Peter Wemm2007-07-041-2/+2
| | | | | | | | | | When using namespace.h/un-namespace.h, you use _ versions of syscalls. Change getsockopt() to _getsockopt() and same for setsockopt(). Approved by: re Notes: svn path=/head/; revision=171197
* Significantly reduce the memory leak as noted in BUGS section forSean Farley2007-07-045-259/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | setenv(3) by tracking the size of the memory allocated instead of using strlen() on the current value. Convert all calls to POSIX from historic BSD API: - unsetenv returns an int. - putenv takes a char * instead of const char *. - putenv no longer makes a copy of the input string. - errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT. Several patches to base utilities to handle the POSIX changes from Andrey Chernov's previous commit. A few I re-wrote to use setenv() instead of putenv(). New regression module for tools/regression/environ to test these functions. It also can be used to test the performance. Bump __FreeBSD_version to 700050 due to API change. PR: kern/99826 Approved by: wes Approved by: re (kensmith) Notes: svn path=/head/; revision=171195
* - Removes some incorrect error returns (errno was being overriden inRandall Stewart2007-07-021-4/+2
| | | | | | | | | | | one of the functions) - Fixes the error return of sctp_get_opt, it was returning the errno not -1. Approved by: re@freebsd.org (Robert Watson) Obtained from: Weongyo Jeong (weongyo.jeong@gmail.com) Notes: svn path=/head/; revision=171152
* Fix sbrk.S to use _end symbol the same way brk.s was fixed some timeAlexander Kabaev2007-06-271-2/+2
| | | | | | | | | | ago. sbrk.S should have gotten the same change then but was forgotten. Approved by: re (bmah) PR: kern/114049 Notes: svn path=/head/; revision=171061
* Add missing semi-colon.Matt Jacob2007-06-261-1/+1
| | | | | | | Approved by: re (not really, but it's better to have things compile than not for right now. Sorry) Notes: svn path=/head/; revision=171039
* - Fix wrong error return (the errno was being returned and not placedRandall Stewart2007-06-251-10/+24
| | | | | | | | | | | | in errno) - Found by Weongyo Jeong - Remove two extra un-needed memset() after calloc()'s - Found by Weongyo Jeong - Tightened up parameter requirement checking on input to bindx/connectx per socket api spec. Approved by: re@freebsd.org(Ken Smith) Notes: svn path=/head/; revision=171031
* - Fix incorrect error return on sctp_getaddrlenRandall Stewart2007-06-221-3/+3
| | | | | | | | | | | | - Fix a memory leak when a non v4/v6 address was passed in. - Take out strange line that copy's back to the src array incorrectly (corrupting the input array). Approved by: re(bmah@freebsd.org) Obtained from: Weongyo Jeong(weongyo.jeong@gmail.com) Notes: svn path=/head/; revision=170993
* Clean up after previous commit: new sentence -> new line, no empty lines,Christian Brueffer2007-06-191-4/+6
| | | | | | | | | .Fa macro usage. Approved by: re (blanket) Notes: svn path=/head/; revision=170956
* - Fix the signature of sctp_connectx to match the function and adds someRandall Stewart2007-06-191-2/+6
| | | | | | | | text about the last argument. Approved by: re (bmah@freebsd.org) Notes: svn path=/head/; revision=170955
* Major cleanup: mdoc macros, style, typos etc.Christian Brueffer2007-06-1810-216/+320
| | | | Notes: svn path=/head/; revision=170919
* Add rewind() to the list of functions which may fail and set errnoAndrey A. Chernov2007-06-181-1/+2
| | | | Notes: svn path=/head/; revision=170908
* Add mbstate clear missed in one of the cases.Andrey A. Chernov2007-06-181-5/+6
| | | | | | | Move overflow check for fseek as early as needed. Notes: svn path=/head/; revision=170907
* Fix library names.David Xu2007-06-1810-10/+10
| | | | Notes: svn path=/head/; revision=170904
* Add information about the implications of using mmap(2) instead of sbrk(2).Jason Evans2007-06-151-1/+19
| | | | | | | Submitted by: bmah, jhb Notes: svn path=/head/; revision=170798
* Fix junk/zero filling for realloc(). Junk filling was missing in one case,Jason Evans2007-06-151-36/+48
| | | | | | | | | and zero filling was broken in a way that could cause memory corruption. Update comments. Notes: svn path=/head/; revision=170796
* Use an array of size NGROUP_MAX for the getgroups() call instead of NGRP.Hartmut Brandt2007-06-141-2/+4
| | | | | | | | When NGROUP_MAX is larger than NGRP the call used to fail. Now the call succeedes, but only the first NGRP groups are actually used for authentication. Notes: svn path=/head/; revision=170736
* Require users to provide a length information for inet_ntoa_r,Xin LI2007-06-142-5/+6
| | | | | | | | | this is common on other platforms. Reported by: pointyhat via kris Notes: svn path=/head/; revision=170715
* Catch up with the code.Christian Brueffer2007-06-131-2/+2
| | | | | | | Submitted by: peter Notes: svn path=/head/; revision=170683
* Fix yet another (make install) stopper with wrong sourcefilter.3 linksAndrey A. Chernov2007-06-121-2/+2
| | | | Notes: svn path=/head/; revision=170639
* Fix typo in filename from mismerged earlier rev of this file.Bruce M Simpson2007-06-121-1/+1
| | | | Notes: svn path=/head/; revision=170634
* Fix a typo which crept in from an earlier version of this file.Bruce M Simpson2007-06-121-2/+2
| | | | Notes: svn path=/head/; revision=170625
* Add missing userland support files from previous commit for the newBruce M Simpson2007-06-122-0/+587
| | | | | | | multicast source filter API functions. Notes: svn path=/head/; revision=170620
* Import rewrite of IPv4 socket multicast layer to support source-specificBruce M Simpson2007-06-122-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and protocol-independent host mode multicast. The code is written to accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work. This change only pertains to FreeBSD's use as a multicast end-station and does not concern multicast routing; for an IGMPv3/MLDv2 router implementation, consider the XORP project. The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6, which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html Summary * IPv4 multicast socket processing is now moved out of ip_output.c into a new module, in_mcast.c. * The in_mcast.c module implements the IPv4 legacy any-source API in terms of the protocol-independent source-specific API. * Source filters are lazy allocated as the common case does not use them. They are part of per inpcb state and are covered by the inpcb lock. * struct ip_mreqn is now supported to allow applications to specify multicast joins by interface index in the legacy IPv4 any-source API. * In UDP, an incoming multicast datagram only requires that the source port matches the 4-tuple if the socket was already bound by source port. An unbound socket SHOULD be able to receive multicasts sent from an ephemeral source port. * The UDP socket multicast filter mode defaults to exclusive, that is, sources present in the per-socket list will be blocked from delivery. * The RFC 3678 userland functions have been added to libc: setsourcefilter, getsourcefilter, setipv4sourcefilter, getipv4sourcefilter. * Definitions for IGMPv3 are merged but not yet used. * struct sockaddr_storage is now referenced from <netinet/in.h>. It is therefore defined there if not already declared in the same way as for the C99 types. * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF which are then interpreted as interface indexes) is now deprecated. * A patch for the Rhyolite.com routed in the FreeBSD base system is available in the -net archives. This only affects individuals running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces. * Make IPv6 detach path similar to IPv4's in code flow; functionally same. * Bump __FreeBSD_version to 700048; see UPDATING. This work was financially supported by another FreeBSD committer. Obtained from: p4://bms_netdev Submitted by: Wilbert de Graaf (original work) Reviewed by: rwatson (locking), silence from fenner, net@ (but with encouragement) Notes: svn path=/head/; revision=170613
* - Validate incoming addresses and sizes for connectx and bindx.Randall Stewart2007-06-111-5/+16
| | | | | | | - For non-sys call version pass the msg_flags. Notes: svn path=/head/; revision=170580
* Add inet_ntoa_r, a reentrant version of inet_ntoa. This isXin LI2007-06-114-2/+23
| | | | | | | | | available on a lot of platforms, as well as libkern for years. Submitted by: "MQ" Notes: svn path=/head/; revision=170548
* Diff reduction against other *BSDs: ANSIfy functionXin LI2007-06-114-141/+66
| | | | | | | prototypes. No function changes. Notes: svn path=/head/; revision=170528
* Fix bogon in previous commit: <machine/cpu.h> is still needed.Marcel Moolenaar2007-06-101-0/+1
| | | | Notes: svn path=/head/; revision=170506
* The definition of CACHELINESIZE moved from <machine/cpu.h> toMarcel Moolenaar2007-06-101-1/+1
| | | | | | | <machine/md_var.h>. Notes: svn path=/head/; revision=170484
* Document getaddrinfo(3)'s AI_ADDRCONFIGRemko Lodder2007-06-061-6/+67
| | | | | | | | | | PR: docs/78357 Submitted by: Matthias Andree <matthias dot andree at gmx dot de> Patch by: asmodai MFC after: 1 week Notes: svn path=/head/; revision=170379
* Expose __stack_chk_fail_local() so -fstack-protector-all works.Dag-Erling Smørgrav2007-06-052-3/+1
| | | | Notes: svn path=/head/; revision=170321
* Merge BIND 9.4.1 into main chunk.Hajimu UMEMOTO2007-06-031-2/+7
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=170247
* Merge BIND 9.4.1 into main chunk.Hajimu UMEMOTO2007-06-0329-341/+396
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=170244
* This commit was generated by cvs2svn to compensate for changes in r170242,Hajimu UMEMOTO2007-06-038-110/+133
|\ | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=170243
| * Vendor import of BIND 9.4.1Hajimu UMEMOTO2007-06-0337-452/+530
| | | | | | | | Notes: svn path=/vendor/resolver/dist/; revision=170242
* | Export quad symbols. They were previously commented out. These symbolsDaniel Eischen2007-05-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | really shouldn't be exported since they should be pulled from libgcc, but the build of some applications is broken and they expect to see them in libc. glibc exports these symbols, although Solaris doesn't appear to, so export them for compatibility's sake. After discussion with: kan Notes: svn path=/head/; revision=170155
* | Some libc symbol map cleanups.Daniel Eischen2007-05-3111-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net: endhostdnsent is named _endhostdnsent and is private to netdb family of functions. posix1e: acl_size.c has been never compiled in, so there's no "acl_size". rpc: "getnetid" is a static function. stdtime: "gtime" is #ifdef'ed out in the source. some symbols are specific only to some architectures, e.g., ___tls_get_addr is only defined on i386. __htonl, __htons, __ntohl and __ntohs are no longer functions, they are now (internal) defines in <machine/endian.h>. Submitted by: ru Notes: svn path=/head/; revision=170154
* | Correct spelling errors in comments.Robert Watson2007-05-281-2/+2
| | | | | | | | Notes: svn path=/head/; revision=170059
* | Precede symbol names consistently with tabs rather than spaces.Robert Watson2007-05-281-14/+14
| | | | | | | | Notes: svn path=/head/; revision=170057
* | Const'ify and ANSIfy the internal interfaces of regex(3).Xin LI2007-05-251-109/+100
| | | | | | | | | | | | | | | | This is the final change that makes libc to compile with WERROR on my amd64 crashbox. Notes: svn path=/head/; revision=169982
* | ANSIfy function definitions, reduces diff against OpenBSD.Xin LI2007-05-251-17/+8
| | | | | | | | Notes: svn path=/head/; revision=169981
* | Also fix the misspelling of hes_resolve().Ruslan Ermilov2007-05-251-1/+1
| | | | | | | | | | | | | | Submitted by: Danny Braniss Notes: svn path=/head/; revision=169980
* | The usage of "info" in init_hash() is read-only, so constifyXin LI2007-05-251-3/+3
| | | | | | | | | | | | | | | | the internal interface instead of casting away the constant constraint upon calling. Notes: svn path=/head/; revision=169979