summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Clarify the behavior of PATH_FSTAB with regard to 'tainted' execution.Matthew N. Dodd2003-04-071-0/+7
| | | | | | | Requested by: ru Notes: svn path=/head/; revision=113224
* - Add setfstab() and getfstab().Matthew N. Dodd2003-04-073-4/+71
| | | | | | | | - Use the environment variable 'PATH_FSTAB' if set rather than the hardcoded '/etc/fstab' (fstab.h:_PATH_FSTAB) Notes: svn path=/head/; revision=113219
* Catch up with recent vfprintf.c changes.Tim J. Robbins2003-04-071-175/+215
| | | | Notes: svn path=/head/; revision=113199
* __wcsconv(): free(convbuf) before returning NULLAndrey A. Chernov2003-04-071-2/+4
| | | | Notes: svn path=/head/; revision=113196
* Today just isn't my day. Remove some old commented out code that snuckDavid Schultz2003-04-071-1/+1
| | | | | | | | | into the last commit. Noticed by: mike Notes: svn path=/head/; revision=113194
* - %e conversions with precision 0 should not cause a decimal point toDavid Schultz2003-04-071-18/+22
| | | | | | | | | | | be printed. - Fix %f conversions where the number of significant digits is < expt. This would be a one-line change were it not for thousands separators. Noticed by tjr. - Remove some unnecessary code in the parsing of precision specifiers. Notes: svn path=/head/; revision=113191
* Rework the floating point code in printf(). Significant changes:David Schultz2003-04-052-151/+191
| | | | | | | | | | | | | | | | | | | | | - We used to round long double arguments to double. Now we print them properly. - Bugs involving '%F', corner cases of '#' and 'g' format specifiers, and the '.*' precision specifier have been fixed. - Added support for the "'" specifier to print thousands' grouping characters in a locale-dependent manner. - Implement the __vfprintf() side of hexadecimal floating point support. All that is still needed is a routine to convert the mantissa to hex digits one nibble at a time in the style of ultoa(). Reviewed by: silence on standards@ Notes: svn path=/head/; revision=113146
* Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().David Schultz2003-04-058-1/+135
| | | | | | | | | | In support of this, add some MD macros to assist in converting long doubles to the format expected by gdtoa(). Reviewed by: silence on standards@ Notes: svn path=/head/; revision=113145
* Add missing #include to unbreak previous commit.David Schultz2003-04-051-0/+1
| | | | Notes: svn path=/head/; revision=113143
* Correct some buffer sizes.David Schultz2003-04-053-23/+42
| | | | | | | | | | | | | - __vfprintf()'s 'buf' has never been used for floating point, so don't define it in terms of (incorrect) constants describing floating point numbers. The actual size needed depends on sizeof(uintmax_t) and locale details, so I slightly overestimated. - We don't need a 308-character buffer to store the string "308". With long doubles and %a we need more than three characters, though. Notes: svn path=/head/; revision=113142
* MFp4: Link strtof.3 and strtold.3 to strtod.3.Tim J. Robbins2003-04-051-0/+1
| | | | Notes: svn path=/head/; revision=113105
* Zero out the struct tm supplied by the caller. Otherwise,Mike Makonnen2003-04-051-0/+1
| | | | | | | | | | | strange things might happen when garbage values in the struct get passed in to localtime_r() and family. Noticed by: marcus Approved by: markm (mentor)(implicit) Notes: svn path=/head/; revision=113104
* MFp4: Pentium/Athlon-optimised implementation of wcschr().Tim J. Robbins2003-04-052-1/+78
| | | | Notes: svn path=/head/; revision=113103
* Implement makecontext.Jake Burkholder2003-04-013-3/+129
| | | | Notes: svn path=/head/; revision=112963
* [1] - Document EHOSTUNREACH as a possible errorCeri Davies2003-04-011-1/+3
| | | | | | | | | | | [2] - Remove a contraction PR: docs/50401 Submitted by: [1] Slaven Rezic <slaven@rezic.de> MFC after: 1 week Notes: svn path=/head/; revision=112955
* Add a facility allowing processes to inform the VM subsystem they areWes Peters2003-03-311-0/+9
| | | | | | | | | | | critical and should not be killed when pageout is looking for more memory pages in all the wrong places. Reviewed by: arch@ Sponsored by: St. Bernard Software Notes: svn path=/head/; revision=112881
* BDE'ifyMax Khon2003-03-291-79/+89
| | | | Notes: svn path=/head/; revision=112823
* fix truncation check and buffer overflow checkMax Khon2003-03-291-11/+11
| | | | Notes: svn path=/head/; revision=112820
* Align signal frame placed on stack to 16 bytes so that SSE FPU registerDaniel Eischen2003-03-291-1/+2
| | | | | | | | | restores can work. Also correct allocation for signal frame size. Reviewed by: mini Notes: svn path=/head/; revision=112807
* Fill in the rest of the fields in the resulting struct tmMike Makonnen2003-03-291-2/+3
| | | | | | | | | | | | | from strptime(3). Previously, they would get filled only for the %s specifier and as a side effect of using the the %Z specifier with a GMT time zone. PR: misc/48993 Approved by: markm (mentor) Silence on: -standards Notes: svn path=/head/; revision=112787
* - MAXPATHLEN -> PATH_MAX (pass correct buffer size to readlink as well)Max Khon2003-03-281-17/+17
| | | | | | | Requested by: bde Notes: svn path=/head/; revision=112743
* Make realpath() thread-safe. New implementation does not use chdir(2) at all.Max Khon2003-03-272-111/+128
| | | | | | | Submitted by: Constantin S. Svintsoff <kostik (at) iclub.nsu.ru> Notes: svn path=/head/; revision=112726
* - Define a _spinunlock() function so that threading implementations may doJeff Roberson2003-03-262-1/+11
| | | | | | | | | more complicated things than just setting the lock to 0. - Implement stubs for this function in libc and the two threading libraries that are currently in the tree. Notes: svn path=/head/; revision=112665
* The .Fn functionPhilippe Charnier2003-03-244-7/+11
| | | | | | | The ... 2 system call Notes: svn path=/head/; revision=112543
* The .Fn function. Use .Xr where appropriate.Philippe Charnier2003-03-245-16/+27
| | | | Notes: svn path=/head/; revision=112542
* According to C99 decimal_point can't be emptyAndrey A. Chernov2003-03-201-4/+1
| | | | Notes: svn path=/head/; revision=112427
* According to C99 decimal_point can't be the empty string, mention it.Andrey A. Chernov2003-03-201-1/+2
| | | | Notes: svn path=/head/; revision=112426
* decimal_point can't be "" according to C99, so set it to standard "."Andrey A. Chernov2003-03-201-1/+6
| | | | | | | in that case. Notes: svn path=/head/; revision=112425
* - Revamp the function _nis_initshells() to make getusershell() backedRobert Drehmel2003-03-191-35/+30
| | | | | | | | | | by NIS work, like nsswitch.conf(5) promises to be able to. (These modifications will be fed back to NetBSD, of course) - In endusershell(), do not set `sl' to NULL if we know it already has that value. Notes: svn path=/head/; revision=112407
* If realloc(3) fails in copyline(), do not make matters worse byRobert Drehmel2003-03-191-6/+11
| | | | | | | leaving without deallocating `data' thereby creating a memory leak. Notes: svn path=/head/; revision=112404
* The gdtoa import apparently hasn't caused anything or anyone toDavid Schultz2003-03-151-2429/+0
| | | | | | | | explode, so nix the old strtod() / dtoa(). This change is part of the gdtoa patches reviewed on standards@. Notes: svn path=/head/; revision=112257
* MFp4: Pentium/Athlon-optimised implementation of wcslen().Tim J. Robbins2003-03-142-1/+69
| | | | Notes: svn path=/head/; revision=112232
* Merge vfprintf.c revision 1.52.Tim J. Robbins2003-03-141-2/+2
| | | | Notes: svn path=/head/; revision=112229
* Kludge around a bug that results from printf() assuming thatDavid Schultz2003-03-141-1/+1
| | | | | | | | | | | | dtoa() is buggy. The bug would cause incorrect output to be generated when format strings such as '%5.0f' were used with nonzero numbers whose magnitude is less than 1. Reported by: df(1) by way of periodic(8) Reviewed by: mike Notes: svn path=/head/; revision=112224
* Unexpand RCS tag.Tim J. Robbins2003-03-141-1/+1
| | | | Notes: svn path=/head/; revision=112223
* Clean up the way gdtoa sources are found.David E. O'Brien2003-03-132-8/+7
| | | | | | | OK'ed by: das Notes: svn path=/head/; revision=112202
* Document return type of wordfree() (void). Reduce the space betweenTim J. Robbins2003-03-131-3/+4
| | | | | | | | struct member names and the corresponding comments so the lines don't wrap on 80-column terminals. Notes: svn path=/head/; revision=112190
* MFp4: Implementations of the wcstof() and wcstold() functions.Tim J. Robbins2003-03-134-10/+195
| | | | Notes: svn path=/head/; revision=112177
* MFp4: Catch up to recent __dtoa() interface changes and removal of cvt()'sTim J. Robbins2003-03-131-11/+10
| | | | | | | last argument. Notes: svn path=/head/; revision=112174
* Document strtof() and strtold(). Update vendor license.David Schultz2003-03-121-32/+75
| | | | | | | Reviewed by: bde (briefly), mike (mentor), obrien Notes: svn path=/head/; revision=112164
* Replace our ancient dtoa/strtod implementation with the gdtoaDavid Schultz2003-03-1220-10/+286
| | | | | | | | | | | | | | | | | | | | | package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien Notes: svn path=/head/; revision=112163
* Ditch a static global and the mutex that protected it. Achieve theMike Makonnen2003-03-121-27/+18
| | | | | | | | | | | desired strptime(3) reentrancy by adding an extra argument to _strptime() instead. Approved by: markm (mentor) MFC: 4 weeks Notes: svn path=/head/; revision=112156
* Document the fact that hdestory calls free on the keys added withDavid Malone2003-03-121-5/+25
| | | | | | | | | | hsearch(.., ENTER). Make the example reflect this. PR: 49951 Submitted by: Peter Jeremy <peterjeremy@optushome.com.au> Notes: svn path=/head/; revision=112143
* Update sendfile.2 to include a TUNING section that documents theSean Chittenden2003-03-121-0/+38
| | | | | | | | | | various tunables that are applicable to sendfile(2). Update tuning.7 to mention a reference to sendfile.2. Approved by: keramida Notes: svn path=/head/; revision=112134
* MFp4: Reduce code size by 26 bytes by only aligning the jump targets thatTim J. Robbins2003-03-121-10/+1
| | | | | | | are at the top of loops. Notes: svn path=/head/; revision=112132
* MFp4: Make `spanp' const.Tim J. Robbins2003-03-121-3/+4
| | | | Notes: svn path=/head/; revision=112131
* MFp4: Pentium/Athlon-optimised implementation of wmemchr().Tim J. Robbins2003-03-122-1/+115
| | | | Notes: svn path=/head/; revision=112129
* MFp4: Pentium-optimised implementation of wcscmp(). Performs significantlyTim J. Robbins2003-03-102-1/+80
| | | | | | | better than the code generated by gcc in many cases. Notes: svn path=/head/; revision=112059
* MFp4: Add the standard "the {fgetws,fputws} function will fail if" textTim J. Robbins2003-03-092-0/+6
| | | | | | | to the Errors section. Notes: svn path=/head/; revision=112019
* Clean up some signed/unsigned issues in the XDR code.Jacques Vidrine2003-03-073-12/+18
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=111962