Commit Graph

4890 Commits

Author SHA1 Message Date
ume
b8a79c699c hostalias() is not thread-safe. So, introduce _res_hostalias()
and use it.

Obtained from:	BIND9
2005-04-15 14:42:29 +00:00
ume
61d715cfa6 remove needless res_init() call.
Inspired by:	NetBSD
2005-04-14 11:44:43 +00:00
peter
3692814aa2 Attempt i386_set_gsbase() before using the user_ldt code. Unimplemented
sysarch() calls return EINVAL, not SIGSYS.. so we can trivially adapt.
2005-04-14 00:02:37 +00:00
peter
d07b2f1b2c Add stubs for the %fs/%gs base management calls. 2005-04-14 00:01:35 +00:00
alc
b2ebe16689 Add a machine-specific, optimized implementation of strcat.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 18:58:49 +00:00
alc
420be8df92 Eliminate a conditional branch and as a side-effect eliminate a branch to
a return instruction.  (The latter is discouraged by the Opteron
optimization manual because it disables branch prediction for the return
instruction.)

Reviewed by: bde
2005-04-10 18:12:07 +00:00
alc
417aec058f Add a machine-specific, optimized implementation of strcpy.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 05:11:06 +00:00
alc
654c522ae8 Add a machine-specific, optimized implementation of strcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-09 20:47:08 +00:00
ume
1b9c36cc46 unbreak build without YP defined.
Submitted by:	Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
2005-04-09 14:20:18 +00:00
stefanf
d1df2201c0 Remove unused variables and assignments. 2005-04-08 21:24:23 +00:00
stefanf
edc96e2497 Use prototypes in the function definitions. 2005-04-08 21:15:38 +00:00
stefanf
460f9ad102 Remove unused variable. 2005-04-08 20:58:47 +00:00
alc
1ab7d22f97 Add machine-specific, optimized implementations of bcmp and memcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-08 05:15:55 +00:00
alc
02ae1b51e3 Eliminate unneeded instructions that are a vestige of mechanical
translation from i386.
2005-04-08 05:10:18 +00:00
alc
90a823ed92 Eliminate an unneeded instruction that is a vestige of mechanical
translation from i386.
2005-04-07 05:46:46 +00:00
peter
cb1b05e7a8 Fix strict-alias warnings by removing excessive (and wrong) casts. 2005-04-07 04:33:15 +00:00
alc
cbb9f3f415 Add machine-specific, optimized implementations of bcopy, bzero, memcpy,
memmove, and memset.

PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-07 03:56:03 +00:00
ume
aa9bf872c4 - we are no longer shareing any resources to be locked between
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
2005-04-06 15:36:34 +00:00
ume
26cc55077b MUTEX_INITIALIZER should be used instead of
PTHREAD_MUTEX_INITIALIZER, here.
2005-04-06 15:16:04 +00:00
ume
38e722e1a8 separate gai_strerror(3) from getaddrinfo.c.
Requested by:	phantom
2005-04-06 12:45:51 +00:00
ume
b0c9c2a388 make yp stuff re-entrant.
Obtained from:	NetBSD
2005-04-05 18:25:23 +00:00
ume
ac4b9096b3 protect _yp_domain with mutex lock.
Inspired by:	NetBSD
2005-04-05 18:07:59 +00:00
ume
b24803b06b add missing mutex unlock. 2005-04-05 17:13:28 +00:00
ume
cb0b5ed63a make _files_getaddrinfo() re-entrant.
Obtained from:	NetBSD
2005-04-04 19:45:27 +00:00
das
87aa297030 Replace the current strspn() and strcspn() with significantly faster
implementations inspired by the ones in DragonFly.  Unlike the
DragonFly versions, these have a small data cache footprint, and my
tests show that they're never slower than the old code except when the
charset or the span is 0 or 1 characters.  This implementation is
generally faster than DragonFly until either the charset or the span
gets in the ballpark of 32 to 64 characters.
2005-04-02 18:52:44 +00:00
das
1e73b68cbc Add some missing errnos from POSIX. Nothing in FreeBSD generates
these at the moment, but applications that test for them will now
have a better chance of compiling.

I have intentionally omitted errnos that are only good for STREAMS,
since apps that use STREAMS won't compile anyway.  The exception is
EPROTO, which was apparently intended for STREAMS, but worth having
anyway because Linux (mis)uses it for other things.
2005-04-02 12:33:28 +00:00
ume
420c834c87 nuke the logic for AF_UNSPEC and simplify. once, it was introduced
to improve getaddrinfo(3).  but, it is not needed for a long time
since getaddrinfo(3) became providing its own res_*N() functions.
2005-04-02 08:18:33 +00:00
davidxu
014dff15cf Use __weak_reference macro to define weak symbols. 2005-03-21 13:17:16 +00:00
das
79d24f2484 Teach fmtcheck() about the ' (thousands separator) flag. 2005-03-21 08:00:55 +00:00
simon
1ffec0c271 Add byteorder(9) to SEE ALSO.
MFC after:	3 days
2005-03-20 17:27:57 +00:00
cognet
60d20350ea Use the correct values for softfloat, in both the little endian and the big
endian cases.
2005-03-20 00:53:52 +00:00
das
a84bfd6e04 Remove fpsetsticky(). This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors.  In particular, given argument M:

- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
  and *sets* the new flag word to M.  (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
  and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.

There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break.  I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.

By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it.  This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated.  ;-)

Note that fpresetsticky() has been retained on FreeBSD/i386.  As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.

PR:		75862
Suggested by:	bde
2005-03-15 15:53:39 +00:00
stefanf
8655a91f58 Use socklen_t where appropriate. 2005-03-11 14:17:12 +00:00
stefanf
64a1df7d12 Avoid pointer arithmetics on void *.
Approved by:	alfred
2005-03-10 08:25:49 +00:00
stefanf
c463ca74d4 Remove an superfluous assignment.
Approved by:	alfred
2005-03-10 00:58:21 +00:00
stefanf
624654db85 Use socklen_t where appropriate.
Approved by:	alfred
2005-03-10 00:57:01 +00:00
alfred
93318a5e79 Make MSG_NOSIGNAL available to native programs.
Bump FreeBSD_version to note this change.

Reviewed by: sobomax
2005-03-09 00:17:33 +00:00
phk
25e912bfe0 Have ttyname_r() try to ask DEVFS for the device name.
Document ttyname_r().

Simplify threaded/unthreaded stuff a lot.
2005-03-08 21:35:52 +00:00
phk
abe23c2538 Make the returnvalue of times(3) insensitive to changes in wall-clock.
PR:	78537
2005-03-08 08:12:35 +00:00
phantom
732dfa42c4 Add korean NLS message catalogs for libc
Submitted by:	Hye-Shik Chang <perky@FreeBSD.org>
PR:		misc/78290
2005-03-07 13:57:24 +00:00
das
3e55f968bf Add manpage links for frexpf, frexpl, ldexpf, and ldexpl. 2005-03-07 05:01:04 +00:00
das
c4f78b88c6 Document frexpl and ldexpl. 2005-03-07 05:00:54 +00:00
das
4d2ad621bf - Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double.  For architectures that don't have such a bit,
  LDBL_NBIT is 0.  This makes it possible to say `mantissa & ~LDBL_NBIT'
  in places that previously used an #ifdef to select the right expression.
  The optimizer should dispense with the extra arithmetic when LDBL_NBIT
  is 0 anyway.
- Add an XXX comment for the big endian case.
2005-03-07 04:55:40 +00:00
das
5bfaaf0464 Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double.  For architectures that don't have such a bit,
LDBL_NBIT is 0.  This makes it possible to say `mantissa & ~LDBL_NBIT'
in places that previously used an #ifdef to select the right expression.
The optimizer should dispense with the extra arithmetic when LDBL_NBIT
is 0.
2005-03-07 04:55:22 +00:00
mux
91ab1502ac Unbreak strsignal(). This is an MFC candidate.
Reported by:	Sean McNeil <sean@mcneil.com>
2005-03-06 03:19:19 +00:00
green
ba2e403b7b Do not require the pty(4) majors to be anything in particular. 2005-03-04 20:23:32 +00:00
davidxu
d861d0ef47 Fix incorrect comment. 2005-03-01 23:42:00 +00:00
pjd
a0d09932cc Add polish version of libc NLS catalog. 2005-03-01 14:38:30 +00:00
phantom
92f927766a Backout NLS catalog handling, until all edge cases are resolved 2005-02-27 22:17:47 +00:00
phantom
0420842c6b Unbreak !NLS case 2005-02-27 21:17:22 +00:00