Commit Graph

120 Commits

Author SHA1 Message Date
kris
29f7e1407b Back out snprintf -> sprintf change until I have time to look at it. 2001-02-18 04:07:50 +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
phantom
54fd7f1296 catch up to __part_load_locale() interface change 2001-02-13 15:32:21 +00:00
phantom
44694affa1 Rewrite __time_load_locale() using ldpart.c::__part_load_locale()
Reviewed by:	ache
2001-02-12 08:53:33 +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
phantom
7df1f0e106 Catch up to latest chanage in timelocal structures exporting. 2001-02-08 17:08:13 +00:00
phantom
73100ca3ec 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
deischen
dd8c04d769 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
ru
b4fcb19df2 mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
ru
fb54000812 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ru
fe2efd38b3 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
kris
210f68b2a3 sprintf -> snprintf 2000-11-26 09:05:40 +00:00
nik
d251c705b9 Create the links for the reentrant time functions.
PR:		 docs/22644
Submitted by:	 andrew@ugh.net.au
2000-11-12 16:17:53 +00:00
ru
f9c7198049 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
ache
93c4f45cd8 For %c replace reference to asctime(3) with ctime(3) from which %c genetically
originates
2000-10-26 22:11:11 +00:00
ache
7ab12567f2 Treat c_fmt field as compatibility placeholder 2000-10-26 16:20:57 +00:00
ache
5b1f333950 Force "%c" to be ctime-compatible
Submitted by:	ru
2000-10-26 16:07:04 +00:00
ache
794ddd6b83 Force %c to be "%a %Ef %T %Y" to eliminate problems with bad c_fmt
Submitted by:	ru
2000-10-26 14:22:41 +00:00
ache
87aec923c2 Describe %c better
Submitted by:	ru (with modifications)
2000-10-24 15:37:48 +00:00
kris
815170b5ea Correct factor-of-10 error in INT_STRLEN_MAXIMUM() calculation. 2000-08-04 11:03:20 +00:00
ache
d39204da4b Fix assigning alt_month in compatibility code 2000-06-29 17:21:45 +00:00
phantom
7c1d534e81 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
cracauer
b637266b70 Temporary cosmetic change to prevent gcc-2.95.2 from doing an
optimization that generates code our current as doesn't understand.

The result is bad code that damages dynamic symbol locations at
runtime. Ouch. See PR bin/16862 and discussion in -current.

This change will be backed out when gcc and gas are back in sync.

PR:		Fixes bin/16862, but not the underlying problem.
Submitted by:	bde
Approved by:	jdk
2000-03-08 12:46:25 +00:00
sheldonh
0bd4857cef Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
joerg
e5566d28e6 There were so far only 42 different conversion specifications in
strftime(3), add another one. :)  %z yields the local timezone's offset
in hours and minutes, as used in RFC822 headers.  There's a precedence
for this in Lunux' libc, and Internet software (like Perl scripts)
start using it.

OKed by (wrt. the code freeze): jkh
2000-01-28 17:40:42 +00:00
jasone
495ec2dee2 Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo().  In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate.  In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().

Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().

Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().

Make thread cancellation fully POSIX-compliant.

Suggested by:	deischen
2000-01-27 23:07:25 +00:00
sheldonh
fc9f6552b9 Make the quotes in the #include line visible. 2000-01-19 13:27:03 +00:00
jasone
e200b118e2 Add three-tier symbol naming in support of POSIX thread cancellation
points.  For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep().  The arrows represent weak aliases.  For
system calls, the pattern is _read() <-- _libc_read() <-- read().
2000-01-12 09:23:48 +00:00
sheldonh
abfaf5defe Remove discussion of %C in the BUGS section. The limitations on valid
centuries are much more serious than those mentioned and this is not the
place to discuss the limitations of time_t.
1999-12-09 07:58:28 +00:00
sheldonh
3a2ea175f8 Prevent digit-gobbling for all but %l and %e, which can't be fixed.
Discuss in the BUGS section of the manpage, problems involved with
the use of %C, %e, %l, %p, %U and %W.

PR:		13901
Reported by:	scott@chronis.pobox.com
1999-12-08 15:49:10 +00:00
sheldonh
4f489f4245 Accept 12 for %l, because it's logical to expect "%l:%M" to work for
"12:00" and because strftime(3) does the same.
1999-12-08 11:11:40 +00:00
ache
5e217e6385 %Ex -> %Ef to not conflict with POSIX
Add %EF (long months name / day order)
Check that O and E not intermixed
Add missing POSIX extension to example
1999-11-30 19:24:07 +00:00
ache
544361cf80 Document %Ex and %OB 1999-11-30 18:37:36 +00:00
ache
3862f6435c Stricter checking %A vs %a 1999-11-30 08:11:13 +00:00
ache
e498e4247a Fix %C handling
Use locale for %c
Add %+
Add %Ex and %OB
1999-11-30 08:05:09 +00:00
ache
0f22f32fa2 Add %Ex extension to determine "%e %b" or "%b %e" order
Separate alternative for O and E cases
1999-11-30 07:33:37 +00:00
sheldonh
1a395d7546 Decremement by 1 the value taken for %j before assigning it to tm_yday,
which is zero-based.

Correct the range checking for the value taken for %S.

Add %w for the day of the week (0-6).

Accept (but do nothing with) %U and %W.  The comment for this change was
taken from NetBSD.

These changes were made after several failed attempts to contact the
author of our strptime.c .

PR:		10131
Submitted by:	tadf@kt.rim.or.jp (Tadayoshi Funaba)
1999-11-10 14:40:59 +00:00
ache
fc9900cdbf Add unsigned char cast to isupper 1999-11-04 04:40:56 +00:00
dt
27e2642cab Implement new format specifier for strftime: %OB, alternative national
representation of the full month name. In the Russian locale, this alternative
will be "nominative case", useful when the date designate month as a whole.
E.g. month heading in a calendar. I hope it can be useful for some other
locales too.

Discussed with:	wollman, ache
1999-09-11 21:35:21 +00:00
phantom
fb872bedf6 Spelling and grammar error fix.
mdoc(7)'fy.

PR:		docs/13406
Submitted by:	Garret Woolman <woolman@khavrinen.lcs.mit.edu>
Reviewed by:	mpp
1999-09-04 15:56:51 +00:00
peter
e226894fa0 $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
chris
610d1826b7 Add $Id$ tag. 1999-08-14 07:59:58 +00:00
chris
8abef875bc Bad reference time(2) changed to time(3) 1999-08-14 07:57:52 +00:00
nik
44f9c90d19 Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:50:10 +00:00
obrien
c51992c135 Make the new %Z addition thread-safe. 1999-07-06 05:05:39 +00:00
obrien
898c549e5a Actually impliment the documented %Z specifier. 1999-07-04 08:54:26 +00:00
steve
b93efa8e55 Spell the .St macro correctly.
PR:		11704
1999-06-07 03:59:56 +00:00
wes
f9147b7365 Re-fixed to start at 1969 per the actual Posix requirement. Also
fixed a typo on the man page.
1999-04-25 07:28:39 +00:00
wes
9cb0e0c840 Bring two-digit years up-to-date with POSIX requirements.
70-00 are intepreted in the 20th century; 01-69 in the
21st century.  (Yes, 2000 is the last year of the 20th
century, not the first year of the 21st.)

Submitted by:	Sergey Babkin <babkin@bellatlantic.net>
1999-04-25 01:42:18 +00:00
wollman
21cc793919 Merge from vendor branch: timezone file structure changes and doco.
Fix localtime.c to deal with new magic number field.

Obtained from: ftp://elsie.nci.nih.gov/pub/tzcode1999a.tar.gz
1999-01-21 17:22:59 +00:00