summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Back out previous commit due to incorrect content.Tom Rhodes2003-12-231-128/+62
| | | | | | | Noticed by: wollman Notes: svn path=/head/; revision=123780
* Document many of the missing posix.1b options.Tom Rhodes2003-12-231-62/+128
| | | | | | | | | PR: 20528 Submitted by: bms (original version) Requested by: mike (awhile ago) Notes: svn path=/head/; revision=123773
* Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendorAlexander Kabaev2003-12-192-13/+2
| | | | | | | | | | | | | | | | รณ++ ABI document at http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor The ABI was initially defined for ia64, but GCC3 and Intel compilers have adopted it on other platforms. This is the patch from PR bin/59552 with a number of changes by me. PR: bin/59552 Submitted by: Bradley T Hughes (bhughes at trolltech dot com) Notes: svn path=/head/; revision=123674
* Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendorAlexander Kabaev2003-12-191-7/+101
| | | | | | | | | | | | | | | | C++ ABI document at http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor The ABI was initially defined for ia64, but GCC3 and Intel compilers have adopted it on other platforms. This is the patch from PR bin/59552 with a number of changes by me. PR: bin/59552 Submitted by: Bradley T Hughes (bhughes at trolltech dot com) Notes: svn path=/head/; revision=123673
* First byte of GBK-like sequences is 0x81, not 0x80Andrey A. Chernov2003-12-191-1/+1
| | | | Notes: svn path=/head/; revision=123665
* Brucification: Don't initialize in declaration, make sure extra linesJordan K. Hubbard2003-12-182-2/+5
| | | | | | | follow declaration section. Notes: svn path=/head/; revision=123631
* Do comparison using appropriate casting first, as per SUSv3 (search for firstJordan K. Hubbard2003-12-172-2/+4
| | | | | | | [last] character, not int). Notes: svn path=/head/; revision=123584
* Document the effect of sysctl tunables controlling p_candebug(9) onJoseph Koshy2003-12-141-1/+7
| | | | | | | ktrace(2). Notes: svn path=/head/; revision=123534
* Fixed English error in previous commit. Fixed some older English errors.Bruce Evans2003-12-111-6/+5
| | | | | | | Removed a redundant clause. Notes: svn path=/head/; revision=123440
* Add reference to standards/55112 for next time SHLIB_MAJOR is bumped.Mike Heffner2003-12-101-0/+1
| | | | | | | Suggested by: wollman Notes: svn path=/head/; revision=123393
* Add sticky(8) cross reference.Diomidis Spinellis2003-12-101-1/+2
| | | | | | | | | PR: docs/60068 Submitted by: Ken Stailey MFC after: 2 weeks Notes: svn path=/head/; revision=123388
* - Put manh/manl bitfields into correct-sized integral type.Peter Grehan2003-12-101-5/+4
| | | | | | | - remove XXX normalization bit comment, code is correct. Notes: svn path=/head/; revision=123381
* Add a short description of the kse_switchin(2) syscall to the kseMarcel Moolenaar2003-12-102-2/+14
| | | | | | | | manpage and add a kse_switchin link. While here, list kse_thr_interrupt before kse_wakeup in the MLINKS variable and the synopsis. Notes: svn path=/head/; revision=123367
* Set __mbrtowc and __wcrtomb correctly when changing to the C/POSIX locale.Tim J. Robbins2003-12-081-0/+14
| | | | | | | | | | Save __mbrtowc and __wcrtomb and restore them when changing back to the cached locale. Reported by: perky Notes: svn path=/head/; revision=123308
* Add support for timeout: and attempts: resolver options.Murray Stokely2003-12-071-0/+20
| | | | | | | | Submitted by: Paul Vixie <paul@vix.com> / ISC MFC After: 1 week Notes: svn path=/head/; revision=123236
* Split multibyte(3) into separate manual pages for each function.Tim J. Robbins2003-12-077-145/+543
| | | | | | | | | Instead of just deleting it, turn the original page into a general overview of the multibyte character conversion functions, somewhat similar to stdio(3). Notes: svn path=/head/; revision=123222
* Split the documentation for localeconv() off into a separate manual page.Tim J. Robbins2003-12-073-176/+232
| | | | Notes: svn path=/head/; revision=123221
* Fix prototype for getchar_unlocked().Tim J. Robbins2003-12-071-1/+1
| | | | Notes: svn path=/head/; revision=123216
* "Fix" makecontext() so that the C code begins execution with itsPeter Wemm2003-12-051-2/+6
| | | | | | | | | | | | | | | | ABI-required stack alignment. C code expects that the push of the return address disturbed the 16 byte alignment and it will take corrective measures to fix it before making another call. Of course, if its wrong to start with, then all hell breaks loose. Essentially we "fix" this by making the stack alignment odd to start with. This was one of the things that broke on libkse with apps that use floating point/varargs/etc. Approved by: re (scottl) Notes: svn path=/head/; revision=123154
* Fixed a bug in sendfile(2) where the sent data would be corrupted dueDavid Greenman2003-12-011-2/+6
| | | | | | | | | | | | | to sendfile(2) being erroneously automatically restarted after a signal is delivered. Fixed by converting ERESTART to EINTR prior to exiting. Updated manual page to indicate the potential EINTR error, its cause and consequences. Approved by: re@freebsd.org Notes: svn path=/head/; revision=123094
* Do not adjust to the pagesize at runtime. Besides for the one-timeMarcel Moolenaar2003-11-281-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization overhead, there's a problem in that we never call imalloc() and thus malloc_init() for zero-sized allocations. As a result, malloc(0) returns NULL when it's the first or only malloc in the program. Any non-zero allocation will initialize the malloc code with the side-effect that subsequent zero-sized allocations return a non-NULL pointer. This is because the pointer we return for zero- sized allocations is calculated from malloc_pageshift, which needs to be initialized at runtime on ia64. The result of the inconsistent behaviour described above is that configure scripts failed the test for a GNU compatible malloc. This resulted in a lot of broken ports. Other, even simpler, solutions were possible as well: 1. initialize malloc_pageshift with some non-zero value (say 13 for 8KB pages) and keep the runtime adjustment. 2. Stop using malloc_pageshift to calculate ZEROSIZEPTR. Removal of the runtime adjustment was chosen because then ia64 is the same as any other platform. It is not to say that using a page size obtained at runtime is bad per se. It's that there's currently a high level of gratuity for its existence and the moment it causes problems is the moment you need to get rid of it. Hence, it's not unthinkable that this commit is (partially) reverted some time in the future when we do have a good reason for it and a good way to achieve it. Approved by: re@ (rwatson) Reported by: kris (portmgr@) -- may the ports be with you Notes: svn path=/head/; revision=123031
* Replace out of date struct statfs definition with a reference to statfs(2).Tim J. Robbins2003-11-211-64/+3
| | | | | | | Approved by: re Notes: svn path=/head/; revision=122936
* Fix problem where initgroups would silently truncate groups withDiomidis Spinellis2003-11-191-2/+7
| | | | | | | | | | more than NGROUP elements without providing the opportunity to setgroups to fail and correctly return error and set errno. MFC after: 2 weeks Notes: svn path=/head/; revision=122899
* Documented missing EINVAL errno valueDiomidis Spinellis2003-11-191-0/+6
| | | | | | | | | | | kern_prot.c: if (ngrp > NGROUPS) return (EINVAL); MFC after: 2 weeks Notes: svn path=/head/; revision=122895
* Install the user trap handlers that libc provides from a constructor, soJake Burkholder2003-11-181-0/+2
| | | | | | | | | | | that they will be installed before application constructors are invoked. Its possible to link applications such that this fails, application code is invoked before they are installed, but, well, Don't Do That. Approved by: re (jhb) Notes: svn path=/head/; revision=122883
* Staticize label_default_head to prevent it from leaking out of mac.c.Robert Watson2003-11-171-1/+1
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122868
* Baby steps. Set WARNS=1 for libc.Jacques Vidrine2003-11-171-0/+1
| | | | Notes: svn path=/head/; revision=122831
* Detect range errors when using the %s specifier. Previously, LONG_MAXJacques Vidrine2003-11-171-3/+10
| | | | | | | | | | was rejected as a range error, while any values less than LONG_MIN were silently substituted with LONG_MIN. Furthermore, on some platforms `time_t' has less range than `long' (e.g. alpha), which may give incorrect results when parsing some strings. Notes: svn path=/head/; revision=122830
* Update mac_set.3 to account for new behavior of mac_set_fd() in theRobert Watson2003-11-161-5/+7
| | | | | | | | | | | context of sockets, and document EINVAL as a possible failure mode based on the object selected, not just the label provided. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122811
* Implement mac_get_peer(3) using getsockopt() with SOL_SOCKET andRobert Watson2003-11-162-26/+43
| | | | | | | | | | | | | | | | | | | | | SO_PEERLABEL. This provides an interface to query the label of a socket peer without embedding implementation details of mac_t in the application. Previously, sizeof(*mac_t) had to be specified by an application when performing getsockopt(). Document mac_get_peer(3), and expand documentation of the other mac_get(3) functions. Note that it's possible to get EINVAL back from mac_get_fd(3) when pointing it at an inappropriate object. NOTE: mac_get_fd() and mac_set_fd() support for sockets will follow shortly, so the documentation is slightly ahead of the code. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122810
* Memory allocated by mac_to_text() must be freed using free(3) notRobert Watson2003-11-161-2/+15
| | | | | | | | | | | mac_free(3), which is used only for variables of type mac_t in the FreeBSD implementation. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122777
* Resync. struct statfs and flag definitions with sys/mount.h.Tim J. Robbins2003-11-161-22/+57
| | | | Notes: svn path=/head/; revision=122776
* Remove debugging printf that crept into the last commit.Robert Watson2003-11-151-1/+0
| | | | Notes: svn path=/head/; revision=122735
* /etc/mac.conf is implicitly read and parsed when the MAC configurationRobert Watson2003-11-151-20/+6
| | | | | | | | | | | | | | is accessed for the first time as a result of an application looking up label configuration information. Previously, the check and read were kicked off by mac_prepare_(typename)() functions; since mac_prepare_type() may now be directly employed by a user process, push the check and initialization into that function. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122732
* Update cross references after utf2/euc move.Tim J. Robbins2003-11-1510-18/+18
| | | | Notes: svn path=/head/; revision=122730
* Remove section 4 versions of these manual pages, they have beenTim J. Robbins2003-11-152-232/+0
| | | | | | | moved into section 5. Notes: svn path=/head/; revision=122728
* Install the section 5 versions of EUC and UTF2 manual pages instead ofTim J. Robbins2003-11-151-2/+1
| | | | | | | the section 4 versions. Notes: svn path=/head/; revision=122727
* Update the EUC and UTF2 manual pages for their new home in section 5.Tim J. Robbins2003-11-152-2/+2
| | | | | | | These have been repo-copied from euc.4 and utf2.4. Notes: svn path=/head/; revision=122724
* Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function,Bruce M Simpson2003-11-143-2/+322
| | | | | | | | | getifmaddrs(), is added to retrieve current multicast group memberships. Reviewed by: harti Notes: svn path=/head/; revision=122687
* u_int8_t cannot carry a number greater than 255.Hajimu UMEMOTO2003-11-141-3/+1
| | | | | | | Reported by: nectar Notes: svn path=/head/; revision=122682
* - Add documentation for EBUSY.Alan Cox2003-11-141-2/+4
| | | | | | | | - Remove EIO. - Add a cross reference to mlock(2). Notes: svn path=/head/; revision=122647
* - Use the magic for ___sigreturn in __sigset.Jeff Roberson2003-11-141-3/+11
| | | | | | | | | | | - In __sigreturn call sigprocmask() to restore our signal state rather than returning through sigreturn(). jmp to ___sigreturn to restore our register state following this. Requested by: pete Notes: svn path=/head/; revision=122633
* Use __sfvwrite() instead of __sputc() via __fputwc() to write to fakeTim J. Robbins2003-11-121-1/+30
| | | | | | | | | | | string files (__SSTR flag set). This is necessary because __sputc() does not respect the __SALC flag, and crashes trying to flush the buffer instead of resizing it. PR: 59167 Notes: svn path=/head/; revision=122547
* - Markup fix-ups (add .Dq, and some hard line breaks at the endKen Smith2003-11-111-4/+10
| | | | | | | | | of sentences). Approved by: blackend (mentor) Notes: svn path=/head/; revision=122504
* - Add a note about how jail(2) effects the securelevel.Ken Smith2003-11-111-0/+6
| | | | | | | | Reviewed by: rwatson Approved by: blackend (mentor) Notes: svn path=/head/; revision=122503
* Add information about the EVFILT_NETDEV filterChristian Brueffer2003-11-111-0/+24
| | | | | | | | | PR: docs/56872 (based on) Submitted by: Suleiman Souhlal <refugee@vt.edu> Reviewed by: hmp, jmg Notes: svn path=/head/; revision=122489
* Fix a typo that caused mbrtowc() to always return 0.Tim J. Robbins2003-11-111-1/+1
| | | | Notes: svn path=/head/; revision=122467
* Add a section documenting the sysctl(8) tunables that influence theJoseph Koshy2003-11-111-2/+15
| | | | | | | | operation of ktrace(2). Add a cross-reference to sysctl(8). Make the language of rev 1.22 more consistent with the rest of the manual page. Notes: svn path=/head/; revision=122459
* Improve the performance of radixsort() whenTim Kientzle2003-11-111-0/+11
| | | | | | | | | | | | | | | | sorting strings with common prefixes by noting when all the strings land in just one bin. Testing shows significant speedups (on the order of 30%) on strings with common prefixes and no slowdowns on any of my test cases. Submitted by: Markus Bjartveit Kruger <markusk@pvv.ntnu.no> PR: 58860 Approved by: gordon (mentor) Notes: svn path=/head/; revision=122458
* Have utrace(2) return ENOMEM if malloc() fails. Document this errorJoseph Koshy2003-11-111-4/+6
| | | | | | | | | return in its manual page. Reviewed by: jhb Notes: svn path=/head/; revision=122457