Commit Graph

4430 Commits

Author SHA1 Message Date
deischen
bf10167082 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
06a2f1b109 Mention PROT_NONE in the list of possible protections.
Pointed out by:	kris
2001-02-11 19:30:41 +00:00
nik
fcd90bc751 Include mmap(2) in the list of memory allocation functions.
Reviewed by:	hackers
2001-02-11 19:28:36 +00:00
nik
958d489b0f .Xr to mmap. 2001-02-11 18:53:50 +00:00
nik
2b76ec25ed 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
061878a62c 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
phantom
ac10647302 Don't use hardcoded struct size, use offsetof() instead (make size calculations
dynamic)
2001-02-11 15:09:31 +00:00
phantom
ab85419d42 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
phantom
92d7c2b389 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
phantom
41acb133d9 Use "namespace.h" and "un-namespace.h"
Requested by:	deischen
2001-02-10 19:57:26 +00:00
phantom
2df9db1d04 . 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
nyan
2a3692f18f Use ${MACHINE_ARCH} instead of ${MACHINE} to support pc98. 2001-02-10 13:11:02 +00:00
ru
fe82b1f4d3 mdoc(7) police: polishing. 2001-02-10 10:51:39 +00:00
ru
88f1741804 mdoc(7) police: mark LC_NUMERIC with .Dv. 2001-02-10 10:26:52 +00:00
nik
cbbe2c7314 Improve language and code examples.
PR:             docs/24961
Submmitted by:  Tony Finch <dot@dotat.at>
2001-02-10 07:48:01 +00:00
obrien
fc70ad10bb There are now compat libs for the Alpha too. 2001-02-10 07:07:09 +00:00
obrien
d37cf74ffa The compat[34]x dists need to have their machine arch appended. 2001-02-10 07:06:40 +00:00
obrien
f5928d97c9 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
obrien
be13498bb4 Look to the future and make this easier to add libs to. 2001-02-10 06:53:31 +00:00
obrien
486cc7e34c Reformat the lib list. 2001-02-10 06:44:18 +00:00
ache
88e0ba5ec8 Note that decimal point taken from locale 2001-02-10 06:42:32 +00:00
obrien
247d96fbb4 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
ache
c0bd992a1a Note that decimal point taken from locale (SUSv2) 2001-02-10 06:32:03 +00:00
obrien
af4a58c15f Reformat the lib list. 2001-02-10 06:32:02 +00:00
obrien
6e4907023f 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
obrien
fa6aebd2a1 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
ache
60ea5ba446 Take decimal point from locale instead of hardcoded '.' (SUSv2) 2001-02-10 06:25:33 +00:00
ache
794037e8d0 Note that decimal point character taken from locale (SUSv2) 2001-02-10 05:52:59 +00:00
ache
5776262f6c Use decimal point from localeconv() instead of hardcoded '.' (SUSv2) 2001-02-10 05:46:05 +00:00
ache
d158cad1b5 Note the fact that decimal point taken from locale (according to SUSv2) 2001-02-10 05:16:41 +00:00
ache
e77c6214bc Use decimap_point from localeconv() instead of hardcoded '.'
Obtained from:	inspired by NetBSD strtod
2001-02-10 05:05:09 +00:00
ache
a39b160dc8 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
ache
6ebcae89a2 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
ache
fff0a78dc6 Use __XSTRING(CHAR_MAX) instead of "127" and strtol() base 0 to parse it (0x7f) 2001-02-10 02:00:56 +00:00
ache
9ada75f6ed 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
ache
e6bdf6249e 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
ache
227e1b581f Implement CODESET 2001-02-09 22:43:39 +00:00
tegge
a6c2a1d602 Backout previous commit. Use of spinlocks was not approved.
PR:		15070
2001-02-09 20:31:48 +00:00
nik
ceb48e2e89 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
ac4d1398b0 Add relevant libraries from our ref4 box.
Approved by:	jkh
2001-02-09 18:59:39 +00:00
murray
c39d730f94 Add compat4x.i386 directory.
Approved by:	jkh
2001-02-09 18:59:02 +00:00
ache
9266c40d60 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
ache
483600e500 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
ru
99b8869871 mdoc(7) police: prevent generation of the extra
whitespace after ``i.e.'', use .Rv, update .Dd.
2001-02-09 12:47:23 +00:00
ru
68af71a7e2 mdoc(7) police: fixed the weird construct. 2001-02-09 09:08:53 +00:00
ache
c8bc0b6daa Hardcode c_fmt in a different way since used in nl_langinfo now 2001-02-08 20:55:38 +00:00
tegge
330a36514c 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
phantom
ecd3986783 add lmonetary.?, lnumeric.?, ldpart.?, lmessages.?, nl_langinfo.c
remove lconv.c
2001-02-08 17:13:24 +00:00
phantom
fea4f4e613 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
phantom
7df1f0e106 Catch up to latest chanage in timelocal structures exporting. 2001-02-08 17:08:13 +00:00