summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Optimise the common case where no special encoding is in use (LC_CTYPE is "C"tjr2002-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.
* Logic error in previous: don't exit the loop when an incomplete multibytetjr2002-09-181-1/+1
| | | | sequence is detected.
* Deprecate the rest of the rune interface.tjr2002-09-182-0/+22
|
* Mark mbmb(), mbrune(), and mbrrune() as deprecated functions. We want totjr2002-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.
* Reimplement the functionality of fgetrune(), fputrune(), and fungetrune()tjr2002-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.
* Fixed editing error in previous commit (*blush*).bde2002-09-172-2/+2
|
* Fixed unsorting of SRCS.bde2002-09-172-4/+4
|
* Fix vsnprintf(3) memory leak for size == 0.maxim2002-09-171-0/+6
| | | | | | | PR: bin/36175 Obtained from: OpenBSD Reviewed by: silence on -audit MFC after: 5 days
* Bandaid to stop failing on non-i386 platforms.peter2002-09-171-0/+5
| | | | Add a big ugly #warning as a reminder.
* Use a weak symbol for signalcontext().mini2002-09-171-1/+3
|
* Add signalcontext(), which adds a signal frame to a ucontext_t.mini2002-09-171-0/+80
|
* Initiate deorbit burn for the i386-only a.out related support. Moves arepeter2002-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
* Fix documentation of clnt_control()'s CL{GET|SET}_{VERS|XID} tofenner2002-09-161-4/+4
| | | | | reflect that they actually require a u_int32_t *, which is not necessarily the same as an unsigned long *.
* Save and restore FPU state properly in ucontext_t's.mini2002-09-164-36/+29
| | | | | Reviewed by: deischen, julian Approved by: -arch
* Add signalcontext(), which lays down a signal frame onto a ucontext_t.mini2002-09-161-12/+15
| | | | | Reviewed by: deischen, julian Approved by: -arch
* Allocate 64K recieve buffer for DNS responses.ume2002-09-161-27/+48
|
* Convert eight space indents to tabs in the "*" format handling code.tjr2002-09-161-43/+43
|
* Allocate 64K recieve buffer for DNS responses.ume2002-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
* Check for truncation in calls to res_send/res_query/res_search.nectar2002-09-156-12/+42
| | | | Fail when it is detected.
* Add wcstod() as a wrapper around strtod(). It does not handle any characterstjr2002-09-153-2/+162
| | | | that strtod() does not (alternate digit characters, etc. are not handled).
* Use the heap instead of the stack to store temporary multibyte stringtjr2002-09-151-10/+28
| | | | | buffers; this is slower but safer for threaded programs where threads often have relatively low stack size limits.
* Backout the increase of MAXPACKET from 1024 to 65536: itnectar2002-09-156-7/+26
| | | | | | broke pthreads. Reported by: mbr, tjr
* Use the macros from machine/fsr.h; some minor cleanups.tmm2002-09-141-5/+6
|
* Add implementations of fpgetmask(), fpgetround(), fpgetsticky(),tmm2002-09-146-1/+126
| | | | | fpsetround(), fpsetsticky(), obtained from NetBSD and tweaked a little to use definitions from machine/fsr.h instead of magic numbers.
* Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.ume2002-09-141-0/+2
| | | | Obtained from: KAME
* When using res_send/res_query/res_search, the caller must eithernectar2002-09-136-26/+7
| | | | | | | | | insure enough space is available for the response, or be prepared to resize the buffer and retry as necessary. Do the conservative thing and make sure enough space is available. Reviewed by: silence on freebsd-audit
* Add an implementation of fabs() (which is quite trivial).tmm2002-09-132-1/+38
| | | | | | | | | When it is called directly, gcc is smart enough to generate inline code for it, which is why it wasn't noticed before that it was missing. fabs() would probably better fit into libm, but it has traditionally been in libc on FreeBSD, so there is probably software around that makes assumptions about this by now.
* Correct type of second argument: it is wchar_t ** restrict,tjr2002-09-121-2/+2
| | | | not wchar_t * restrict.
* Update to reflect reality.archie2002-09-112-31/+8
| | | | | Reviewed by: mini MFC after: 3 days
* Add man pages for getcontext()/setcontext(), makecontext()/swapcontext(),archie2002-09-114-5/+331
| | | | | | | and ucontext_t. Reviewed by: mini MFC after: 3 days
* Add an implementation of wcsftime() (wide character version of strftime()).tjr2002-09-113-2/+152
|
* Add `restrict' type-qualifier.mike2002-09-113-6/+6
|
* Adjust to reflect reality, which is that sigaltstack() takes stack_t *'s.archie2002-09-101-6/+6
| | | | MFC after: 3 days
* Implement C99's _Exit() interface.wollman2002-09-106-55/+158
| | | | | | Implement a version of qsort that provides a thunk to the comparison function. Update manual pages.
* Add wcstol() and wcstoul(), based on strtol() and strtoul().tjr2002-09-084-4/+314
|
* Replace a stray reference to strtok() with one to wcstok().tjr2002-09-081-1/+1
|
* Fix a syntax error which causes an annoying warning.wollman2002-09-081-0/+1
|
* Add an implementation of wcstok(), based on strtok_r().tjr2002-09-073-3/+213
|
* Two arrays were born from the same seeds, both grew into complementary setsjmallett2002-09-071-1/+1
| | | | | | | | of pointers to strings. These two arrays were fixed to the same size, but one had an implicit zeroed trailer element, which was unused because the size was used up by the ones before said zeroed trailer element. So the unused limb was chopped off the over-sized-but-not-over-sized array, and everyone lived happily ever after.
* Sync prototypes with <wchar.h> with respect to the restrict qualifier.tjr2002-09-071-6/+6
|
* Add restrict qualifiers where C99 permits them. All of these already hadtjr2002-09-076-12/+12
| | | | restrict qualifiers on their prototypes in <wchar.h>.
* Call strtok_r() via a libc private name from within strtok().tjr2002-09-071-2/+6
|
* Include some verbage about not calling exit() from functions registeredwollman2002-09-062-2/+24
| | | | by atexit().
* Style: One space between "restrict" qualifier and "*".tjr2002-09-0659-92/+92
|
* Install the userland signal trampoline when sigaction is first called,jake2002-09-032-1/+50
| | | | | | | instead of on startup. This fixes binary compatibility of dynamically linked binaries from before the signal code move. Suggested by: wollman (a long time ago)
* Fix a nasty bug exposed by mktime() when time_t is significantly biggerpeter2002-09-031-0/+6
| | | | | | | than 32 bits. It was trying to figure out things like the day of week of when time_t is roughly 2^62 etc. Make a better guess for the starting point for the binary search that works on both 32 and 64 bit types. I have been using this for a while now.
* Set errno to EILSEQ when invalid multibyte sequences are detectedtjr2002-09-033-3/+14
| | | | (XSI extension to 1003.1-2001).
* Use FOO(a) for macros with variadic args, instead of FOO(a,) or FOO(a, ).jake2002-09-021-3/+3
| | | | Submitted by: gcc3.2
* - Let their manual pages show the reader that the bzero(3) androbert2002-09-014-22/+33
| | | | | | | | | | bcopy(3) functions are prototyped in <strings.h> and not in <string.h> anymore. - Add a sentence about that to the respective HISTORY sections. In the C source files: - Include <string.h> or <strings.h> depending on what function is to be compiled. - Use ANSI-C function definitions.
* Typo: refer to MB_LEN_MAX instead of MB_CHAR_MAX (which does not exist).tjr2002-09-011-1/+1
|
OpenPOWER on IntegriCloud