Commit Graph

4631 Commits

Author SHA1 Message Date
Bill Fumerola
f6f1b6b676 In theory it would be perfectly legal for a system administrator to
# cd /dev && ./MAKEDEV pty0 pty3
and/or
# rm -rf /dev/ptyp0

and expect all programs that use openpty() to still try to find available ptys.
2001-03-10 10:39:52 +00:00
Daniel Eischen
af4878847e Correct a race condition where it was possible for a signaled
thread to become stranded and not placed in the run queue.

MFC Candidate

Reported by:	tegge
2001-03-09 16:05:43 +00:00
Ruslan Ermilov
7f3a1ed2a7 This is the getsid() we are talking about, not setsid().
PR:		docs/25626
Submitted by:	Yoshihiko Sarumaru <mistral@imasy.or.jp>
2001-03-09 11:16:09 +00:00
David E. Cross
57db636284 Submitted by: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
Reviewed by:	David Cross <dec@freebsd.org>, jkh <jkh@freebsd.org>
Approved by:	jkh <jkh@freebsd.org>
Obtained from:	Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
We have been running this patch on a production NIS server for 2.5 weeks now.
Normally we would have ypserv die at least once a week, and often many times
a day.

This patch treats and error from select as zeroing out the FD_SET to indicate
that no fds are ready for reading.  This is safe because the rpc code
always re-inits the FDSET before calling select.
2001-03-08 13:57:41 +00:00
Dag-Erling Smørgrav
e238d2a8da Don't remember an EINTR, since the caller may want to restart the call. 2001-03-07 05:12:14 +00:00
Dag-Erling Smørgrav
4cee73c80f Support lower-case versions of the proxy environment variables.
PR:		bin/25494
2001-03-07 04:45:55 +00:00
Doug Rabson
a8c60cbef4 A quick and dirty port of libstand to ia64. 2001-03-06 16:11:36 +00:00
Doug Rabson
ac9a4fc876 Use relative paths to find byte_swap_*.S to make it easier to use these
from libstand.
2001-03-06 16:08:19 +00:00
Doug Rabson
5e1202d5d3 Make this compile. Still need to write/borrow a working setjmp. 2001-03-06 16:07:41 +00:00
Doug Rabson
62b8ce411f Use ieee floats on ia64. 2001-03-06 16:06:38 +00:00
David Malone
aa9ab917d7 Use the right format string for printing ULONG_MAX. 2001-03-05 11:58:12 +00:00
David E. O'Brien
eed5465d4e Fix style nit. 2001-03-05 11:10:12 +00:00
David E. O'Brien
2c4b10dd85 Fix style breakage. 2001-03-05 11:06:18 +00:00
David E. O'Brien
ca740c1f47 Fix style that got corrupted. 2001-03-05 10:39:03 +00:00
David E. O'Brien
b373451cbe Fix FreeBSD id style breakage from rev 1.17 2001-03-05 10:30:12 +00:00
David E. O'Brien
1e58303f9f Use our standard .c rcsid format. 2001-03-05 10:21:05 +00:00
David E. O'Brien
e4efb830ff Fix copyright breakage in rev 1.2.
We *cannot* remove clause #4 from the Univ of California's license.
2001-03-05 10:18:15 +00:00
David E. O'Brien
de3ac4d068 Correct a comment. 2001-03-05 10:00:57 +00:00
David E. O'Brien
d2357f9842 Fix style breakage in rev 1.3 2001-03-05 09:33:08 +00:00
David E. O'Brien
8bb47e4083 Fix style bug that was introduced. 2001-03-05 09:21:44 +00:00
Andrey A. Chernov
54e3bc256e Change mon_decimal_point from "." to "" (N/A>) as it is specified by POSIX for
POSIX locale.
2001-03-03 21:03:15 +00:00
Andrey A. Chernov
c0bbece16d Actually implement T_FMT_AMPM 2001-03-02 22:12:19 +00:00
Andrey A. Chernov
50bab1e6fb Implement ampm_fmt (%r) per POSIX 2001-03-02 22:10:04 +00:00
Ruslan Ermilov
efbe286b68 Removed duplicate $FreeBSD$. 2001-03-02 13:00:26 +00:00
Ruslan Ermilov
825d095dd3 Fix setlocale() to conform to the ISO C and POSIX standards.
The below text is quoted from the latest POSIX draft:

: The values of locale categories shall be determined by a precedence
: order; the first condition met below determines the value:
:
: 1. If the LC_ALL environment variable is defined and is not null,
:    the value of LC_ALL shall be used.
: 2. If the LC_* environment variable (LC_COLLATE, LC_CTYPE, LC_MESSAGES,
:    LC_MONETARY, LC_NUMERIC, LC_TIME) is defined and is not null, the
:    value of the environment variable shall be used to initialize the
:    category that corresponds to the environment variable.
: 3. If the LANG environment variable is defined and is not null, the
:    value of the LANG environment variable shall be used.
: 4. If the LANG environment variable is not set or is set to the empty
:    string, the implementation-defined default locale shall be used.

The conditions 1 and 2 were interchanged, i.e., LC_* were looked first,
then LC_ALL, then LANG (note that LC_ALL and LANG were essentially the
same, providing the default, with LC_ALL taking precedence over LANG).
Now, LC_ALL and LANG serve the different purposes.  LC_ALL overrides
any LC_*, and LANG provides the default fallback.

Testcase:

/usr/bin/env LC_ALL=C LC_TIME=de_DE.ISO_8859-1 /bin/date

Should return date in the "C" locale format.

Inspired by:	date(1) reference page in the Draft
2001-03-02 12:45:52 +00:00
Ruslan Ermilov
0d42ab242e mdoc(7) police: fix markup. 2001-03-02 09:59:58 +00:00
Daniel Eischen
45d8008748 Hide the definition of struct __sFILEX and add the needed
lock definitions to it.  flockfile state is now allocated
along with the rest of FILE.  This eliminates the need for a
separate allocation of flockfile state as well as eliminating
the mutex/lock used to serialize its allocation.
2001-03-01 05:22:14 +00:00
Daniel Eischen
3b5b529f2e s/fstat/_fstat/
Approved by:	phantom
2001-03-01 04:59:01 +00:00
David E. O'Brien
083745b549 Merge in strtoul.3 rev 1.11 mdoc(7) police changes:
.Nd line broken in rev 1.10
	use .Bx for ``BSD''
2001-02-28 17:46:56 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
Jonathan Lemon
079a79149a Use the new EV_SET macro to insure that all fields in struct kevent
are correctly initialized before use.  This should fix the problem
with DNS.

Pointy hat to:  me
2001-02-28 15:47:47 +00:00
Ruslan Ermilov
c37e97e493 mdoc(7) police: prepare for mdocNG. 2001-02-28 13:11:51 +00:00
Ruslan Ermilov
0b01af0991 mdoc(7) police: fix the .Nd line broken in previous revision.
Noticed by:	bde

Use .Bx for ``BSD''.
2001-02-28 12:54:16 +00:00
David E. O'Brien
dfb54b7422 Remove the `r' devices. 2001-02-27 23:29:13 +00:00
Andrey A. Chernov
cbcf73f998 Use formula with better random distribution for rand()
Even better formula from random() could not be intetgrated because rand_r()
supposed to store its state in the single variable (but table needed for
random() algorithm integration).
2001-02-27 14:42:19 +00:00
David E. O'Brien
3bdced7c3c I accidently deleted an include when I added the $FreeBSD$ so I could
check in my changes.
2001-02-27 14:30:42 +00:00
Ruslan Ermilov
8ac6dca795 In soshutdown(), use SHUT_{RD,WR,RDWR} instead of FREAD and FWRITE.
Also, return EINVAL if `how' is invalid, as required by POSIX spec.
2001-02-27 13:48:07 +00:00
David E. O'Brien
4c0440cb86 Impliment the ISO-C99 strto[u]ll()
and rewrite strto[u]q() in terms of it.
2001-02-27 13:33:07 +00:00
Ruslan Ermilov
fdc1fef594 Use ``.St -p1003.[12]''. 2001-02-26 16:12:39 +00:00
Ruslan Ermilov
2fba8dcd52 Use ``.St -p1003.1g''. 2001-02-26 16:08:15 +00:00
Ruslan Ermilov
096841eceb Use ``.St -p1003.1-96''. 2001-02-26 15:16:43 +00:00
Ruslan Ermilov
589a5e341f /^\.St/ s/-iso9945-1/-p1003.1-96/ 2001-02-26 14:48:38 +00:00
Ruslan Ermilov
3d751065b0 `.St -p1003.1b'' -> `.St -p1003.1b-93''. 2001-02-26 14:33:54 +00:00
Ruslan Ermilov
588a200ce1 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
Jason Evans
789d148cca Document the EINTR error. 2001-02-26 09:38:01 +00:00
Ruslan Ermilov
52017970cb mdoc(7) police: use .Vt macro. 2001-02-26 09:15:17 +00:00
Ruslan Ermilov
bcdf5ca7c6 Prepare for mdocNG. 2001-02-26 09:05:48 +00:00
Jonathan Lemon
5d1c9c5606 Document various changes to kq:
- new EV_SET macro,
    - NOTE_LOWAT option for low water marks on read/write filters,
    - NOTE_REVOKE for filesystem unmounting (and revoke() calls)
    - improved API for EVFILT_AIO
2001-02-26 04:16:19 +00:00
Daniel Eischen
c33f8c177f Really set the flags for a private mutex (used by libc/libc_r). 2001-02-26 01:06:52 +00:00
Daniel Eischen
c6f2aed102 Limit threads clock resolution to no less than 1000usec (1000Hz).
PR:		25300
Submitted by:	Tom Pavel <pavel@alum.mit.edu> (in part)
2001-02-26 01:05:33 +00:00
Jimmy Olgeni
a68886ad51 Fix my ambiguous message about ECONNABORTED.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2001-02-25 23:56:41 +00:00
Jimmy Olgeni
ff08a1b858 Add ECONNABORTED to the ERRORS section. 2001-02-25 22:12:40 +00:00
Tor Egge
3275de7ca5 Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
Alexey Zelkin
41b55591ce Fix visibility of empty variable -- it should be static.
Submitted by:	bde and Hartmut Brandt <brandt@fokus.gmd.de> (via PR)
PR:		bin/25308
2001-02-24 13:13:48 +00:00
Robert Watson
ae3a37ad44 Adapt libkvm_getswapinfo() to make use of recently committed vm and swap
sysctls exporting swap information.  When running on a live kernel,
the sysctl's will now be used instead of kvm_read, allowing consumers of
this interface to run without privilege (setgid kmem).  Retain the
ability to run on coredumps, or on a kernel using kmem if explicitly
pointed at one.

A side effect of this change is that kvm_getswapinfo() is faster now in
the general case. If the SWIF_DUMP_TREE flag is given (pstat -ss does
this), the radix tree walker, which still uses kvm_read in any case, is
invoked, and therefore does require privilege.

Submitted by:	Thomas Moestl <tmoestl@gmx.net>
Reviewed by:	freebsd-audit
2001-02-23 18:49:16 +00:00
Brian Feldman
75d4fd11cb Correctly handle the race itself, too (don't leave it locked).
This is about to be replaced anyway by initialization explicitly
instead of lazily, and reducing the complexity of it.  As it is
now, this will work fine, however.
2001-02-23 17:55:01 +00:00
Brian Feldman
93f9377a7c Use the right names to call pthread_mutex_{,un}lock so that things
work in both the libc only and libc/libc_r case.
2001-02-23 06:26:22 +00:00
Brian Feldman
4524204190 Fix the problems I (and others, undoubtedly) have been having for a
while with threaded software in -CURRENT acting very "weird".  It has
seemed, for example, in Mozilla that threads attempting to do host
lookups have been locking up.  That's exactly the case.

There was a race condition in the implementation of the initialization
of the mutex used to protect FILE operations, first of all: multiple
instances of FLOCKFILE() in libc could occur on the same FILE at
the same time and cause strange behavior by overwriting eachothers'
creation of the mutex and the rest of the file lock.

Secondly, it's not appropriate to test the "validity" of the file
descriptor referenced by the FILE; if the code is calling FLOCKFILE()
or FUNLOCKFILE(), it wants the FILE to be locked or unlocked, not
to be locked or unlocked on the condition that _file is >= 0.  This
also could quite easily cause leaks by failing to perform the lock or
unlock operation when it actually is needed.

Mozilla now works again on -CURRENT when linked to libc_r.so.5 and
libc.so.5.
2001-02-23 04:59:12 +00:00
Ruslan Ermilov
bb1f93d519 Prepare for mdoc(7)NG. 2001-02-22 15:03:09 +00:00
Daniel C. Sobral
e94b7789ae Correct the prototype for pager_output(). 2001-02-22 10:58:30 +00:00
Kris Kennaway
aae101bd15 Correct comment typos 2001-02-20 10:23:10 +00:00
Peter Wemm
3d92fc05aa Place some hooks (__stdin, __stdout, __stderr) into libc for a future
ABI change.  There is some serious evilness here to work around some
gcc weaknesses.  We need to know the sizeof(FILE) manually until __sF
goes away in the next major bump.  We have the size for Alpha and i386,
missing is ia64, ppc and sparc* (and i386 with 64 bit longs).
At some point down the track we can change the stdin etc #defines to
stop hard coding the size of FILE into application binaries.

Lots of head scratching and ideas and testing by: green, imp
2001-02-20 01:56:52 +00:00
Alexey Zelkin
e1467aa917 cleanup commentaries 2001-02-19 19:09:00 +00:00
Hajimu UMEMOTO
928268064f Enable AI_ADDRCONFIG as a valid flag of getaddrinfo(3). Some
applications specify AI_ADDRCONFIG and fail to run under FreeBSD.
Latest mews is known.  Now, getaddrinfo(3) behaves according to
AI_ADDRCONFIG.
2001-02-19 13:13:51 +00:00
Andrey A. Chernov
c80a91609d Deal properly with "0" 2001-02-19 06:19:51 +00:00
Jeroen Ruigrok van der Werven
7c63796828 Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
Kris Kennaway
07cd02bf4e Silence -Wnon-const-format 2001-02-18 04:51:47 +00:00
Kris Kennaway
d7422f2f19 Back out snprintf -> sprintf change until I have time to look at it. 2001-02-18 04:07:50 +00:00
Andrey A. Chernov
8a8e51d8e8 CRNCYSTR: determine '.' too 2001-02-17 11:15:30 +00:00
Andrey A. Chernov
59dde0d08d Implement CRNCYSTR 2001-02-17 07:35:01 +00:00
Warner Losh
b0f8f42120 Extra needs to be initialized for our usual pool of FILEs. This was
causing some versions of as to dump core.  This survived make
buildworld/installworld and the building gettext port afterwards.

Submitted by: <nnd@mail.nsk.ru> "N.Dudorov"
Reviewed by: "Daniel M. Eischen" <eischen@vigrid.com>
2001-02-16 21:09:49 +00:00
Warner Losh
91e1be28dc Fix the current libc breakage in current:
o Back out the __std* stuff.  Can't figure out how to do this right now,
  so we'll save it for late.
o use _up as a pointer for extra fields that we need to access.
o back out the libc major version bump.

Submitted by: green
reviewed by: peter, imp, green, obrien (to varying degrees).

We'll fix the "how do we stop encoding sizeof(FILE) in binaries" part
later.
2001-02-16 06:11:22 +00:00
Tor Egge
9f52fa8615 Don't depend on lcl_mutex being a recursive mutex.
Reviewed by:	deischen
2001-02-15 22:17:04 +00:00
Tor Egge
2ffc61ba9c Remove freelists managed by Balloc/Bfree.
Change __dtoa to not free the string it allocated the previous time it was
called.  The caller now frees the string after usage if appropiate.

PR:		15070
Reviewed by:	deischen
2001-02-15 22:12:50 +00:00
Hajimu UMEMOTO
ad9fdc8f4d Correct 2nd argument of getnameinfo(3) to socklen_t.
Reviewed by:	itojun
2001-02-15 10:35:55 +00:00
Peter Wemm
813ff33601 List the SA_RESTART flag rather than burying it in another paragraph. 2001-02-14 21:46:07 +00:00
David E. O'Brien
9a5622785c Only build the compat libs appropiate for the target machine. 2001-02-14 20:49:54 +00:00
Guido van Rooij
34bdee5b4b Add include <sys/time.h> because kevent uses struct timespec 2001-02-14 08:48:35 +00:00
Peter Wemm
ff9dc074b5 Commit a libc fix going by the current state of the version numbering
bikeshed in -arch.  It isn't quite over, but it has been well established
that this can be adjusted or refined.  But we do seem to have consensis
on a major bump of some sort.  After this, it should reasonably safe
to build world again.

This change is to get rid of __sF[] and use seperate __stdin/out/err
handles.  This means we can pad on extra bits onto the end of FILE
at will without going through this all over again.  __sF[] was evil
because it compiled the sizeof(FILE) into every stdio using program.

Asbestos suit on: check!
Peril sensitive sunglasses on: check!
*gulp!*
2001-02-14 05:00:20 +00:00
Andrey A. Chernov
d6a3432e11 Return {YES,NO}STR from locale
Approved by:	phantom
2001-02-13 23:32:48 +00:00
Alexey Zelkin
39d2c772eb catch up to __part_load_locale() interface change 2001-02-13 15:32:21 +00:00
Alexey Zelkin
fc38c1e548 add additional function parameter: bufsize_min. it's possible
to check two sizes per one function invocation now.

Suggested by: ache
2001-02-13 15:29:39 +00:00
Ruslan Ermilov
95cf33c567 mdoc(7) cleanup. 2001-02-12 15:16:24 +00:00
Ruslan Ermilov
6bf131c665 Sort PROT_* and MAP_* lists, logically and alphabetically respectively.
Suggested by:	bde

General mdoc(7) cleanup.
2001-02-12 10:14:15 +00:00
Alexey Zelkin
b161fb0061 Make comparsions more clear (per style(9)) 2001-02-12 08:56:39 +00:00
Alexey Zelkin
ba4a5c925a Assume that "" passed as parameter also means "no grouping"
Make comparsions more clear (per style(9))
2001-02-12 08:55:12 +00:00
Alexey Zelkin
4e86238071 Rewrite __time_load_locale() using ldpart.c::__part_load_locale()
Reviewed by:	ache
2001-02-12 08:53:33 +00:00
Alexey Zelkin
331cc8974c Use .Rv macro instead of hardcoded message 2001-02-12 08:42:56 +00:00
Ruslan Ermilov
1a0c34f25e "Cross references in the SEE ALSO section should be sorted by section
number, and then placed in alphabetical order and comma separated.",
mdoc.samples(7) said.
2001-02-12 08:30:22 +00:00
Ruslan Ermilov
9a801ec807 mmap(3) -> mmap(2). 2001-02-12 08:27:06 +00:00
Peter Wemm
56f98998e9 It sounded like a good idea at the time. The previous change breaks
FILE *buffer = stdout;
so back it out for now.
2001-02-12 03:31:23 +00:00
Peter Wemm
9b8ff47f40 Take advantage of the current libc sizeof(FILE) breakage (__sF[]) and
try a hopefully more robust stdin/stdout/stderr.  This costs an indirect
pointer fetch, but saves us from changes in 'FILE'.  The __stdin stuff
is there to not pollute application name space if the application does
not use <stdio.h> and also in case something depended on the current
behavior where stdin etc was a #define.

Reviewed by:	eischen, dillon
2001-02-12 02:50:30 +00:00
Robert Watson
4be19dddae o Fix build of libc broken in revision 1.2. offsetof() requires the
inclusion of stddef.h.

Reviewed by:	peter
2001-02-12 02:44:33 +00:00
Jake Burkholder
4c85452ba9 Catch up to new priority interface. 2001-02-12 00:21:38 +00:00
Daniel Eischen
f434cd45ed Remove (int) file descriptor locking. It should be up to the
application to provide locking for I/O operations.  This doesn't
break any of my tests, but the old behavior can be restored by
compiling with _FDLOCKS_ENABLED.  This will eventually be removed
when it is obvious it does not cause any problems.

Remove most of flockfile implementation, with the exception of
flockfile_debug.

Make error messages more informational (submitted by Mike Heffner
<spock@techfour.net>, who's now known as mikeh@FreeBSD.org).
2001-02-11 22:07:32 +00:00
Daniel Eischen
29ac6bd228 libc MT-safety, part 2.
Add a lock to FILE.  flockfile and friends are now implemented
(for the most part) in libc.  flockfile_debug is implemented in
libc_r; I suppose it's about time to kill it but will do it in
a future commit.

Fix a potential deadlock in _fwalk in a threaded environment.
A file flag (__SIGN) was added to stdio.h that, when set, tells
_fwalk to ignore it in its walk.  This seemed to be needed in
refill.c because each file needs to be locked when flushing.

Add a stub for pthread_self in libc.  This is needed by flockfile
which is allowed by POSIX to be recursive.

Make fgetpos() error return value (-1) match man page.

Remove recursive calls to locked functions (stdio); I think I've
got them all, but I may have missed a couple.

A few K&R -> ANSI conversions along with removal of a few instances
of "register".

$Id$ -> $FreeBSD$ in libc/stdio/rget.c

Not objected to:	-arch, a few months ago
2001-02-11 22:06:43 +00:00
Nik Clayton
6bd7c68cf0 Mention PROT_NONE in the list of possible protections.
Pointed out by:	kris
2001-02-11 19:30:41 +00:00
Nik Clayton
59b58b1622 Include mmap(2) in the list of memory allocation functions.
Reviewed by:	hackers
2001-02-11 19:28:36 +00:00
Nik Clayton
38f2cd4aa4 .Xr to mmap. 2001-02-11 18:53:50 +00:00
Nik Clayton
3db072ec5e Note that mmap(2) can allocate memory, as well as mapping existing files,
in the .Nd.

Reviewed by:	hackers
2001-02-11 18:51:17 +00:00
Nik Clayton
480e9923d5 Add a man page for the dbm_* functions, and update the Makefile to link
it in.

Some review from -hackers (some time ago), and I think the best way to
get this improved (if it needs improving) or updating, is to bring it in.

PR:             docs/12557
Submitted by:   Tim Singletary <tsingle@triana.gsfc.nasa.gov>
2001-02-11 17:24:25 +00:00
Alexey Zelkin
fc19bba6aa Don't use hardcoded struct size, use offsetof() instead (make size calculations
dynamic)
2001-02-11 15:09:31 +00:00
Alexey Zelkin
9040b756dd Don't try to convert grouping strings in case if C or POSIX locale
was explicitly specified.

Submitted by:	ache
2001-02-11 15:07:26 +00:00
Alexey Zelkin
cb03ae3061 make it possible to specify grouping number from range 0..CHAR_MAX,
not only one-digit number
2001-02-10 20:22:45 +00:00
Alexey Zelkin
7d2cc62ba3 Use "namespace.h" and "un-namespace.h"
Requested by:	deischen
2001-02-10 19:57:26 +00:00
Alexey Zelkin
1bd7723d09 . Fix semantics of grouping (LC_MONETARY::mon_grouping,
LC_NUMERIC::grouping) values.
. Always set __XXX_changed flags then loading numeric & monetary locale
  categories to allow localeconv() to use C locale also.
2001-02-10 15:36:46 +00:00
Yoshihiro Takahashi
96cd764ed3 Use ${MACHINE_ARCH} instead of ${MACHINE} to support pc98. 2001-02-10 13:11:02 +00:00
Ruslan Ermilov
c634427cd5 mdoc(7) police: polishing. 2001-02-10 10:51:39 +00:00
Ruslan Ermilov
429d919c70 mdoc(7) police: mark LC_NUMERIC with .Dv. 2001-02-10 10:26:52 +00:00
Nik Clayton
3ad2681f52 Improve language and code examples.
PR:             docs/24961
Submmitted by:  Tony Finch <dot@dotat.at>
2001-02-10 07:48:01 +00:00
David E. O'Brien
56a91a6f9a There are now compat libs for the Alpha too. 2001-02-10 07:07:09 +00:00
David E. O'Brien
a9bdaf8482 The compat[34]x dists need to have their machine arch appended. 2001-02-10 07:06:40 +00:00
David E. O'Brien
503a83f979 Add 4x compat libs for Alpha.
These come from the live FS of the BSDi FreeBSD/AXP 4.2 disc set.

Forgotten by:	non-Alpha person
2001-02-10 07:00:26 +00:00
David E. O'Brien
84609fdbd3 Look to the future and make this easier to add libs to. 2001-02-10 06:53:31 +00:00
David E. O'Brien
fd3f646bbb Reformat the lib list. 2001-02-10 06:44:18 +00:00
Andrey A. Chernov
2b2075b191 Note that decimal point taken from locale 2001-02-10 06:42:32 +00:00
David E. O'Brien
31b516e49c Add more 3.5.1 libs that don't exist in 5-CURRENT.
These are: libalias.so.3 libfetch.so.1 libperl.so.3 libss.so.2 libvgl.so.1
2001-02-10 06:41:59 +00:00
Andrey A. Chernov
1c97c57770 Note that decimal point taken from locale (SUSv2) 2001-02-10 06:32:03 +00:00
David E. O'Brien
675331271f Reformat the lib list. 2001-02-10 06:32:02 +00:00
David E. O'Brien
b9eb791977 libc_r.so was bumped between 3.4 and 3.5[.1], so we need libc_r.so.4 also. 2001-02-10 06:29:53 +00:00
David E. O'Brien
441536d6de Update the i386 compat3x dist to the FreeBSD 3.5.1 libs.
I had moved on to FreeBSD 4.0 before 3.5-R and had forgotten to keep this
collection up to date.
2001-02-10 06:25:45 +00:00
Andrey A. Chernov
9ad80ab51f Take decimal point from locale instead of hardcoded '.' (SUSv2) 2001-02-10 06:25:33 +00:00
Andrey A. Chernov
36db56802d Note that decimal point character taken from locale (SUSv2) 2001-02-10 05:52:59 +00:00
Andrey A. Chernov
a2a135c94f Use decimal point from localeconv() instead of hardcoded '.' (SUSv2) 2001-02-10 05:46:05 +00:00
Andrey A. Chernov
05a6e1e59b Note the fact that decimal point taken from locale (according to SUSv2) 2001-02-10 05:16:41 +00:00
Andrey A. Chernov
b0e3ccc057 Use decimap_point from localeconv() instead of hardcoded '.'
Obtained from:	inspired by NetBSD strtod
2001-02-10 05:05:09 +00:00
Andrey A. Chernov
ab9577f234 As temporary workaround for missing *grouping fields parser always return "no
grouping" (CHAR_MAX, '\0').
Fixme: grouping parser needs to be implemented.
2001-02-10 04:32:55 +00:00
Andrey A. Chernov
96be743f80 According to Garrett, POSIX widely use -1 to indicate CHAR_MAX, so back out
all my "-1" -> "something" fixes and replace -1 with CHAR_MAX directly in
strtol() in cnv()
2001-02-10 03:31:23 +00:00
Andrey A. Chernov
d2712eafa7 Use __XSTRING(CHAR_MAX) instead of "127" and strtol() base 0 to parse it (0x7f) 2001-02-10 02:00:56 +00:00
Andrey A. Chernov
1506a668dc Correct myself a bit: situation is broken not for _all_ numeric LC_MONETARY,
LC_NUMERIC fields, but only for *grouping fields - other fields are converted
to a chars in localeconv(), so final change is:

"-1" -> "127"

127 here is because CHAR_MAX supposed, which is _positive_ (SUSv2 requirement),
not negative as 255. It is still a bit of hack. To find real CHAR_MAX will be
better to sprintf() it once somewhere in static buffer. *grouping parsing
still broken and missing and needs to be implemented.
2001-02-10 01:38:18 +00:00
Andrey A. Chernov
051f867fe1 NOTE: according to SUSV2 and other implementations, numeric elements in
LC_MONETARY, LC_NUMERIC are byte-arrays, not ASCII strings!

Fix "C" locale, change "-1" to {CHAR_MAX, '\0'} according to standards.

This is only partial fix - locale loading procedure remains broken as before
and load too big values for all locales.  All numeric strings there should be
converted with something like atoi() and placed into bytes.  Maybe I do it
later, if someone will not fix it faster.
2001-02-10 00:43:32 +00:00
Andrey A. Chernov
d0e2083fdd Implement CODESET 2001-02-09 22:43:39 +00:00
Tor Egge
d7e56cc908 Backout previous commit. Use of spinlocks was not approved.
PR:		15070
2001-02-09 20:31:48 +00:00
Nik Clayton
4460a589ec Describe the arguments to gethostbyaddr.
PR:             docs/24225
Submitted by:   Joakim Henriksson <jurduth@ludd.luth.se>
Patch from:     ben
2001-02-09 19:06:25 +00:00
Murray Stokely
ec9e07cdaf Add relevant libraries from our ref4 box.
Approved by:	jkh
2001-02-09 18:59:39 +00:00
Murray Stokely
7a67e396b5 Add compat4x.i386 directory.
Approved by:	jkh
2001-02-09 18:59:02 +00:00
Andrey A. Chernov
634c946524 Back out attempt to implement CRNCYSTR - require additional prefixes according
to SUSV2. Add comment explaining it instead.
2001-02-09 18:39:17 +00:00
Andrey A. Chernov
218bcbcb4d Explicitly mark deprecated entries.
Return currency_symbol for CRNCYSTR
Return "%r" for T_FMT_AMPM
Remove obsoleted comment about c_fmt
Return "" for {YES,NO}STR
2001-02-09 18:16:12 +00:00
Ruslan Ermilov
78b7a6c149 mdoc(7) police: prevent generation of the extra
whitespace after ``i.e.'', use .Rv, update .Dd.
2001-02-09 12:47:23 +00:00
Ruslan Ermilov
3fe5c3c9aa mdoc(7) police: fixed the weird construct. 2001-02-09 09:08:53 +00:00
Andrey A. Chernov
740972dc72 Hardcode c_fmt in a different way since used in nl_langinfo now 2001-02-08 20:55:38 +00:00
Tor Egge
1d538861ff Protect freelists managed by Balloc/Bfree with a spinlock.
Change __dtoa to not free the string it allocated the previous time it was
called.  The caller now frees the string after usage if appropiate.

PR:		15070
2001-02-08 20:22:28 +00:00
Alexey Zelkin
747a8b55e8 add lmonetary.?, lnumeric.?, ldpart.?, lmessages.?, nl_langinfo.c
remove lconv.c
2001-02-08 17:13:24 +00:00
Alexey Zelkin
60e1d74ff8 Add SUSv2 compatible nl_langinfo() function. It still need some work, but
this is already usable one.
2001-02-08 17:12:03 +00:00
Alexey Zelkin
930cd71107 Catch up to latest chanage in timelocal structures exporting. 2001-02-08 17:08:13 +00:00
Alexey Zelkin
18f3e1e400 Export internal data structures in same manner as numeric/monetary/messages
structures exported.
Protect timelocal.h from multiple inclusions.
2001-02-08 17:06:37 +00:00
Alexey Zelkin
e690a5563f Make localeconv() actual function. Now it will use LC_MONETARY/LC_NUMERIC
information to fill return structure. Remove unused anymore stub.
2001-02-08 17:03:01 +00:00
Alexey Zelkin
90423ececf Make FreeBSD locale support complete: add support for rest locale categories
LC_MONETARY, LC_NUMERIC and LC_MESSAGES. Remove stub functions since they
don't need anymore.

Reviewed by:	silence on -i18n
2001-02-08 16:58:53 +00:00
Jacques Vidrine
5e0c0a9246 Document the cases in which setreuid changes the saved-user-ID. 2001-02-08 12:43:33 +00:00
Ruslan Ermilov
c6e2c33321 mdoc(7) police: print #ifdef/#endif literally,
and as list items (to get the correct offset).
2001-02-08 10:40:42 +00:00
Ruslan Ermilov
041cbd4832 mdoc(7) police: C types should be declared with either .Ft or .Vt. 2001-02-08 10:22:35 +00:00
Maxim Sobolev
a06f15e4b8 Fix a f^Hdamn typo, which prevented to fopen() more that 17 files at once.
Tested by:	knu, sobomax and other #bsdcode'rs
2001-02-07 17:34:48 +00:00
Ruslan Ermilov
46eea498da mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged.  With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
2001-02-07 13:45:30 +00:00
Jeroen Ruigrok van der Werven
525c3eb1cf Add list.h to the to be installed header files. 2001-02-06 22:27:16 +00:00
Jeroen Ruigrok van der Werven
2fa72ea7d4 Fix typo: compatability -> compatibility.
Compatability is not an existing english word.
2001-02-06 12:05:58 +00:00
Jeroen Ruigrok van der Werven
a3573c6679 Fix typo: compatability -> compatibility.
Compatability is not an existing english word.

Add $FreeBSD$.
2001-02-06 12:04:54 +00:00
Jeroen Ruigrok van der Werven
9a01d32bfd Fix typo: seperate -> separate.
Seperate does not exist in the english language.

Submitted to look at by:	kris
2001-02-06 10:39:38 +00:00
Bruce Evans
3ffb2fd399 Fixed prototype of logout() (const poisoning). 2001-02-06 01:06:25 +00:00
Bruce Evans
1a7d8d0695 Fixed prototypes. About half of them were wrong (mainly due to const
poisoning having not reached here).
2001-02-06 01:02:59 +00:00
Bruce Evans
ea81d4327f Added used include of <sys/cdefs.h>.
Declare all the interfaces documented in usb.3 (2 were missing).
2001-02-06 00:54:00 +00:00
Bruce Evans
fc80017420 Fixed C error(s) in synopsis. 2001-02-06 00:02:32 +00:00
Bruce Evans
3a6d3fb0cd Fixed wrong return type for ftpLoginAf() in synopsis. 2001-02-05 23:58:59 +00:00
Bruce Evans
c38fecdd5c Fixed bitrot in prototype(s) in synopsis. 2001-02-05 23:56:05 +00:00
Bruce Evans
14e6355f02 Fixed errors in prototypes. Many were hiding under mdoc errors. 2001-02-05 15:24:34 +00:00
Bruce Evans
75d5d29ef0 Fixed C error(s) in synopsis. Many were hiding under mdoc errors. 2001-02-05 15:19:56 +00:00
Bruce Evans
c4e091fcc4 Fixed errors in prototypes. Many were hiding under mdoc errors. 2001-02-05 15:11:09 +00:00
Bruce Evans
e84a6580c6 Fixed C error(s) in synopsis. Many were hiding under mdoc errors. 2001-02-05 15:00:21 +00:00
Bruce Evans
60babc5565 Don't install links for crypt.3 here. There is no crypt.3 here...
Forgotten in:	rev.1.58, which was not Submitted by: bde (I requested
                untangling parts of the crypto mess).
2001-02-05 14:55:14 +00:00
Poul-Henning Kamp
95ba77bff8 Remove a sizeof(void *) == sizeof(int) assumption.
Submitted by:	Loren James Rittle <rittle@latour.rsch.comm.mot.com>
2001-02-04 10:06:24 +00:00
Stephen McKay
48492d6b26 Spelling. 2001-02-04 02:05:16 +00:00
Jacques Vidrine
e31b3502a1 strcpy -> strlcpy paranoia
Submitted by:	Mike Heffner <mheffner@vt.edu>
Reviewed by:	freebsd-audit
2001-02-02 13:22:43 +00:00
Nik Clayton
7b79d3ab37 Fix typo.
PR:             docs/23936
Submitted by:   Garret Rooney <rooneg@rpi.edu>
2001-02-02 03:32:03 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Daniel Eischen
f8a19b12fb s/_thread_sys_write/__sys_write/
Submitted by:	Mike Heffner <mheffner@vt.edu>
2001-01-31 02:16:57 +00:00
Daniel Eischen
f47892a9f7 Unbreak world by correctly specifying the prototype for __sys_aio_suspend.
A make buildworld was done but not with the committed pthread_private.h.

Reported by:	Manfred Antar <null@pozo.com>
2001-01-29 18:59:53 +00:00
Brian Somers
435ff15c3b Add a few ``const''s to silence some -Wwrite-strings warnings 2001-01-29 11:44:13 +00:00
Daniel Eischen
221b1e69c5 _exit in libc is now __sys_exit not __sys__exit.
Add another check for thread library initialization (jdp, we
really need a way to get _thread_init called at program start
before any constructors are run).
2001-01-29 03:24:23 +00:00
Daniel Eischen
c37592a194 Clean up syscall generation in libc by removing HIDDEN_SYSCALLS
and treating (almost) all system calls the same way:

	__sys_foo - actual syscall
	foo, _foo - weak definitions to __sys_foo

Change PSEUDO syscalls (currently only _exit and _getlogin) to
be __sys_foo (T) and _foo (W).

Add $FreeBSD$ to a few files to satisfy commitprep.

Suggested by:	bde
2001-01-29 03:23:46 +00:00
Brian Somers
4834b77d04 Ignore leading witespace in the string given to PacketAliasProxyRule(). 2001-01-29 00:30:01 +00:00
Jeroen Ruigrok van der Werven
dd46afd299 Update Makefile for the new sources. 2001-01-28 23:14:16 +00:00
Brian Somers
f169f2f020 Call trimdomain properly for ip4 addresses.
PR:	24659
realhostname_sa() stuff submitted by: Jim.Pirzyk@disney.com
2001-01-28 21:51:25 +00:00
Hajimu UMEMOTO
7d55135d06 s/err1/errx/.
http://X68000.startshop.co.jp/~68user/cgi-bin/wwwboard.cgi?log=1673

Obtained from:	KAME
2001-01-26 13:46:40 +00:00
Daniel Eischen
f3e8cfe5ef Comment only change; s/_thread_sys_/__sys_/ 2001-01-26 02:41:07 +00:00
Daniel Eischen
c701da2b6e Comment change only; s/_thread_sys_/__sys_/ 2001-01-26 02:27:06 +00:00
Maxim Sobolev
ac6468bd08 Don't hardcode geometry of VESA_800x600 raster text mode (80x25). Instead save
actual geometry before switching to the graphics mode.
2001-01-25 16:58:46 +00:00
Nicolas Souchu
e28bc5f477 Set properly the PixelBytes field for 8bits modes.
Submitted by:	Maxim Sobolev <sobomax@FreeBSD.org>
2001-01-25 11:01:20 +00:00
Daniel Eischen
75f7221ee6 -pthread -> -lc_r 2001-01-24 13:41:04 +00:00
Daniel Eischen
e5106342c6 Add weak definitions for wrapped system calls. In general:
_foo - wrapped system call
	foo - weak definition to _foo

and for cancellation points:

	_foo - wrapped system call
	__foo - enter cancellation point, call _foo(), leave
	        cancellation point
	foo - weak definition to __foo

Change use of global _thread_run to call a function to get the
currently running thread.

Make all pthread_foo functions weak definitions to _pthread_foo,
where _pthread_foo is the implementation.  This allows an application
to provide its own pthread functions.

Provide slightly different versions of pthread_mutex_lock and
pthread_mutex_init so that we can tell the difference between
a libc mutex and an application mutex.  Threads holding mutexes
internal to libc should never be allowed to exit, call signal
handlers, or cancel.

Approved by:	-arch
2001-01-24 13:03:38 +00:00
Daniel Eischen
d201fe46e3 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
John Baldwin
6d3e7b9b0b Add a new item to kinfo_proc: ki_sflag to mirror p_sflag. 2001-01-24 12:49:52 +00:00
Maxim Sobolev
0e2fa3bb50 Protect against multiple inclusion. 2001-01-24 09:06:42 +00:00
Maxim Sobolev
5c9a541b66 Minor fixes:
- Use "OPOST | ONLCR" as a c_oflag in the raw mode instead of 0, which should
  make debug output mode readable;
- flush input buffer when switching to/from raw mode. This should prevent
  leaking raw scancodes into your shell prompt when program called
  VGLKeyboardEnd() w/o processing all scancodes in the buffer.
2001-01-24 09:05:35 +00:00
Garrett Wollman
24b11d6ec6 I made a last-minute change before the last commit which broke
the errno semantics.  Get it (closer to) right this time.
2001-01-23 17:36:07 +00:00
Ruslan Ermilov
9715c87b3b mdoc(7) police: replaced empty line with .Pp, updated document date. 2001-01-23 08:41:38 +00:00
Garrett Wollman
08f825912f Add a couple of new library interfaces (will be activated when the
relavant header file changes are committed) for POSIX support.
2001-01-23 04:49:39 +00:00
Kirk McKusick
a9dc3bacfa Add the function sysctlnametomib to libc. Details on the semantics
and use of this function have been added to the sysctl.3 manual page.
2001-01-23 03:40:32 +00:00
Garrett Wollman
8b43deacb3 Revert rev. 1.27. This file only included <sys/select.h> because of
brokenness introduced in <sys/select.h> rev. 1.8 which is now OBE.
<sys/tty.h> and <sys/selinfo.h> together do the right thing.
2001-01-20 03:02:46 +00:00
Ruslan Ermilov
c5083414f8 mdoc(7) police: removed leading whitespaces that are not inside
Bd/Ed; these hardly degrade the quality of the produced output.
2001-01-19 14:15:40 +00:00
Ruslan Ermilov
1abae7ee85 man(7) -> mdoc(7). 2001-01-18 12:56:17 +00:00
Ben Smithurst
b83c969d48 Document EHOSTDOWN error.
PR:		24410
Submitted by:	Martin Horcicka <horcicka@vol.cz>
2001-01-17 21:02:50 +00:00