Commit Graph

1177 Commits

Author SHA1 Message Date
Stefan Farfeleder
4eae39bfdf Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +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
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
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
Dag-Erling Smørgrav
7688459683 ANSIfy and constify; this now builds with GCC 3.4. 2004-07-28 11:56:03 +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
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
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
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
Ruslan Ermilov
1c5f1e7afd Fixed markup. 2004-07-07 20:11:35 +00:00
David Schultz
b03b864ac9 Add implementations of ftw(3) and nftw(3) and the corresponding header
ftw.h.  This is the implementation written by Joel Baker
<fenton@debian.org> for inclusion in NetBSD, but with several
bugfixes.

Obtained from:	Debian
2004-07-05 23:13:16 +00:00
David Schultz
c8f7bbe36b Documentation for ftw(3) and nftw(3).
Obtained from:	OpenBSD
2004-07-05 23:12:11 +00:00
Ruslan Ermilov
51f98e585b Fix the NAME section making whatis(1) happy in particular. 2004-07-05 17:12:53 +00:00
Ruslan Ermilov
30950a21e1 Eliminate double whitespace. 2004-07-03 22:30:10 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Ruslan Ermilov
d37ea99837 Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
Ruslan Ermilov
26b6c45a92 Markup tidying. 2004-07-02 16:45:56 +00:00
Ruslan Ermilov
33992dc0ed Markup, grammar, and spelling fixes. 2004-06-30 20:09:10 +00:00
Tim J. Robbins
b7114d4a9c Fix typo: WRDE_DOOFS -> WRDE_DOOFFS.
Noticed by:	Stoned Elipot
2004-06-30 13:55:08 +00:00
Mike Pritchard
811815574d Spelling fixes. 2004-06-21 19:30:45 +00:00
David Schultz
1e03bff7f2 In fts_build(), if we try to chdir and fail (e.g. due to lack of search
permission), try to continue in FTS_DONTCHDIR mode.  Of course this
won't work for long paths, but we can't descend more than one pathname
component beyond the directory anyway if we lack search permission.

Here is a transcript demonstrating the change, where oldls is ls(1)
linked with the old fts(3):

	das@VARK:~> mkdir t && touch t/{a,b,c} && chmod u-x t
	das@VARK:~> oldls t
	a       b       c
	das@VARK:~> oldls -l t
	das@VARK:~> \ls t
	a       b       c
	das@VARK:~> \ls -l t
	ls: a: Permission denied
	ls: b: Permission denied
	ls: c: Permission denied

I had forgotten about this patch until bde reminded me.  He reports
using it without problems for over a year.

PR:	45723
2004-06-08 06:23:23 +00:00
Yaroslav Tykhiy
35641ec00f Finally document the option to avoid zombie creation
through ignoring SIGCHLD.
2004-06-07 11:01:39 +00:00
Peter Pentchev
c56864a7a7 Fix the ordering in the description of the dlsym() lookup procedure to
reflect src/libexec/rtld-elf/rtld.c rev. 1.68 - the globally-loaded
objects (RTLD_GLOBAL) are searched before the local object's DAG's.

PR:		62770
Submitted by:	Kimura Fuyuki <fuyuki@nigredo.org>
2004-06-03 10:13:26 +00:00
Tim J. Robbins
95a535af6d Change the signature of ftok from (const char *, char) to (const char *, int)
Obtained from:	NetBSD (christos)
2004-06-01 06:53:07 +00:00
Yaroslav Tykhiy
d0080709e7 Clarify and extend paragraphs on interoperation
of fcntl(2), flock(2), and lockf(3) advisory locks.
Add such a paragraph to the flock(2) manpage for the
sake of consistency.

Reviewed by:	Cyrille Lefevre and Kirk McKusick on -arch
MFC after:	2 weeks
2004-05-17 23:09:10 +00:00
Tim Kientzle
9b8f137b2d getgrent() and friends should set errno if there is an error.
Also, clarify the manpage description of when errno is set and
explain that clients should set errno=0 first if they want useful
error information.
2004-05-17 22:15:49 +00:00
Tim Kientzle
5edb850fbe POSIX prohibits any library function from setting errno to 0.
Correct my previous commit and add a comment to the manpage
indicating that the user must set errno to 0 if they wish to
distinguish "no such user" from "error".

Pointed out by: Jacques Vidrine (nectar@)
2004-05-17 18:27:05 +00:00
Tim Kientzle
b4cc8687ad If getpwent/getpwuid/getpwnam return NULL, they must also set errno. 2004-05-17 06:17:59 +00:00
Bruce Evans
a1acdbf008 Fixed some minor style bugs. 2004-05-13 15:59:38 +00:00
Peter Edwards
07dee1a777 Fix some^Wseveral style bugs from last commit.
Remove "sys/types.h" as "sys/param.h" is already included

Use cast rather than back-pointer to convert from public to private
version of FTS data, and so avoid littering fts.h with any of the
details.

Pointed out By: bde, kientzle
2004-05-12 21:38:39 +00:00
Diomidis Spinellis
857b57eae1 Remove a trailing newline, to behave as documented in syslog(3):
"A trailing newline is added if none is present."

The code in syslogd, stderr, and console output always adds a newline
at the EOL.  However, the existing code never actually removed a
trailing newline, and apparently relied on syslogd to convert it
into a space character.  Thus, the existing newline was converted
to a trailing space at the EOL by syslogd, while stderr, and console
output resulted in an empty line.

MFC after:	2 weeks
2004-05-10 17:12:52 +00:00
Bruce Evans
d98d9ce623 Fixed style bugs in previous commit (bogus forward declaration and
inconsistent capitalization in comments).
2004-05-10 09:36:26 +00:00
Christian Brueffer
b17e85fede o fix a sentence to match with the synopsis [1]
o fix grammar nit

PR:		66289 [1]
Submitted by:	Michel Lavondès <fox@vader.aacc.cc.md.us>
Obtained from:	OpenBSD [1]
MFC after:	3 days
2004-05-09 11:11:21 +00:00
Peter Edwards
99ca5b8804 The FTS_NOSTAT option is an optimisation that reduces the number
of stat(2) calls by keeping an eye of the number of links a directory
has. It assumes that each subdirectory will have a hard link to its
parent, to represent the ".." node, and stops calling stat(2) when
all links are accounted for in a given directory.

This assumption is really only valid for UNIX-like filesystems: A
concrete example is NTFS. The NTFS "i-node" does contain a link
count, but most/all directories have a link count between 0 and 2
inclusive. The end result is that find on an NTFS volume won't
actually traverse the entire hierarchy of the directories passed
to it. (Those with a link count of two are not traversed at all)

The fix checks the "UFSness" of the filesystem before enabling the
optimisation.

Reviewed By: Tim Kientzle (kientzle@)
2004-05-08 15:09:02 +00:00
Tim Kientzle
542fc1042b A minor refactoring to simplify portability: assign the filename
length to a separate variable so that it will be easier to adapt to
systems that don't have d_namlen in struct dirent.
2004-05-05 06:33:00 +00:00
David Schultz
38d17374b2 When *printf() and *scanf() are compiled without floating-point
support, fmtcheck() should not accept format strings that contain
floating-point formats.
2004-05-02 10:55:05 +00:00
Ruslan Ermilov
d1ec91e353 Markup nit. 2004-04-27 09:18:49 +00:00
Jonathan Chen
dbb4b1c83d Fix a bug that could result in getpw*() incorrectly returning NULL when NIS
adjunct maps are used.  One symtom of this bug is sshd saying:
	login_get_lastlog: Cannot find account for uid X
when logging in.  The problem here is caused by an incorrect reuse of the rv
variable when previous values are needed later.
2004-04-21 21:15:08 +00:00