summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* <sys/types.h> is no longer needed.Mike Barcroft2002-09-251-1/+0
| | | | Notes: svn path=/head/; revision=103971
* Disqualify UID/GID with non-numeric character.Maxim Konovalov2002-09-251-3/+13
| | | | | | | | | PR: bin/41721 Reviewed by: tjr, silence on -audit MFC after: 2 weeks Notes: svn path=/head/; revision=103958
* Use the standardized CHAR_BIT constant instead of NBBY in userland.Mike Barcroft2002-09-251-2/+3
| | | | Notes: svn path=/head/; revision=103949
* Warn when setinvalidrune() is referenced for consistency with the restTim J. Robbins2002-09-241-0/+1
| | | | | | | | of the rune functions (except sgetrune() and sputrune(), which are really macros). Notes: svn path=/head/; revision=103892
* Add cross-references between wide character and single-byte characterTim J. Robbins2002-09-243-2/+6
| | | | | | | versions of printf() and scanf(). Notes: svn path=/head/; revision=103891
* Remove an unneeded call to _sfrefill() that was missed in the conversionTim J. Robbins2002-09-241-6/+0
| | | | | | | | from vfscanf() to vfwscanf(). It doesn't hurt to have it there, but it's redundant since __fgetwc() will refill the buffer if it needs to. Notes: svn path=/head/; revision=103890
* Use the new va_copy macro to copy variable argument lists instead ofTim J. Robbins2002-09-242-2/+2
| | | | | | | | | | | assignment. This is needed on powerpc but is also more correct for the other ports. Submitted by: grehan Tested on: alpha, i386, sparc64 Notes: svn path=/head/; revision=103876
* Add implementations of wscanf() and related functions: fwscanf(), swscanf(),Tim J. Robbins2002-09-239-6/+1530
| | | | | | | | vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide- character versions of the scanf() family of functions. Notes: svn path=/head/; revision=103856
* Implement the %lc, %ls and %[ conversions, which read sequences of wideTim J. Robbins2002-09-232-16/+137
| | | | | | | | characters, non-whitespace wide character strings and wide character strings in a scanset. Notes: svn path=/head/; revision=103854
* The character argument for __ungetwc() should be wint_t instead of wchar_t.Tim J. Robbins2002-09-231-1/+1
| | | | Notes: svn path=/head/; revision=103853
* Add the remaining C99 wide character string to integer conversion functions.Tim J. Robbins2002-09-226-16/+550
| | | | | | | | Restrict qualifiers were added to the existing prototypes in <inttypes.h> and the typedef for wchar_t was removed. Notes: svn path=/head/; revision=103793
* Add an unlocked version of ungetwc(), __ungetwc(), that __vfwscanf()Tim J. Robbins2002-09-222-9/+22
| | | | | | | will need to use. Notes: svn path=/head/; revision=103782
* Style cleanup:Jonathan Mini2002-09-211-14/+11
| | | | | | | | | | | | | | - Sort local variable declarations. - Protect a hand-formatted comment from indent(1). - Use portable casts, even though this is machine-dependant code. - Remove extraneous blank lines. - Remove trailing newline. - Use sigdelset(3), not SIGDELSET(9). Requested by: bde Notes: svn path=/head/; revision=103769
* Delete stray reference to vsnprintf().Tim J. Robbins2002-09-211-3/+2
| | | | Notes: svn path=/head/; revision=103740
* Add implementations of the wprintf() family of functions, which performTim J. Robbins2002-09-2110-4/+2434
| | | | | | | formatted wide-character output. Notes: svn path=/head/; revision=103739
* Initiate deorbit burn sequence for sysctl CTL_USER MIB branch.Garrett Wollman2002-09-211-105/+351
| | | | | | | | | | | | | | | | Use the correct constants directly from sysconf() rather than calling sysctl() to tell us the (still compiled-in) value. Leave the CTL_POSIX1B stuff alone for now (but I'd like to see this replaced with a single structure returning all of the relevant information). Implement all of the keys from 1003.1-2001 that we can. Ensure that the build will break if someone redefines an option constant to zero without implementing the necessary presence-detection logic here. (4 of 5) Notes: svn path=/head/; revision=103730
* Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the structGarrett Wollman2002-09-214-34/+184
| | | | | | | | | | | | | | | | | | | hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch Notes: svn path=/head/; revision=103726
* Remove unnecessary #include <assert.h>; it was used to bring in theTim J. Robbins2002-09-2120-20/+0
| | | | | | | _DIAGASSERT macro on NetBSD, but we don't need it. Notes: svn path=/head/; revision=103724
* Revert previous commit to unbreak world until we figure out theArchie Cobbs2002-09-205-5/+5
| | | | | | | right way to do it. Notes: svn path=/head/; revision=103686
* Lock the file once per call and use the unlocked fgetwc()/fputwc() variants.Tim J. Robbins2002-09-202-9/+20
| | | | Notes: svn path=/head/; revision=103678
* Lock and unlock the file once per call and use the unlocked version ofTim J. Robbins2002-09-201-7/+11
| | | | | | | ungetc() instead of having ungetc() recurse on the lock. Notes: svn path=/head/; revision=103677
* Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()Tim J. Robbins2002-09-203-18/+44
| | | | | | | and __fgetwc() which can be used when we know the file is locked. Notes: svn path=/head/; revision=103676
* Add restrict type-qualifier.Mike Barcroft2002-09-202-2/+3
| | | | Notes: svn path=/head/; revision=103668
* Don't peek into MD structures from MI code. The getcontext(3) andJonathan Mini2002-09-201-9/+1
| | | | | | | setcontext(3) functions check the validify of the mcontext_t structs. Notes: svn path=/head/; revision=103666
* Fix a problem with the definition of HUGE_VAL causing the gcc warningArchie Cobbs2002-09-195-5/+5
| | | | | | | | | "cast increases required alignment of target type" on some platforms. Reviewed by: bde Notes: svn path=/head/; revision=103653
* Implement the %ls and %lc conversions for printing wide character stringsTim J. Robbins2002-09-192-14/+110
| | | | | | | | | and wide characters. These were already documented in the manual page, with an entry mentioning that they were not implemented yet. The XSI %S and %C synoyms have not been added. Notes: svn path=/head/; revision=103633
* Add forgotten newlines in debug messages.Jacques Vidrine2002-09-191-2/+2
| | | | Notes: svn path=/head/; revision=103630
* Return the correct environment name for 64-bit platforms in theGarrett Wollman2002-09-191-1/+2
| | | | | | | _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS case. Notes: svn path=/head/; revision=103593
* Welcome the sem_ API to libc!Alfred Perlstein2002-09-193-1/+709
| | | | Notes: svn path=/head/; revision=103578
* add a stub for pthread_cond_destroy.Alfred Perlstein2002-09-191-0/+7
| | | | Notes: svn path=/head/; revision=103576
* Optimise the common case where no special encoding is in use (LC_CTYPE is "C"Tim J. Robbins2002-09-182-8/+48
| | | | | | | | | or "POSIX", other European locales). Use __sgetc() and __sputc() where possible to avoid a wasteful lock and unlock for each byte and to avoid function call overhead. Notes: svn path=/head/; revision=103539
* Logic error in previous: don't exit the loop when an incomplete multibyteTim J. Robbins2002-09-181-1/+1
| | | | | | | sequence is detected. Notes: svn path=/head/; revision=103538
* Deprecate the rest of the rune interface.Tim J. Robbins2002-09-182-0/+22
| | | | Notes: svn path=/head/; revision=103525
* Mark mbmb(), mbrune(), and mbrrune() as deprecated functions. We want toTim J. Robbins2002-09-182-0/+19
| | | | | | | | | get applications to move to the ISO C interfaces as well as have the freedom to replace the rune interfaces with ones that support stateful conversions some time in the future. Notes: svn path=/head/; revision=103524
* Reimplement the functionality of fgetrune(), fputrune(), and fungetrune()Tim J. Robbins2002-09-185-25/+61
| | | | | | | | | here in terms of mbrtowc(), wcrtomb(), and the single-byte I/O functions. The rune I/O functions are about to become deprecated in favour of the ones provided by ISO C90 Amd. 1 and C99. Notes: svn path=/head/; revision=103523
* Fixed editing error in previous commit (*blush*).Bruce Evans2002-09-172-2/+2
| | | | Notes: svn path=/head/; revision=103501
* Fixed unsorting of SRCS.Bruce Evans2002-09-172-4/+4
| | | | Notes: svn path=/head/; revision=103488
* Fix vsnprintf(3) memory leak for size == 0.Maxim Konovalov2002-09-171-0/+6
| | | | | | | | | | PR: bin/36175 Obtained from: OpenBSD Reviewed by: silence on -audit MFC after: 5 days Notes: svn path=/head/; revision=103480
* Bandaid to stop failing on non-i386 platforms.Peter Wemm2002-09-171-0/+5
| | | | | | | Add a big ugly #warning as a reminder. Notes: svn path=/head/; revision=103460
* Use a weak symbol for signalcontext().Jonathan Mini2002-09-171-1/+3
| | | | Notes: svn path=/head/; revision=103443
* Add signalcontext(), which adds a signal frame to a ucontext_t.Jonathan Mini2002-09-171-0/+80
| | | | Notes: svn path=/head/; revision=103442
* Initiate deorbit burn for the i386-only a.out related support. Moves arePeter Wemm2002-09-175-169/+8
| | | | | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha Notes: svn path=/head/; revision=103436
* Fix documentation of clnt_control()'s CL{GET|SET}_{VERS|XID} toBill Fenner2002-09-161-4/+4
| | | | | | | | reflect that they actually require a u_int32_t *, which is not necessarily the same as an unsigned long *. Notes: svn path=/head/; revision=103429
* Save and restore FPU state properly in ucontext_t's.Jonathan Mini2002-09-164-36/+29
| | | | | | | | Reviewed by: deischen, julian Approved by: -arch Notes: svn path=/head/; revision=103406
* Add signalcontext(), which lays down a signal frame onto a ucontext_t.Jonathan Mini2002-09-161-12/+15
| | | | | | | | Reviewed by: deischen, julian Approved by: -arch Notes: svn path=/head/; revision=103405
* Allocate 64K recieve buffer for DNS responses.Hajimu UMEMOTO2002-09-161-27/+48
| | | | Notes: svn path=/head/; revision=103401
* Convert eight space indents to tabs in the "*" format handling code.Tim J. Robbins2002-09-161-43/+43
| | | | Notes: svn path=/head/; revision=103399
* Allocate 64K recieve buffer for DNS responses.Hajimu UMEMOTO2002-09-151-20/+45
| | | | | | | | | | | KAME did the modification only to _dns_getaddrinfo(). However, it is not sufficient, and res_queryN() should be modified, too. So, I did same modification to res_queryN(). Obtained from: KAME Notes: svn path=/head/; revision=103357
* Check for truncation in calls to res_send/res_query/res_search.Jacques Vidrine2002-09-156-12/+42
| | | | | | | Fail when it is detected. Notes: svn path=/head/; revision=103350
* Add wcstod() as a wrapper around strtod(). It does not handle any charactersTim J. Robbins2002-09-153-2/+162
| | | | | | | that strtod() does not (alternate digit characters, etc. are not handled). Notes: svn path=/head/; revision=103339