Destroy the evidence of my misunderstanding of the specification.

Also fix up the phrasing in the man page a bit.
This commit is contained in:
wollman 2001-02-21 19:31:53 +00:00
parent bb9ee8e09f
commit 11947dbc7d
2 changed files with 2 additions and 29 deletions

View File

@ -46,11 +46,11 @@
.Sh DESCRIPTION
The
.Nm
utility outputs the value of
utility prints the value of a
.Tn POSIX
or
.Tn X/Open
system or path configuration variable on the standard output.
system or path configuration variable to the standard output.
If the specified variable is undefined, the string
.Dq Li undefined
is output.
@ -142,20 +142,5 @@ The
.Nm
command first appeared in
.Fx 5.0 .
.Sh BUGS
The original
.Tn X/Open
specification erroneously requires the return values of
.Xr pathconf 2
and
.Xr sysconf 3
to be printed using the
.Xr printf 3
format specifier
.Li \&"%d" .
We ignore that aspect of the specification and use the
correct
.Li \&"%ld"
format.
.Sh AUTHORS
.An Garrett A. Wollman Aq wollman@lcs.mit.edu

View File

@ -136,12 +136,6 @@ do_sysconf(const char *name, int key)
else if (value == -1)
printf("undefined\n");
else
/*
* SUSv2 specifies that the value, if defined, is to be
* printed using the format "%d\n". This is clearly
* erroneous, since sysconf is defined to return a long
* and not an int.
*/
printf("%ld\n", value);
}
@ -157,11 +151,5 @@ do_pathconf(const char *name, int key, const char *path)
else if (value == -1)
printf("undefined\n");
else
/*
* SUSv2 specifies that the value, if defined, is to be
* printed using the format "%d\n". This is clearly
* erroneous, since sysconf is defined to return a long
* and not an int.
*/
printf("%ld\n", value);
}