Commit Graph

3492 Commits

Author SHA1 Message Date
tjr
397f4349cf Deprecate the rest of the rune interface. 2002-09-18 06:19:12 +00:00
tjr
7eb8c7cf9a 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
tjr
5bb288ec92 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
bde
4e1f277a4f Fixed editing error in previous commit (*blush*). 2002-09-17 19:43:53 +00:00
bde
e6b86f5f97 Fixed unsorting of SRCS. 2002-09-17 14:33:23 +00:00
maxim
af06b6a609 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
4ccabc355a Bandaid to stop failing on non-i386 platforms.
Add a big ugly #warning as a reminder.
2002-09-17 06:22:51 +00:00
mini
43aca29e70 Use a weak symbol for signalcontext(). 2002-09-17 03:15:47 +00:00
mini
4dbf5221af Add signalcontext(), which adds a signal frame to a ucontext_t. 2002-09-17 03:11:07 +00:00
peter
a51c9b6627 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
fenner
06e2d46968 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
mini
94a57caeb2 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
mini
1fe838905f 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
ume
c18a6ce242 Allocate 64K recieve buffer for DNS responses. 2002-09-16 13:19:47 +00:00
tjr
155577bd7a Convert eight space indents to tabs in the "*" format handling code. 2002-09-16 12:07:13 +00:00
ume
9c29b64177 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
nectar
b44001f0c3 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
tjr
8569d04e14 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
tjr
b2a34e6f87 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
nectar
a0732e9360 Backout the increase of MAXPACKET from 1024 to 65536: it
broke pthreads.

Reported by:	mbr, tjr
2002-09-15 04:23:20 +00:00
tmm
c14b63a0b9 Use the macros from machine/fsr.h; some minor cleanups. 2002-09-14 18:07:03 +00:00
tmm
6bea77d590 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
ume
db96f2a540 Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.
Obtained from:	KAME
2002-09-14 17:28:40 +00:00
nectar
57c8809640 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
tmm
c568640675 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
tjr
4448ddb047 Correct type of second argument: it is wchar_t ** restrict,
not wchar_t * restrict.
2002-09-12 09:25:27 +00:00
archie
57de4fb945 Update to reflect reality.
Reviewed by:	mini
MFC after:	3 days
2002-09-11 21:40:02 +00:00
archie
b2c4f4ae74 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
tjr
5f5cd9d0b8 Add an implementation of wcsftime() (wide character version of strftime()). 2002-09-11 08:57:11 +00:00
mike
57d52b441f Add `restrict' type-qualifier. 2002-09-11 05:05:48 +00:00
archie
02e28a1d0c Adjust to reflect reality, which is that sigaltstack() takes stack_t *'s.
MFC after:	3 days
2002-09-10 21:06:51 +00:00
wollman
ab723a2a1b 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
tjr
7c848d9cfd Add wcstol() and wcstoul(), based on strtol() and strtoul(). 2002-09-08 13:27:26 +00:00
tjr
0e0fb98538 Replace a stray reference to strtok() with one to wcstok(). 2002-09-08 11:09:24 +00:00
wollman
d849ac7403 Fix a syntax error which causes an annoying warning. 2002-09-08 04:43:28 +00:00
tjr
9445b1b57c Add an implementation of wcstok(), based on strtok_r(). 2002-09-07 08:16:57 +00:00
jmallett
4cb9c36cfd Two arrays were born from the same seeds, both grew into complementary sets
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.
2002-09-07 08:14:19 +00:00
tjr
64f61942de Sync prototypes with <wchar.h> with respect to the restrict qualifier. 2002-09-07 04:07:00 +00:00
tjr
ad5ac67c75 Add restrict qualifiers where C99 permits them. All of these already had
restrict qualifiers on their prototypes in <wchar.h>.
2002-09-07 04:03:28 +00:00
tjr
91c2f6f1aa Call strtok_r() via a libc private name from within strtok(). 2002-09-07 02:53:19 +00:00
wollman
7c1e59f51d Include some verbage about not calling exit() from functions registered
by atexit().
2002-09-06 19:23:28 +00:00
tjr
cd5ca96599 Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
jake
c73a7dbd84 Install the userland signal trampoline when sigaction is first called,
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)
2002-09-03 14:55:29 +00:00
peter
2dc22e4926 Fix a nasty bug exposed by mktime() when time_t is significantly bigger
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.
2002-09-03 04:34:10 +00:00
tjr
573a3e8e5e Set errno to EILSEQ when invalid multibyte sequences are detected
(XSI extension to 1003.1-2001).
2002-09-03 01:09:47 +00:00
jake
1359c1017e Use FOO(a) for macros with variadic args, instead of FOO(a,) or FOO(a, ).
Submitted by:	gcc3.2
2002-09-02 02:30:20 +00:00
robert
27ec88afb5 - Let their manual pages show the reader that the bzero(3) and
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.
2002-09-01 21:53:46 +00:00
tjr
3c7d05d837 Typo: refer to MB_LEN_MAX instead of MB_CHAR_MAX (which does not exist). 2002-09-01 07:21:58 +00:00
tjr
2e5584e864 Add restrict qualifiers to the arguments of mbstowcs, mbtowc() and
wcstombs().
2002-09-01 07:08:22 +00:00
mike
02b206400e Fix a memory leak. 2002-09-01 01:49:27 +00:00