Commit Graph

5029 Commits

Author SHA1 Message Date
Alexey Zelkin
c2e31119ea Add russian version of libc NLS catalog
Translated by:	Valeriy Kravchuk <openxs@ipnet.kiev.ua>
		Alexey Dokuchaev <danfe@nsu.ru>
2005-02-27 18:09:09 +00:00
Alexey Zelkin
c51d47437b Add template NLS catalog for strerror(), strerror_r() and strsignal()
localization support
2005-02-27 17:59:39 +00:00
Xin LI
2dcb9ce484 Remove the check about whether MALLOC_EXTRA_SANITY is defined,
surrounding the undef'ing it.  It does not seem necessary to
undef some symbol that is not exist, and gcc does not complain
about whether a symbol is exist before #undef'ing it out.

Spotted by:	mingyanguo via ChinaUnix.net forum
Reviewed by:	phk
2005-02-27 17:16:16 +00:00
Alexey Zelkin
fba5c5fa09 Add NLS catalogs support to strerror(), strerror_r() and strsignal().
Controlled by NLS define, currently disabled by default.

Idea obtained from:	NetBSD
2005-02-27 16:58:28 +00:00
Alexey Zelkin
efefbdc6d6 . Bump .Dd's
. Note POSIX 1003.1-2001 conformation
. Add ERRORS section for catgets(3)
. Note what catopen(3) returns EINVAL, if catalog is corrupt
2005-02-27 16:30:16 +00:00
Alexey Zelkin
fd5cf7c013 Bring in NetBSD's improvements and cleanups to NLS subsystem, making
it type and endian clean and removing of stdio dependency from NLS
functions (catalog files now are processed via mmap())

Also following changes were done (against NetBSD version):

. If mmap() failed, set errno to EINVAL and do not try to munmap() file

Obtained from:	NetBSD
2005-02-27 16:26:49 +00:00
Alexey Zelkin
e94c6cb4a2 . Static'ize functions exported via function reference variables only.
. Replace inclusion of sys/param.h to sys/cdefs.h and sys/types.h where
  appropriate.
. move _*_init() prototypes to mblocal.h, and remove these prototypes
  from .c files
. use _none_init() in __setrunelocale() instead of duplicating code
. move __mb* variables from table.c to none.c allowing us to not to
  export _none_*() externs, and appropriately remove them from mblocal.h

Ok'ed by:	tjr
2005-02-27 15:11:09 +00:00
Alexey Zelkin
f9b5e461bb ANSI'fy prototypes 2005-02-27 14:54:23 +00:00
Alexey Zelkin
75667314a9 Replace usage of strerror()/strcpy() with strerror_r() here, reducing
number of required operations to get error message and avoiding of strerror's
buffer clobbering.

Also ANSI'fy prototypes while I'm here
2005-02-27 14:51:27 +00:00
Ruslan Ermilov
3fb3a43079 Make the format of LC_CTYPE files architecture independent by
introducing the disk formats for _RuneLocale and friends.

The disk formats do not have (useless) pointers and have 32-bit
quantities instead of rune_t and long.  (htonl(3) only works
with 32-bit quantities, so there's no loss).

Bootstrap mklocale(1) when necessary.  (Bootstrapping from 4.x
would be trivial (verified), but we no longer provide pre-5.3
source upgrades and this is the first commit to actually break
it.)
2005-02-26 21:47:54 +00:00
David Xu
17ceb495f0 Mark _rtld_allocate_tls and _rtld_free_tls as weak symbols for Variant I
tls.

Reviewed by: dfr
2005-02-26 10:39:49 +00:00
Tom Rhodes
61001d7506 Fix a few markup nits in previous commit.
Noticed by:	ru, who else? :)
2005-02-25 00:40:46 +00:00
Tom Rhodes
0fa17d320d Do not mislead users into checking for a mount_ufs or mount_ufs2 manual
page.  They do not exist.

PR:		53303
Submitted by:	Marc Silver <marcs@draenor.org> (original version)
2005-02-24 00:32:58 +00:00
Christian S.J. Peron
e80750df02 -document the fact that extattr_get_* can fail if the requested
attribute does not exist on the file.
-bump document date

Reviewed by:	rwatson,trhodes
MFC after:	1 week
2005-02-24 00:04:45 +00:00
Tom Rhodes
87dbe6bb4b Xref chflags(2).
Note that unlink.2 can return EPERM if the immutable or append-only flags are set.

PR:		77043
2005-02-23 23:55:58 +00:00
Tom Rhodes
0e5d513b50 Add an EXAMPLES section[1], quote Nd, and bump doc date.
PR:		53621 [1]
Submitted by:	Faried Nawaz <fn@hungry.com> [1]
2005-02-23 02:02:38 +00:00
Max Khon
f1defde9d5 Fix EOVERFLOW detection in vswprintf(3)
Reviewed by:	tjr
MFC after:	2 weeks
2005-02-21 19:41:44 +00:00
Ruslan Ermilov
423ac68026 Expand contractions. 2005-02-15 09:27:00 +00:00
Stefan Farfeleder
10248e3a93 - Use socklen_t.
- No need for two instances of 'num'.
2005-02-14 17:51:45 +00:00
Stefan Farfeleder
78e3eed071 Fix most cases where the address of an int is passed to a function expecting a
socklen_t * argument.
2005-02-14 17:42:58 +00:00
Alexey Zelkin
ed61386604 . Convert return type of gai_strerror() to 'const char *' as POSIX requires.
. Convert ai_errlist[] to simple 'char *' array, and appropriately
  optimize gai_strerror()
2005-02-14 11:33:12 +00:00
Alexey Zelkin
03c51c7e90 EAI_ADDRFAMILY and EAI_NODATA are obsoleted, and not definined anymore,
so do not export these definitions via manual page
2005-02-14 11:24:58 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Stefan Farfeleder
610b5a1fb1 Fix comparisons that test if an unsigned value is < 0.
Reviewed by:	tjr
2005-02-12 08:45:12 +00:00
Pawel Jakub Dawidek
029f08c23c Don't read more than the given 'len' bytes from the 'big' string.
PR:		misc/77369
Submitted by:	Ed Maste <emaste@phaedrus.sandvine.ca>
MFC after:	1 week
2005-02-11 21:07:51 +00:00
Colin Percival
75fa96cc9b read(), pread(), write(), and pwrite() return EINVAL if they are asked
for more than INT_MAX bytes.
2005-02-10 20:09:01 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
David Schultz
f154b03b25 Update my email address. 2005-02-06 03:23:31 +00:00
Alexey Zelkin
f24d446afb Cleanup prototypes and remove dead code
MFC After:      3 days
2005-02-01 16:04:55 +00:00
Hajimu UMEMOTO
8743b270c9 use strdup().
Obtained from:	KAME
MFC after:	1 week
2005-01-28 19:35:42 +00:00
Hajimu UMEMOTO
a2a24ec881 make _getipnodebyname_multi() static. 2005-01-27 15:01:05 +00:00
Hajimu UMEMOTO
c224435ed9 implement AI_NUMERICSERV (as defined in RFC3493).
Obtained from:	KAME
MFC after:	1 week
2005-01-27 14:45:11 +00:00
Hajimu UMEMOTO
8755b918a1 fill ai_canonname field for numeric hostname, by the given hostname.
follow new recommendation in RFC3493.

Obtained from:	KAME
MFC after:	1 week
2005-01-27 14:41:56 +00:00
Hajimu UMEMOTO
d0d6a2c7cc query A RR before AAAA RR.
MFC after:	1 week
2005-01-27 08:03:46 +00:00
David Schultz
29bf6af890 - Move the functions presently described in in ieee(3) to their own
manpages.  They are not very related, so separating them makes it
  easier to add meaningful cross-references and extend some of the
  descriptions.
- Move the part of math(3) that discusses IEEE 754 to the ieee(3)
  manpage.
2005-01-27 05:46:17 +00:00
David Schultz
2380daafe9 Don't compile the gdtoa package's strtoIg.c into libc.
I never got around to making use of it.
2005-01-27 05:44:16 +00:00
Giorgos Keramidas
7a46d27566 EISCONN may be returned by sendto() if an attempt is made to specify the
destination address to a datagram socket that is already connected.

Submitted by:	Rudolf Cejka <cejkar@fit.vutbr.cz>
PR:		docs/76399
MFC after:	1 week
2005-01-24 20:41:44 +00:00
Ruslan Ermilov
f000229472 Markup and grammar fixes. 2005-01-24 18:14:18 +00:00
George V. Neville-Neil
f579625397 Update man pages to be in line with guidelines for IPv6 in FreeBSD.
FreeBSD currently implements the most up to date IPv6 APIs for
option and route header parsing.   This checkin marks the older APIs
as deprecated and points the reader to the newer pages.

Reviewed by: Jun-ichiro Itojun
Approved by: rwatson (mentor)
2005-01-24 11:23:14 +00:00
George V. Neville-Neil
b986ced475 Fix a dangling MKLINK from my last commit.
Approved by:	rwatson (mentor)
2005-01-24 01:40:16 +00:00
David Schultz
e33621db7f - Document ldexpf().
- Although ldexp() is in libc for backwards compatibility, ldexpf() is
  in its proper place in libm.  Document both as being in libm.
- The ldexp() and ldexpf() functions conform to C99.
2005-01-23 16:49:49 +00:00
David Schultz
6f1dd8edc0 - Document frexpf().
- Neither frexp() nor frexpf() set errno.
- Although frexp() is in libc for backwards compatibility, frexpf() is
  in its proper place in libm.  Document both as being in libm.
- The frexp() and frexpf() functions conform to C99.
2005-01-23 16:49:40 +00:00
George V. Neville-Neil
6617cf5778 Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Reviewed by: Kame Project (including Itojun-san, Jinmei-san and Suzuki-san)
Approved by: Robert Watson (robert at freebsd dot org)
Obtained from:	Kame Project and OpenBSD

Replace manual pages that may have violated the IETF's Copyright.

All come from the Kame tree.

Several were from OpenBSD except for ip6.4, and the inet6* pages which were
rewritten by me.

All of the text is new and drawn from reading the code and
documentation.
2005-01-23 16:02:48 +00:00
George V. Neville-Neil
b8a3e40819 Submitted by: George V. Neville-Neil (gnn at freebsd dot org)
Approved by: Robert Watson (robert at freebsd dot org)

Remove files in preparation for replacement with totally new versions
of the manual pages.

Update the Makefile to handle the new file to be added.
2005-01-23 15:41:10 +00:00
Robert Watson
5be3971166 Minor white space tweak.
MFC after:	3 days
2005-01-23 15:28:02 +00:00
Andrey A. Chernov
d308373710 Especially mention that setting errno to EINVAL in "no conversion" case
is not portable.

Asked by:       joerg
2005-01-22 18:02:58 +00:00
David Schultz
00646ca204 Replace the ldexp() implementation in libc with a renamed copy of the
scalbn() implementation from libm.  (The two functions are defined to
be identical, but ldexp() lives in libc for backwards compatibility.)
The old ldexp() implementation...
  - was more complicated than this one
  - set errno instead of raising FP exceptions
  - got some corner cases wrong
    (e.g. ldexp(1.0, 2000) in round-to-zero mode)

The new implementation lives in libc/gen instead of
libc/$MACHINE_ARCH/gen, since we don't need N copies of a
machine-independent file.  The amd64 and i386 platforms
retain their fast and correct MD implementations and
override this one.
2005-01-22 06:03:40 +00:00
Ruslan Ermilov
ead5223f54 Fixed punctuation in xrefs. 2005-01-21 20:48:00 +00:00
Andrey A. Chernov
db0e25eeb9 Whitespace/style tweaking of prev. commit.
Noted by:       bde
2005-01-21 13:31:02 +00:00
Andrey A. Chernov
2571c7f720 POSIX says that 0[xX] prefix is _optional_ even in base 16 case, make it
really so.

"If the value of base is 16, the characters 0x or 0X may optionally
precede the sequence of letters and digits, following the sign if
present."

Found by:       joerg
2005-01-21 00:42:13 +00:00
Ruslan Ermilov
24a0682c64 Sort sections. 2005-01-20 09:17:07 +00:00
David Schultz
9fd7a48db0 Cut out the gordian handling of subnormals by bit fiddling, and
instead use the FPU to convert subnormals to normals.  (NB: Further
simplification is possible, such as using the FPU for the rounding
step.)

This fixes a bug reported by stefanf where long double subnormals in
the Intel 80-bit format would be output with one fewer digit than
necessary when the default precision was used.
2005-01-18 18:44:07 +00:00
David Schultz
929ab920ae Correct the values of FLT_ROUNDS for the FE_UPWARD and FE_DOWNWARD cases. 2005-01-18 15:29:28 +00:00
Ruslan Ermilov
6a5796e734 Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
Ruslan Ermilov
f4bff75eb3 Fixed markup bug. 2005-01-15 12:21:03 +00:00
Ruslan Ermilov
3382f529ff Markup: convert a display to a list. 2005-01-15 11:40:33 +00:00
Ruslan Ermilov
e8fbc77632 Markup style. 2005-01-15 11:22:13 +00:00
David Schultz
851e420fba Add a file missed in the previous commit:
Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
  The purpose of having a separate file involved an abandoned scheme that
  would have kept contrib/gdtoa out of the include path for the rest of libc.
2005-01-15 05:26:32 +00:00
David Schultz
bd15659f64 Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
The purpose of having a separate file involved an abandoned scheme that
would have kept contrib/gdtoa out of the include path for the rest of libc.
2005-01-15 05:23:58 +00:00
Ruslan Ermilov
629a7369d7 Markup fixes. 2005-01-14 21:07:56 +00:00
Jonathan Chen
6920b9cc54 remember to reset nextgrp in getnetgrent(), so that subsequent calls to getnetgrent() doesn't return bogus information.
MFC after:	3 days
2005-01-13 18:33:01 +00:00
Brian Somers
41843e7135 Fix some signed/unsigned comparisons. Fix prototypes while I'm here.
PR:		28890
Submitted by:	matthias.andree at web dot de
MFC after:	7 days
2005-01-12 03:39:34 +00:00
Ruslan Ermilov
2d82ac3110 Scheduled mdoc(7) sweep. 2005-01-11 20:50:51 +00:00
Tim J. Robbins
17ebe40096 Implement rpmatch(), a semi-standard interface (as found on AIX, Tru64,
GNU) for determining whether a string is an affirmative or negative
response to a question according to the current locale. This is done
by matching the response against nl_langinfo(3) items YESEXPR and NOEXPR.
2005-01-09 03:55:13 +00:00
Giorgos Keramidas
5abd925f0c The `timep' argument of utime() is not an array of structs.
Make sure we don't confuse the reader by claiming it is.

PR:		docs/75615
Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
2005-01-07 14:38:29 +00:00
Pawel Jakub Dawidek
a73e1eeda5 Update manual page after adding 'fts_bignum' field.
Submitted by:	Peter Jeremy <PeterJeremy@optushome.com.au>
MFC after:	5 days
2005-01-07 07:03:19 +00:00
Pawel Jakub Dawidek
28644c1bbb Introduce new field 'fts_bignum' which is 64bit long and will allow to
make utilities like du(1) 64bit-clean.
When this field is used, one cannot use 'fts_number' and 'fts_pointer'
fields.

This commit doesn't break API nor ABI.

This work is part of the BigDisk project:

	http://www.FreeBSD.org/projects/bigdisk/

Discussed on:	arch@
MFC after:	5 days
2005-01-07 00:06:20 +00:00
Maxim Sobolev
7b6cc40479 Don't ignore the last line of config file (/etc/hosts, /etc/services, etc)
which doesn't end in \n, since it may be very confusing. Also this should
increase consistency, since most other config files work just fine regardless
of the presence of traling \n in the last line.

MFC After:	2 weeks
2005-01-03 11:07:45 +00:00
Marcel Moolenaar
1d1b40fed8 Constify arguments. 2005-01-03 02:56:15 +00:00
Gleb Smirnoff
9657520621 Make syslog(3) thread safe.
PR:		bin/72394
Submitted by:	Dan Nelson
Reviewed by:	deischen
MFC after:	2 weeks
2004-12-30 16:05:11 +00:00
Diomidis Spinellis
c7ce9e21f8 Plug memory leak.
PR:		bin/75656
MFC after:	2 weeks
2004-12-30 14:27:57 +00:00
Kirill Ponomarev
d8c9fa8327 Add LOG_NTP facility.
Submitted by:	Kurt Jaeger <pi at complx dot LF dot net>
Approved by:	ru
MFC after:	3 days
2004-12-30 13:09:34 +00:00
Tom Rhodes
a51d79c1d3 Catch up with stat.h a bit:
o Sticky bit is actually defined as S_ISTXT not S_ISVTX.
o Sticky bit is wrapped in if __BSD_VISIBLE not _POSIX_SOURCE.
2004-12-29 20:00:29 +00:00
Giorgos Keramidas
678a5ffdd8 Mark up SIGSTOP with .Dv and use .Nm in HISTORY for marking up `signal'.
PR:		docs/75615
Submitted by:	n-kogane@syd.odn.ne.jp
2004-12-29 19:40:56 +00:00
Tom Rhodes
8f79184fe2 Various markup and spelling fixes.
PR:		75574
Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> (original version)
2004-12-29 02:18:24 +00:00
Gleb Smirnoff
8ba85e7741 Restore standard behavior: log to console only when normal logging
failed, not always.

PR:		bin/75356
Submitted by:	Mark Knight <markk knigma org>
Pointy hat to:	glebius
MFC after:	3 days
2004-12-24 09:48:44 +00:00
Giorgos Keramidas
f56be64fb2 ``NULL is a specific instance of a null pointer constant; the generic is
a "null pointer".''

Making good use of the excellent explanations sent to me by Ruslan
Ermilov, Garrett Wollman and Bruce Evans, correct the descriptions of
null pointers.  They are just "null pointers", not nil, not NULL or
".Dv NULL".

Suggested by:	ru, wollman, bde
Reviewed by:	ru, wollman
Pointy hat:	keramida
2004-12-23 23:45:25 +00:00
Joseph Koshy
6e6bc3ed0d Better rendering of the prototype for signal(3).
Suggested by:	ru
2004-12-23 02:48:20 +00:00
Giorgos Keramidas
9168f08258 Punctuation marks should be separate arguments in groff macros.
Noticed by:	ru
2004-12-22 16:20:12 +00:00
Giorgos Keramidas
411d727cf8 Use .Dv NULL when referring to NULL C pointers, instead of "nil". 2004-12-22 16:15:52 +00:00
Giorgos Keramidas
563058ccff Cross reference init(8) too, instead of vaguely referring to the
"initialization process".
2004-12-22 15:44:21 +00:00
Maxim Konovalov
63173f5f56 o The macro versions of sigemptyset(3), sigfillset(3), sigaddset(3),
sigdelset(3) and sigismember(3) were killed about five years ago.

o The functions (specifically sigismember(3)) could return -1 and
set errno.

PR:		bin/75156
Obtained from:	NetBSD
MFC after:	2 weeks

o Bump the date of the document.
2004-12-16 20:27:55 +00:00
Tom Rhodes
cf8f149faf Date business, update. 2004-12-10 15:27:06 +00:00
Tom Rhodes
2f5cde3c64 According to the information on:
http://www.opengroup.org/onlinepubs/009695399/functions/swab.html
the prototype for swab() should be in <unistd.h> and not in <string.h>.
Move it, and update to match SUS.  Leave the prototype in string.h for
now, for backwards compat.

PR:		74751
Submitted by:	Craig Rodrigues <rodrigc@crodrigues.org>
Discussed with:	das
2004-12-10 15:24:40 +00:00
Olivier Houchard
6f831b072a Oooops I forgot to commit that.
Use fp_rnd_t, not fp_rnd.

Reported by:	Jia-Shiun Li (jiashiun at gmail dot com)
2004-12-08 18:41:42 +00:00
Daniel Eischen
6c68cb596e Make sure the first argument to the user function is 16-byte aligned.
Submitted by:	tegge
2004-12-05 21:22:08 +00:00
Ralf S. Engelschall
b4c6be3254 Fix description: the argument to setcontext(3) must have been previously
initialized "by a call to getcontext(3) or makecontext(3)" and not "by a
call to setcontext(3) or makecontext(3)".

MFC after:	3 days
2004-12-03 14:10:04 +00:00
Ruslan Ermilov
e354922c78 MNT_NODEV is deprecated. 2004-11-29 09:56:12 +00:00
Peter Edwards
2909df6916 When required to negate the absoulte result of a division/remainder
operation (by subtracting the absolute result from 0), don't test
for overflow.

This avoids an arithmetic exception when dividing LONG_MIN by 1:
This is the only case that causes overflow, and the resulting value
is correct under 2's compliment arithmetic.

PR:		72024
Approved by:	dwmalone@
Obtained from:	NetBSD
MFC after:	4 days
2004-11-27 20:59:49 +00:00
Tim J. Robbins
bd9643b135 Fix computation of the 'n' argument to mbrtowc (through XMBRTOWC) to avoid
reading past 'stop' in various places when converting multibyte characters.
Reading too far caused truncation to not be detected when it should have
been, eventually causing regexec() to loop infinitely in with certain
combinations of patterns and strings in multibyte locales.

PR:		74020
MFC after:	4 weeks
2004-11-21 03:14:32 +00:00
Mark Santcroos
15579150a4 Remove ntp_gettime.c which was a wrapper around sysctlbyname(3).
This is now a native system call.

Reviewed by:	imp, phk, njl, peter
Approved by:	njl
2004-11-18 23:59:19 +00:00
Christian S.J. Peron
ca8d7823c6 -Add a note that currently two syntax styles for label element declaration
is supported.
-Document the new more preferred syntax
-Add examples for the new syntax
-Add a note that the old syntax will be deprecated in the future.

Reviewed by:	rwatson
2004-11-18 15:24:47 +00:00
John Baldwin
d0565c1493 Remove 80386 support from libc. 2004-11-16 21:01:31 +00:00
Yaroslav Tykhiy
49ea9a58a7 Document more fields of struct stat.
Note to mdoc(7) police:
The document date has already been touched today.
2004-11-15 14:16:31 +00:00
Yaroslav Tykhiy
502f968bb9 Use .Vt "struct stat" consistently. 2004-11-15 13:58:52 +00:00
Yaroslav Tykhiy
93d7fd123e Nitpicking on grammar. 2004-11-15 13:55:33 +00:00
Yaroslav Tykhiy
fed4da2585 Improve mdoc(7) markup of the page: add several missing macros,
use .Va instead of .Li for struct stat fields.
2004-11-15 13:45:13 +00:00
Yaroslav Tykhiy
b337489271 Document the S_IS*(mode) macros used to test for file types.
Bump the document date accordingly.
2004-11-15 13:37:56 +00:00
Bjoern A. Zeeb
6c58990d47 Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by:	Danny Braniss <danny at cs.huji.ac.il>
PR:		bin/68303
No objections:	des, gshapiro, nectar
Reviewed by:	ru
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-11-13 20:40:32 +00:00
Warner Losh
dfcc91e219 sranddev() is not magic pixie dust. While it gives a good random
seed, the random number generator rand(3) still sucks and is unlikely
sufficient for crypto use.  Correct what appears to be a cut and paste
error from the srandomdev() man page.

Submitted by: Ben Mesander
2004-11-10 17:25:49 +00:00
Olivier Houchard
31489a9a26 Use the RET macro.
For setjmp() and longjmp(), put the signal mask where it's supposed to be,
instead of in the space reserved for fp regs.
2004-11-09 16:49:14 +00:00
Olivier Houchard
904e5ace47 Add a week alias __siglongjmp => siglongjmp. 2004-11-09 16:44:57 +00:00
Olivier Houchard
c67f8f49be MFKernel: Implement ffs with clz on Xscale. 2004-11-07 16:54:54 +00:00
Peter Wemm
5bc7bd5ff2 When building the custom i386 libraries for use on amd64 kernels, we
can't use the i386_set_ldt() family of routines, because they are not
implemented.  Instead, use the recently exposed direct access sysarch
routines for setting what %fs and %gs point to.

Use this for the i386 TLS _set_tp() routine, but only when compiling to
run as a 32 bit support binary for amd64 kernels.
2004-11-06 03:28:26 +00:00
Olivier Houchard
5911b52027 Don't define SOFTFLOAT directly in source files, it's now done in the Makefile. 2004-11-05 23:53:54 +00:00
Olivier Houchard
60497154c8 Fix signalcontext and makecontext. 2004-11-05 23:53:02 +00:00
Olivier Houchard
7a06812fe5 Remove getcontext.S, it is not needed. 2004-11-05 23:52:05 +00:00
Olivier Houchard
30f70b49e0 Import a Makefile for arm. 2004-11-05 23:51:24 +00:00
Gleb Smirnoff
240d5a9b1c Protect against local flooder of /var/run/log. Do not loop forever in
syslog(3) if we are a priveleged program (sshd, su, etc.).

- Make syslogd open an additional socket /var/run/logpriv, with 0600
  permissions.
- In libc, try to use this socket.
- Do not loop forever if we are using this socket (partial backout of 1.31)

Reviewed by:	dwmalone, Andrea Campi <andrea webcom it>
Approved by:	julian (mentor)
MFC after:	1 month
2004-11-04 23:09:57 +00:00
Xin LI
d9506686f3 Add glibc-style strftime(3) padding specifiers, namely, -(no padding),
_(use space as padding), and 0(zero padding).

These GNU extensions are widely used ones that is worthy for us to
have.

Discussed with:	stefanf, roam, -current
Approved by:	murray
Prodded by:	ports/72722, ports/72723
MFC After:	1 month
2004-11-04 08:34:57 +00:00
Peter Wemm
66e1a311f5 Fix brk(3). The stack was unbalanced when we jumped to cerror. Oops!
This causes nasty things like SEGV or a cpu spin when we return.

Submitted by: "James R. Van Artsalen" <james@jrv.org>
2004-10-27 17:11:43 +00:00
Ceri Davies
47c01d89b4 Add necessary whitespace to correct cross references.
PR:		docs/73193
Submitted by:	Jilles Tjoelker <jilles at stack.nl>
2004-10-27 11:26:51 +00:00
Yaroslav Tykhiy
a39fd5061b Reword the last change a bit, add mdoc(7) markup.
Discussed with:	bde
2004-10-25 13:35:03 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
David E. O'Brien
62f696fcfa Sync with sys/i386/include/endian.h: use the single instruction 'bswap'. 2004-10-18 17:19:36 +00:00
Yaroslav Tykhiy
017aaf79e1 Since sendfile(2) works on regular files only,
which have no negative offsets, "negative" and
"invalid" are equivalent WRT the offset argument.

Suggested by:	bde
2004-10-18 10:02:04 +00:00
Andrey A. Chernov
27ecbe8a77 Remove setrunelocale() 2004-10-18 02:06:18 +00:00
Alfred Perlstein
af2e24d782 Document EMSGSIZE return from recvmsg due to insufficient free files
when transfering rights (file descriptors.)
2004-10-17 07:13:34 +00:00
Tim J. Robbins
31d330fb2a Remove the obsolete <rune.h> interface. 2004-10-17 06:51:50 +00:00
Tim J. Robbins
79a3948997 Remove support for the obsolete UTF2 encoding. 2004-10-17 02:29:15 +00:00
Tim J. Robbins
6bc2b4b7db Bump the libc major version number to 6. 2004-10-17 01:52:48 +00:00
Stefan Farfeleder
df103a1515 Document that the length modifier l is ignored for floating point
conversion specifiers (a, A, e, E, f, F, g and G).
2004-10-16 16:00:01 +00:00
Yaroslav Tykhiy
9a0cabd9e4 Explain it is a negative offset that EINVAL may indicate.
Now readers won't get an impression that pointing to beyond
the current end of file will result in EINVAL.

MFC after:	1 week
2004-10-16 09:53:35 +00:00
Yaroslav Tykhiy
6def5837f5 Improve mdoc(7) markup. 2004-10-16 09:46:38 +00:00
Yaroslav Tykhiy
fc5cfaae79 Give details on what will happen if the `offset' argument
to sendfile(2) falls beyond the end of file.

Touch .Dd.

PR:		bin/72649 (in the audit trail)
MFC after:	1 week
2004-10-16 09:39:25 +00:00
David E. O'Brien
a9bdcd3711 Enable building with LIBC_SCCS defined.
Bug submitted by:	Andrea Campi <andrea+freebsd_current@webcom.it>
2004-10-16 06:32:43 +00:00
David E. O'Brien
a986ef5788 Try to bring some sanity to the SCM ID's.
+ spell LIBC_SCCS consistently
+ enable builds with LIBC_SCCS defined to not syntax error
+ minor SCM reformatting to try to have some consistency
2004-10-16 06:11:35 +00:00
Stefan Farfeleder
d749cd6f7c Remove extra closing parenthesis added in revision 1.4.
Noticed by:	Andrea Campi
2004-10-14 21:31:42 +00:00
Giorgos Keramidas
4bf94cc1f7 Correctly document the return value of strerror() and strerror_r() and
the contents of the returned buffer for unknown error codes.

PR:		docs/72578
Submitted by:	Jilles Tjoelker <jilles@stack.nl>
MFC after:	3 days
2004-10-12 14:52:52 +00:00
Maxim Konovalov
e2494b93fc o Backout rev. 1.16, see 1.3 commit log for more info.
Requested by:	bde

o Remove unneeded sys/types.h and netinet/in.h from the synopsis and
the example.
o We do have struct in_addr in arpa/inet.h, so no need for netinet/in.h.
o Mention where AF_* constants defined are.

Educated by:	bde
2004-10-09 17:13:58 +00:00
Gleb Smirnoff
2e89951b6f When send()ing to syslogd return ENOBUFS keep trying until success.
This fixes a case, when DoSed syslogd completely loses messages.

PR:		bin/72366
Discussed with:	dwmalone, millert@OpenBSD.org
Approved by:	julian (mentor)
Obtained from:	OpenBSD (rev. 1.17, 1.21 by millert)
MFC after:	3 months
2004-10-08 21:15:21 +00:00
Julian Elischer
599e7243d3 Make less wrong for desciptions of signal handling
MFC in: 1 week
2004-10-08 20:40:30 +00:00
Joseph Koshy
6febaa3aff Mutually cross-reference sysexits(3) and err(3). Add text to err(3)
recommending that the standard exit codes in sysexits(3) be used.

Reviewed by:    ru
2004-10-04 14:04:37 +00:00
Stefan Farfeleder
4c86f66f52 Don't add integers to void pointers. 2004-10-03 15:48:32 +00:00
Stefan Farfeleder
4e8c80e977 Directly include <runetype.h> for _CurrentRuneLocale, <_ctype.h> doesn't
include it in all cases.
2004-10-03 15:42:59 +00:00
Maxim Konovalov
796a03f172 Reflect the fact addr2ascii(3) and ascii2addr(3) need sys/socket.h
for AF_* constants.

Submitted by:	Matthew George
MFC after:	2 weeks
2004-09-29 17:54:30 +00:00
David Schultz
48c8620ae4 Remove __isnanl() to avoid conflicting with the same function in libm.
__isnan() and __isnanf() must remain in libc for hysterical raisins.
On the other hand, __isnanl() must live in libm because libm uses it
internally and can't depend on older versions of libc to provide it.
Fortunately, we don't need __isnanl() in both libraries.

Prodded by:	ale
PR:		71698
MT5 candidate
2004-09-24 06:33:22 +00:00
Olivier Houchard
9e3a79d517 Arbitraly choose the Variant II for arm. 2004-09-23 23:14:09 +00:00
Olivier Houchard
3d90a3cd91 Make setjmp()/longjmp() use sigprocmask. 2004-09-23 23:13:46 +00:00
Olivier Houchard
05a07e2bda Add a dummy set_tp(). 2004-09-23 23:12:57 +00:00
Olivier Houchard
04823f257b Always use bx for returning on Xscale.
Obtained from:	NetBSD
2004-09-23 23:11:32 +00:00
Olivier Houchard
3e3aced335 Fix the align-to-32-bits code.
Obtained from:	NetBSD
2004-09-23 23:10:56 +00:00
Stefan Farfeleder
e60b9f5130 Prefer C99's __func__ over GCC's __FUNCTION__. 2004-09-22 16:56:49 +00:00
Jun Kuriyama
0c1691334a Fix a condition where the hole would be inserted in the wrong
place during a split.

Obtained from:	NetBSD
2004-09-13 22:07:24 +00:00
Jun Kuriyama
a5906b6cd2 I found "portsdb -u" dumps core with recent INDEX file, and this is
caused by refering broken (uninitialized?) pointer which is retrieved
from __bt_new() (and from mpool_new()).

I don't know why this linp[0] is read before stored because this
should be controlled by .lower and .upper member of PAGE structure
which are correctly initialized.

But this workaround fixes the problem on my environment and this
module has #ifdef PURIFY option which initializes new and reused
memory from mpool by memset(p, 0xff, size) like as I did.

Please feel free to fix the real bug instead of my workaround.
2004-09-10 14:45:00 +00:00
Jun Kuriyama
312f18518e Fix format strings to unbreak with -DDEBUG option. 2004-09-10 05:44:17 +00:00
Yaroslav Tykhiy
23b5c802b8 Use the recently introduced RES_DFLRETRY parameter instead of a well-hidden
constant for the default number of retries.
2004-09-09 17:42:18 +00:00
Tim J. Robbins
33176f1755 Fix two problems with REG_ICASE that were introduced with the addition of
multibyte character support:
- In CHadd(), avoid writing past the end of the character set bitmap when
  the opposite-case counterpart of wide characters with values less than
  NC have values greater than or equal to NC.
- In CHaddtype(), fix a braino that caused alphabetic characters to be
  added to all character classes! (but only with REG_ICASE)

PR:		71367
2004-09-05 08:30:42 +00:00
Marcel Moolenaar
ef0cd312df Unbreak memmove(). Return the dst argument. While here, fix the END
macro to actually reference memmove, not memcpy.
2004-09-04 00:23:15 +00:00
Marcel Moolenaar
4c36bcaa87 Unbreak memcpy(). memcpy() is defined to return the dst argument.
By using r8 instead of r14 to do the swap, we put the dst argument
in the return register. Since bcopy() doesn't clobber r8, we don't
have to do anything else. This fixes ports/textproc/aspell.
2004-09-04 00:04:58 +00:00
Peter Pentchev
2f67164732 Add a BUGS section and copy the wording from mmap(2)'s MAP_NOSYNC,
documenting the obsoleteness of the msync(2) syscall and its single
remaining purpose.

PR:		70916
Submitted by:	Radim Kolar <hsn@netmag.cz>
MFC after:	3 days
2004-09-03 06:24:25 +00:00
Tim J. Robbins
b37ff7a592 Septepber -> September
Noticed by:	ru
2004-09-01 23:28:27 +00:00
Tim J. Robbins
e6e1974ba5 Back out the previous change. glob() still does use strcmp() to order
pathnames.
2004-09-01 11:02:55 +00:00
Tim J. Robbins
1fd0f50a3a Add cross-reference to ftw(3). 2004-08-29 06:39:58 +00:00
Peter Pentchev
882bc79a39 Remove the misleading description of the 'key' argument to
mpool_open(3) - it is *not* really used for synchronization; in fact,
it is not used at all.

PR:		70929
Submitted by:	Martin Kammerhofer <dada@sbox.tugraz.at>
MFC after:	3 days
2004-08-27 14:51:21 +00:00
Dag-Erling Smørgrav
096ad1042a Don't forget to va_end() the va_list we get from va_copy().
Submitted by:	Sean McNeil <sean@mcneil.com>
MFC after:	3 days
2004-08-26 06:25:28 +00:00
Marcel Moolenaar
f0556e70bb Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled. Emit this code sequence
for assembly routines as welli (MCOUNT definition in <machine/asm.h>.
We do not pass the GOT entry however as the 4th argument, because it's
not used. The _mcount() stub calls __mcount(), which does the actual
work. Define _MCOUNT_DECL to define __mcount. We do not have an
implementation of mcount(), so we define MCOUNT as empty, but have a
weak alias to _mcount() in _mcount.S.
Note that the _mcount() stub in the kernel is slightly different from
the stub in userland. This is because we do not have to worry about
nested routines in the kernel.
2004-08-25 07:42:34 +00:00
Alfred Perlstein
3b28ee84a6 note that it is the caller's responsibility to free any buffer passed
to setvbuf(3) and friends.
2004-08-24 21:48:21 +00:00
Tim J. Robbins
e1bcce4f46 Replace the current implementations of ftw() and nftw() with the OpenBSD
implementations written by Todd C. Miller. These are cleaner, less buggy
and actively maintained.
2004-08-24 13:00:55 +00:00
Peter Wemm
ee4dc2a402 struct tm.tm_year is listed as 'years since 1900', and is signed. On
64 bit systems, years roughly -2^31 through 2^31 can be represented in
time_t without any trouble.  32 bit time_t systems only range from
roughly 1902 through 2038.  As a consequence, none of the date munging
code for all the various calendar tweaks before then is present.  There
are other problems including the fact that there was no 'year zero' and
so on.  So rather than get excited about trying to figure out when the
calendar jumped by two weeks etc, simply disallow negative (ie: prior to
1900) years.

This happens to have an important side effect.  If you bzero a 'struct
tm', it corresponds to 'Jan 0, 1900, 00:00 GMT'.  This happens to be
representable (after canonification) in 64 bit time_t space.  Zero tm
structs are generally an error and mktime normally returns -1 for them.
Interestingly, it tries to canonify the 'jan 0' to 'dec 31, 1899', ie:
year -1.  This conveniently trips the negative year test above, which
means we can trivially detect the null 'tm' struct.

This actually tripped up code at work. :-/  (Don't ask)
2004-08-24 00:15:37 +00:00
Doug Rabson
bd41e9ea59 Make sure we allocate at least enough space for the TCB for variant I TLS.
MFC after: 3 days
2004-08-23 15:30:05 +00:00
Tim J. Robbins
9777e82e42 Update documentation to match reality: glob() sorts its result according
to the current LC_COLLATE setting, not in "ASCII order".

PR:		54391
MFC after:	1 week
2004-08-23 12:10:44 +00:00
Tim J. Robbins
8d2a49a247 Re-word warning about the UTF2 encoding, taking care to use the word
"obsolete" instead of "deprecated".
2004-08-21 08:08:29 +00:00
Tim J. Robbins
4740653c84 Bump document date for previous. 2004-08-21 08:03:18 +00:00
Tim J. Robbins
6a4d3d68c7 Re-word warning about the rune interface, taking care to use the word
"obsolete" instead of "deprecated".
2004-08-21 08:00:31 +00:00
Tim J. Robbins
5a52f3c22c Change "deprecated" in link-time warnings about various rune functions
to "obsolete".
2004-08-21 07:48:06 +00:00
Tim J. Robbins
b9b90a1312 Re-word compatibility section, taking care to use the word "obsolete" to
describe the 4.4BSD extension of accepting characters (runes) outside of
the range of unsigned char.
2004-08-21 07:37:08 +00:00
Alfred Perlstein
65da79c4be Reword recent addition about memory moving.
Requested by: keramida

Bump .Dd

Requested by: ru
2004-08-19 16:34:31 +00:00
Alfred Perlstein
09a12d75cf Clarify that realloc and reallocf may move the memory allocation. 2004-08-18 21:13:15 +00:00
Doug Rabson
0e7e4e5fd6 Always allocate a TLS area even if its empty - libpthread relies on
having a valid %gs when it initialises.

MFC after: 2 days
2004-08-18 10:18:58 +00:00
Tom Rhodes
1bdc6fddbf /me kicks cvs update
Revert previous commit, tjr already fixed it and I was too stupid to
notice this fact.

Approved by:	re (to avoid failing cvs ci)
2004-08-17 04:56:03 +00:00
Tom Rhodes
daa790840c Fix incorrect code in an example. The previous example would produce
19 column positions wide in the first line and 20 in the rest of the lines.
This fixes the example to provide the correct output.

PR:		53454
Noticed by:	Kuang-che Wu <kcwu@kcwu.homeip.net>
Submitted by:	Marc Silver <marcs@draenor.org>
Approved by:	re (scottl)
2004-08-17 04:45:52 +00:00
Doug Rabson
e9abf2d6e2 Fix alpha build and add __FBSDID.
PR: 70518
2004-08-16 08:12:29 +00:00
Doug Rabson
ccd13c49b5 Add support for TLS in statically linked programs. 2004-08-15 16:18:52 +00:00
Stefan Farfeleder
4eae39bfdf Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +00:00
Stefan Farfeleder
361de173a5 Avoid using void pointers in additive expressions.
PR:		56653 (libc/rpc bits)
Approved by:	alfred
2004-08-13 23:22:38 +00:00
Peter Pentchev
9f4c0e5c8f Document the MNT_SNAPSHOT mount flag with a cross-reference
to mksnap_ffs(8).

PR:		70402
Submitted by:	James Raftery <james@now.ie>
2004-08-13 14:33:03 +00:00
Tim J. Robbins
5349fd7f49 Fix example. 2004-08-12 12:32:14 +00:00
Tim J. Robbins
de6c9c9d5b Implement wcwidth() as an inline function. 2004-08-12 12:19:11 +00:00
Brian Feldman
ea84c8dc30 Update "documentation date" fields. 2004-08-10 16:38:19 +00:00
Brian Feldman
831bc6f574 Update mlock(2) manpage to cross-reference m{,un}lockall(2), remove
a case where ENOMEM could be returned by munlock(2), and add possible
system deadlock to the BUGS section.
2004-08-10 14:52:42 +00:00
Tim J. Robbins
91f18ef928 Fix an off-by-one bug that caused the first character of the buffer to
be uninitialized.
2004-08-06 17:00:09 +00:00
Peter Pentchev
16d9177176 Bump the document date, since the content changed today.
Discussed with:	ru
2004-08-06 15:29:54 +00:00
Peter Pentchev
9a3daf494b Fix a case of _SC_CLK_TCK being misspelled as _SC_CLOCK_TCK.
PR:		69428
Submitted by:	Sascha Schneider <suntsu@suntsu.org>
MFC after:	2 weeks
2004-08-06 14:49:11 +00:00
Peter Pentchev
808712c91c Cross-reference getnameinfo(3), getaddrinfo(3), getipnodebyname(3) and
getipnodebyaddr(3).

PR:		54229
Submitted by:	Samuel Tardieu <sam@inf.enst.fr>
MFC after:	2 weeks
2004-08-06 12:02:07 +00:00
Doug Rabson
0e1c7d0f08 Add stubs for TLS functions. These will be replaced at runtime by the
functional versions in rtld.
2004-08-03 08:54:01 +00:00
Stefan Farfeleder
3103c94843 Remove an implicit int parameter by using prototypes. 2004-08-02 08:46:23 +00:00
Stefan Farfeleder
44a35598ff Don't pass function pointers via a void * parameter. 2004-08-02 08:18:43 +00:00
David Xu
d3c6a920f1 1. Use correct alignment mask, -15 != ~15
2. Make end of frames
2004-07-31 01:41:41 +00:00
Warner Losh
d68c1e59a8 Use #include <unistd.h> rather than the explicit externs in the
example.  The externs haven't been needed in about 10 years, so
there's no reason to have them other than for hysterical raisins.  And
the California Rasins haven't been around for a long time...
2004-07-31 01:00:50 +00:00
Tim J. Robbins
0db74aa4a9 Re-word the COMPATIBILITY section, taking care to use the word "deprecated"
to describe the 4.4BSD extension of accepting arguments outside the range
of unsigned char. This gives us freedom to remove this extension when we
remove the <rune.h> interface in FreeBSD 6.
2004-07-29 23:32:41 +00:00
Alexander Kabaev
132cc0756e Use newly added __used attribute to keep static function symbols from being
eliminated by compiler optimizer.
2004-07-29 18:07:08 +00:00
Tim J. Robbins
a351559479 Remove unnecessary #include directives. 2004-07-29 06:18:40 +00:00
Tim J. Robbins
a0998ce663 Prefer <runetype.h> to <rune.h>, since the latter is going away soon. 2004-07-29 06:16:19 +00:00
Tim J. Robbins
e214931fbf Remove useless checks for characters longer than INT_MAX bytes. 2004-07-29 06:08:31 +00:00
Tim J. Robbins
e9346e012d Add support for multibyte characters. 2004-07-29 03:48:52 +00:00
Tim J. Robbins
9a9aa3ffa1 Add a paragraph break in the STANDARDS section to improve readability. 2004-07-29 03:41:24 +00:00
Tim J. Robbins
9d88e27007 Add support for multibyte characters. 2004-07-29 03:13:10 +00:00
Tim J. Robbins
f825dd29c2 Document incorrect handling of multibyte characters due to limitations
of sh(1).
2004-07-28 15:43:33 +00:00
David Xu
0187c8ff4e Set fpu context flags to known values, zero is illegal. 2004-07-28 13:08:24 +00:00
Dag-Erling Smørgrav
7688459683 ANSIfy and constify; this now builds with GCC 3.4. 2004-07-28 11:56:03 +00:00
Alexander Kabaev
698784bef7 s/round/fpround/ to avoid naming clash with GCC builtin function. 2004-07-28 05:41:05 +00:00
Tim J. Robbins
ea9a9a377b Add UTF-8-specific implementations of mbsnrtowcs() and wcsnrtombs().
These convert plain ASCII characters in-line, making them only slightly
slower than the single-byte ("NONE" encoding) version when processing
ASCII strings.
2004-07-27 06:29:48 +00:00
Tim J. Robbins
16018100a7 Add an nftw(3) link. 2004-07-25 11:17:54 +00:00
David Schultz
9b5f005228 Remove unused variable.
Noticed by:	Todd Miller <Todd.Miller@courtesan.com>
2004-07-23 06:01:00 +00:00
Tim J. Robbins
6740cd8374 Return the correct value when dst == NULL and conversion has stopped after
nwc dropping to zero.
2004-07-22 02:57:29 +00:00
Hajimu UMEMOTO
0def575fd7 now e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.int
Obtained from:	KAME
2004-07-21 17:26:40 +00:00
Tim J. Robbins
7d7287dc7d Read directly from the stdio buffer using the new __mbsnrtowcs() interface
instead of making repeated calls to __fgetwc().
2004-07-21 12:12:48 +00:00
Tim J. Robbins
1949a3470f Implement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These are
convenient when the source string isn't null-terminated.

Implement the other conversion functions (mbstowcs(), mbsrtowcs(), wcstombs(),
wcsrtombs()) in terms of these new functions.
2004-07-21 10:54:57 +00:00
Tim J. Robbins
2f2c1839f8 Use __wcsrtombs() and __sfvwrite() to convert and write the wide character
string instead of multiple calls to __fputwc().
2004-07-21 08:35:18 +00:00
Christian S.J. Peron
ef6dea1404 Back out previous commit. Even though statfs(2) can take a regular
file as an argument, it may still fail for the same reasons that
open(2) can.

Pointed out by:	Jilles Tjoelker
Apporived by:	bmilekic (mentor)
2004-07-20 19:30:57 +00:00
Christian S.J. Peron
5b154abc54 Remove reference to ENOTDIR in the documented errors
for statfs(2). This is false, if the pathname specified
is a regular file, then the information for the file
system that the file lives on will be returned.

Approved by:	bmilekic (mentor)
2004-07-20 18:35:33 +00:00
Tim J. Robbins
f9ceea9bf1 Call __mbrtowc() and __wcrtomb() directly instead of taking detours
through mbrtowc() and wcrtomb().
2004-07-20 08:27:27 +00:00
Andrew Gallatin
df11547f5d Fix printing of long doubles to match the size that
gcc is using.  This fixes devstat consumers (like vmstat, iostat,
systat) so they don't print crazy zillion digit numbers for
disk transfers and bandwidth.

According to gcc, long doubles are 64-bits, rather than 128 bits
like the SVR4 ABI spec wants them to be..  Note that MacOSX also treats
long doubles as 64-bits, and not 128 bits, so we are in good company.

Reviewed by: das
Approved by: grehan
2004-07-19 23:56:07 +00:00
Peter Grehan
cc73b0f03d Add signalcontext, required by KSE. 2004-07-19 12:08:03 +00:00
Peter Grehan
44d1098779 The new program counter should go into the trapframe's srr0 and
not the link register, which was lucky enough to work.
2004-07-19 12:05:07 +00:00
Tim J. Robbins
2ff3ba336e Update paths to reg*.c and regex2.h. Add a target to build regex.h. 2004-07-19 08:48:17 +00:00
Tim J. Robbins
405033831e Update for removal of cclass.h. Trim some useless targets. Invoke mkh
with "sh mkh" so it works if the script is not executable.
2004-07-19 08:41:11 +00:00
Tim J. Robbins
ec8b0411f1 Update for recent changes to struct re_guts. Disable printing the contents
of OANYOF sets for the moment.
2004-07-19 08:28:53 +00:00
Tim J. Robbins
f420a25887 Remove unused files. 2004-07-19 08:24:21 +00:00
David Schultz
479f8d2214 Make FLT_ROUNDS correctly reflect the dynamic rounding mode. 2004-07-19 08:17:25 +00:00
David Schultz
ec79bc0da9 Fix two bugs in the signbit() macro, which was implemented last year:
- It was added to libc instead of libm.  Hopefully no programs rely
  on this mistake.

- It didn't work properly on large long doubles because its argument
  was converted to type double, resulting in undefined behavior.
2004-07-19 08:16:10 +00:00
David Schultz
39bcea8689 Replace seven nominally MD implementations of frexp() that are broken
for subnormals with one implementation that works.
2004-07-18 21:23:39 +00:00
Tim J. Robbins
ad3d799334 Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.

PR:	57911 (related)
2004-07-18 10:11:27 +00:00
Tim J. Robbins
613e383e81 Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.

PR:	57911
2004-07-18 06:56:40 +00:00
Tim J. Robbins
ad19b09bec Fix typo: carat -> caret. 2004-07-17 12:27:25 +00:00
Hartmut Brandt
b711f5ddea Document the MSG_DONTWAIT flag. 2004-07-16 17:15:37 +00:00
Tim J. Robbins
2508f480c2 Add a cross reference to fgetwln(3). 2004-07-16 06:07:12 +00:00
Tim J. Robbins
9531ef0fc1 Add fgetwln(), a wide character version of fgetln(). 2004-07-16 06:06:09 +00:00
Tim J. Robbins
66d56cb7b8 Rename slbexpand() to __slbexpand() and make it available outside
of fgetln.c (non-static).
2004-07-16 05:52:51 +00:00
Alfred Perlstein
85e8765b7e Clarify getfsstat(2) usage.
The getfsstat(2) function expects a buffer and a count, and returns a count.

The confusing part is that the count it takes is a byte count, while the
return value is a count of the number of structures it has filled out.

Spell this out.
2004-07-16 01:18:13 +00:00
Tim J. Robbins
ee5d8a1b0a Remove an entry from the BUGS section: we have multibyte character
support now.
2004-07-12 11:03:42 +00:00
Tim J. Robbins
e5996857ad Make regular expression matching aware of multibyte characters. The general
idea is that we perform multibyte->wide character conversion while parsing
and compiling, then convert byte sequences to wide characters when they're
needed for comparison and stepping through the string during execution.

As with tr(1), the main complication is to efficiently represent sets of
characters in bracket expressions. The old bitmap representation is replaced
by a bitmap for the first 256 characters combined with a vector of individual
wide characters, a vector of character ranges (for [A-Z] etc.), and a vector
of character classes (for [[:alpha:]] etc.).

One other point of interest is that although the Boyer-Moore algorithm had
to be disabled in the general multibyte case, it is still enabled for UTF-8
because of its self-synchronizing nature. This greatly speeds up matching
by reducing the number of multibyte conversions that need to be done.
2004-07-12 07:35:59 +00:00
Tim J. Robbins
67aff1896c Add a new error code, REG_ILLSEQ, to indicate that a regular expression
contains an illegal multibyte character sequence.
2004-07-12 06:07:26 +00:00
Marcel Moolenaar
b41e0f0f56 Document the new PT_LWPINFO request. In fact, the request is so new
it hasn't even been implemented yet. I just wanted to be the first
to try a new approach to development ;-)
2004-07-12 04:43:58 +00:00
Tim J. Robbins
80f363668e Remove incomplete support for multi-character collating elements. Remove
unused character category calculations.
2004-07-11 05:58:31 +00:00
Marcel Moolenaar
f5eda2f1cb Unbreak alpha: On alpha a long double is the same as a double and
consequently the exponent is only 11 bits. Testing whether the
exponent equals 32767 in that case only effects to compiler warnings
and thus build breakage.
2004-07-10 15:52:26 +00:00
Tim J. Robbins
550473de5b Add fast paths for conversion of plain ASCII characters. 2004-07-09 15:46:06 +00:00
Tim J. Robbins
fcc5191787 Slightly reorganize and simplify. 2004-07-09 15:12:10 +00:00
David Schultz
ad93428d7a Bump document date for recent changes.
Prodded by:	ru
2004-07-09 06:37:44 +00:00
David Schultz
3bdf026534 Document these functions as being in libm, not libc. Some of them
*are* in libc for historical reasons, but programmers should not rely
on that fact.

Also remove a BUGS section that is not relevant here.
2004-07-09 03:33:00 +00:00
David Schultz
240dbabfa8 Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify().  This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number.  In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5.  I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X.  At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong.  Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by:	kris
2004-07-09 03:32:40 +00:00
Garrett Wollman
5b1eaa7bb6 Eliminate some magic numbers and correct description of _PC_NO_TRUNC.
Slight emendation to _PC_CHOWN_RESTRICTED, which is in a very similar
boat.
2004-07-08 20:27:38 +00:00
Tim J. Robbins
ee446de0b1 Add a function to iterate over all characters in a particular character
class. This is necessary in order to implement tr(1) efficiently in
multibyte locales, since the brute force method of finding all characters
in a class is infeasible with a 32-bit (or wider) wchar_t.
2004-07-08 06:43:37 +00:00
Alfred Perlstein
83f46f9e33 there's no such define as KERN_NAME_MAX, change to _POSIX_NAME_MAX. 2004-07-07 20:47:42 +00:00
Ruslan Ermilov
5792ef0983 Markup nits. 2004-07-07 20:15:31 +00:00
Ruslan Ermilov
1c5f1e7afd Fixed markup. 2004-07-07 20:11:35 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Hiten Pandya
af73aa7cce Move the return value information about the getenv(3) library function
under the RETURN VALUES section so it is consistent with others.

Cleanup the return value text for getenv(3) a little while I am here.

PR:     	docs/58033
MFC after:	3 days
2004-07-06 23:21:36 +00:00