Commit Graph

2389 Commits

Author SHA1 Message Date
obrien
6d5d306d77 Fix FreeBSD id style breakage from rev 1.17 2001-03-05 10:30:12 +00:00
obrien
4455d367fd Use our standard .c rcsid format. 2001-03-05 10:21:05 +00:00
obrien
fcfc5287a6 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
obrien
e5aa652797 Correct a comment. 2001-03-05 10:00:57 +00:00
obrien
9486bd5024 Fix style breakage in rev 1.3 2001-03-05 09:33:08 +00:00
obrien
fc92ac095a Fix style bug that was introduced. 2001-03-05 09:21:44 +00:00
ache
42b02a510e 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
ache
8242002fcf Actually implement T_FMT_AMPM 2001-03-02 22:12:19 +00:00
ache
e4ea20c3a0 Implement ampm_fmt (%r) per POSIX 2001-03-02 22:10:04 +00:00
ru
0d436c8d9c Removed duplicate $FreeBSD$. 2001-03-02 13:00:26 +00:00
ru
7275ff87ea 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
deischen
0b681e5fda 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
deischen
efe84f0830 s/fstat/_fstat/
Approved by:	phantom
2001-03-01 04:59:01 +00:00
obrien
ac7e3b1218 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
ru
0b7f07b8e5 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
jlemon
c423db30e9 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
ru
af53167ba5 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
ache
51e220082c 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
obrien
3cdfa59ee2 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
ru
91c8023e63 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
obrien
9890a827d4 Impliment the ISO-C99 strto[u]ll()
and rewrite strto[u]q() in terms of it.
2001-02-27 13:33:07 +00:00
ru
4c73555a60 Use ``.St -p1003.[12]''. 2001-02-26 16:12:39 +00:00
ru
f0fc971abb Use ``.St -p1003.1g''. 2001-02-26 16:08:15 +00:00
ru
bf982093d7 Use ``.St -p1003.1-96''. 2001-02-26 15:16:43 +00:00
ru
79b387319c /^\.St/ s/-iso9945-1/-p1003.1-96/ 2001-02-26 14:48:38 +00:00
ru
0b6fcafa7e `.St -p1003.1b'' -> `.St -p1003.1b-93''. 2001-02-26 14:33:54 +00:00
ru
f2ef0fa6fe .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
jasone
5ec7f1a58c Document the EINTR error. 2001-02-26 09:38:01 +00:00
ru
410cbe5afd mdoc(7) police: use .Vt macro. 2001-02-26 09:15:17 +00:00
ru
0b8c9cff2d Prepare for mdocNG. 2001-02-26 09:05:48 +00:00
jlemon
d03253e304 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
olgeni
868cd470b4 Fix my ambiguous message about ECONNABORTED.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2001-02-25 23:56:41 +00:00
olgeni
d6ad47f58b Add ECONNABORTED to the ERRORS section. 2001-02-25 22:12:40 +00:00
tegge
5996b6cbc7 Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
phantom
0b95729f10 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
green
c13abd3c6b 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
green
42a0d6aa76 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
green
78d4c24cd2 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
peter
444ebb8209 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
phantom
0048882c9c cleanup commentaries 2001-02-19 19:09:00 +00:00
ume
d06c8a8880 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
ache
703ab4ba84 Deal properly with "0" 2001-02-19 06:19:51 +00:00
asmodai
a667ae6c5c Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
kris
29f7e1407b Back out snprintf -> sprintf change until I have time to look at it. 2001-02-18 04:07:50 +00:00
ache
deeb685ccf CRNCYSTR: determine '.' too 2001-02-17 11:15:30 +00:00
ache
f0f13bd854 Implement CRNCYSTR 2001-02-17 07:35:01 +00:00
imp
c10bf83024 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
imp
5e10e50b59 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
tegge
2793a9d7f9 Don't depend on lcl_mutex being a recursive mutex.
Reviewed by:	deischen
2001-02-15 22:17:04 +00:00
tegge
38ec42f445 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