Archie Cobbs
ae8a4b2f36
Revert previous commit to unbreak world until we figure out the
...
right way to do it.
2002-09-20 15:43:26 +00:00
Tim J. Robbins
7591ae56ae
Lock the file once per call and use the unlocked fgetwc()/fputwc() variants.
2002-09-20 13:25:40 +00:00
Tim J. Robbins
9260341650
Lock and unlock the file once per call and use the unlocked version of
...
ungetc() instead of having ungetc() recurse on the lock.
2002-09-20 13:23:26 +00:00
Tim J. Robbins
8f030a44b8
Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()
...
and __fgetwc() which can be used when we know the file is locked.
2002-09-20 13:20:41 +00:00
Mike Barcroft
883738f287
Add restrict type-qualifier.
2002-09-20 08:24:01 +00:00
Jonathan Mini
4ed3c94b61
Don't peek into MD structures from MI code. The getcontext(3) and
...
setcontext(3) functions check the validify of the mcontext_t structs.
2002-09-20 08:13:21 +00:00
Archie Cobbs
f5f1272284
Fix a problem with the definition of HUGE_VAL causing the gcc warning
...
"cast increases required alignment of target type" on some platforms.
Reviewed by: bde
2002-09-19 19:47:27 +00:00
Tim J. Robbins
b9aac30810
Implement the %ls and %lc conversions for printing wide character strings
...
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.
2002-09-19 12:50:28 +00:00
Jacques Vidrine
7922d4cf1a
Add forgotten newlines in debug messages.
2002-09-19 11:36:47 +00:00
Garrett Wollman
4b85f43b30
Return the correct environment name for 64-bit platforms in the
...
_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS case.
2002-09-19 03:47:36 +00:00
Alfred Perlstein
bf4dc8772e
Welcome the sem_ API to libc!
2002-09-19 01:14:08 +00:00
Alfred Perlstein
4f68734dc6
add a stub for pthread_cond_destroy.
2002-09-19 01:09:49 +00:00
Tim J. Robbins
0b7bc80226
Optimise the common case where no special encoding is in use (LC_CTYPE is "C"
...
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.
2002-09-18 12:17:28 +00:00
Tim J. Robbins
bddc6280f2
Logic error in previous: don't exit the loop when an incomplete multibyte
...
sequence is detected.
2002-09-18 10:21:41 +00:00
Tim J. Robbins
530bb9225d
Deprecate the rest of the rune interface.
2002-09-18 06:19:12 +00:00
Tim J. Robbins
7948cae0d2
Mark mbmb(), mbrune(), and mbrrune() as deprecated functions. We want to
...
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.
2002-09-18 06:11:21 +00:00
Tim J. Robbins
24990dfad0
Reimplement the functionality of fgetrune(), fputrune(), and fungetrune()
...
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.
2002-09-18 05:58:11 +00:00
Bruce Evans
ff5250b3e7
Fixed editing error in previous commit (*blush*).
2002-09-17 19:43:53 +00:00
Bruce Evans
803e437fb0
Fixed unsorting of SRCS.
2002-09-17 14:33:23 +00:00
Maxim Konovalov
48eaac247f
Fix vsnprintf(3) memory leak for size == 0.
...
PR: bin/36175
Obtained from: OpenBSD
Reviewed by: silence on -audit
MFC after: 5 days
2002-09-17 11:28:24 +00:00
Peter Wemm
6064ca520a
Bandaid to stop failing on non-i386 platforms.
...
Add a big ugly #warning as a reminder.
2002-09-17 06:22:51 +00:00
Jonathan Mini
7630ea31ed
Use a weak symbol for signalcontext().
2002-09-17 03:15:47 +00:00
Jonathan Mini
1d6e1c66b2
Add signalcontext(), which adds a signal frame to a ucontext_t.
2002-09-17 03:11:07 +00:00
Peter Wemm
66422f5b7a
Initiate deorbit burn for the i386-only a.out related support. Moves are
...
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
2002-09-17 01:49:00 +00:00
Bill Fenner
e5b04cee36
Fix documentation of clnt_control()'s CL{GET|SET}_{VERS|XID} to
...
reflect that they actually require a u_int32_t *, which is not
necessarily the same as an unsigned long *.
2002-09-16 21:45:37 +00:00
Jonathan Mini
f990583656
Save and restore FPU state properly in ucontext_t's.
...
Reviewed by: deischen, julian
Approved by: -arch
2002-09-16 19:24:31 +00:00
Jonathan Mini
b3466b3fe0
Add signalcontext(), which lays down a signal frame onto a ucontext_t.
...
Reviewed by: deischen, julian
Approved by: -arch
2002-09-16 19:23:35 +00:00
Hajimu UMEMOTO
9832619c90
Allocate 64K recieve buffer for DNS responses.
2002-09-16 13:19:47 +00:00
Tim J. Robbins
4d783ded07
Convert eight space indents to tabs in the "*" format handling code.
2002-09-16 12:07:13 +00:00
Hajimu UMEMOTO
5cd588cb14
Allocate 64K recieve buffer for DNS responses.
...
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
2002-09-15 20:36:38 +00:00
Jacques Vidrine
54384cf3b0
Check for truncation in calls to res_send/res_query/res_search.
...
Fail when it is detected.
2002-09-15 16:51:09 +00:00
Tim J. Robbins
03b716c4bd
Add wcstod() as a wrapper around strtod(). It does not handle any characters
...
that strtod() does not (alternate digit characters, etc. are not handled).
2002-09-15 08:38:51 +00:00
Tim J. Robbins
528bebffb1
Use the heap instead of the stack to store temporary multibyte string
...
buffers; this is slower but safer for threaded programs where threads
often have relatively low stack size limits.
2002-09-15 08:06:17 +00:00
Jacques Vidrine
7deb8a7ddd
Backout the increase of MAXPACKET from 1024 to 65536: it
...
broke pthreads.
Reported by: mbr, tjr
2002-09-15 04:23:20 +00:00
Thomas Moestl
6c788325fa
Use the macros from machine/fsr.h; some minor cleanups.
2002-09-14 18:07:03 +00:00
Thomas Moestl
8579151e4b
Add implementations of fpgetmask(), fpgetround(), fpgetsticky(),
...
fpsetround(), fpsetsticky(), obtained from NetBSD and tweaked a little
to use definitions from machine/fsr.h instead of magic numbers.
2002-09-14 18:06:21 +00:00
Hajimu UMEMOTO
08c89c65eb
Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.
...
Obtained from: KAME
2002-09-14 17:28:40 +00:00
Jacques Vidrine
2e4dbbaa93
When using res_send/res_query/res_search, the caller must either
...
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
2002-09-13 20:31:29 +00:00
Thomas Moestl
f085ae60c0
Add an implementation of fabs() (which is quite trivial).
...
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.
2002-09-13 16:01:26 +00:00
Tim J. Robbins
3a67d8efd0
Correct type of second argument: it is wchar_t ** restrict,
...
not wchar_t * restrict.
2002-09-12 09:25:27 +00:00
Archie Cobbs
0990061258
Update to reflect reality.
...
Reviewed by: mini
MFC after: 3 days
2002-09-11 21:40:02 +00:00
Archie Cobbs
a892767bc4
Add man pages for getcontext()/setcontext(), makecontext()/swapcontext(),
...
and ucontext_t.
Reviewed by: mini
MFC after: 3 days
2002-09-11 21:39:21 +00:00
Tim J. Robbins
47794211c8
Add an implementation of wcsftime() (wide character version of strftime()).
2002-09-11 08:57:11 +00:00
Mike Barcroft
a4a96c8166
Add `restrict' type-qualifier.
2002-09-11 05:05:48 +00:00
Archie Cobbs
a9f615db06
Adjust to reflect reality, which is that sigaltstack() takes stack_t *'s.
...
MFC after: 3 days
2002-09-10 21:06:51 +00:00
Garrett Wollman
eca67d5104
Implement C99's _Exit() interface.
...
Implement a version of qsort that provides a thunk to the comparison function.
Update manual pages.
2002-09-10 02:04:49 +00:00
Tim J. Robbins
5fd1762445
Add wcstol() and wcstoul(), based on strtol() and strtoul().
2002-09-08 13:27:26 +00:00
Tim J. Robbins
8e4365cf75
Replace a stray reference to strtok() with one to wcstok().
2002-09-08 11:09:24 +00:00
Garrett Wollman
f882c94f2b
Fix a syntax error which causes an annoying warning.
2002-09-08 04:43:28 +00:00
Tim J. Robbins
9ad391340e
Add an implementation of wcstok(), based on strtok_r().
2002-09-07 08:16:57 +00:00