mirror of
https://sourceware.org/git/glibc.git
synced 2025-09-02 16:01:20 +03:00
Update.
1999-10-19 Andreas Jaeger <aj@suse.de> * include/bits/ipc.h: Remove K&R compatibility. * include/libintl.h: Likewise. * include/math.h: Likewise. * include/mntent.h: Likewise * include/netdb.h: Likewise. * include/pwd.h: Likewise. * include/sched.h: Likewise. * include/shadow.h: Likewise * include/stdlib.h: Likewise. * include/sys/file.h: Likewise. * include/sys/gmon.h: Likewise. * include/sys/ioctl.h: Likewise. * include/sys/mman.h: Likewise. * include/sys/resource.h: Likewise. * include/sys/socket.h: Likewise. * include/sys/stat.h: Likewise. * include/sys/sysinfo.h: Likewise. * include/sys/time.h: Likewise. * include/sys/times.h: Likewise. * include/sys/uio.h: Likewise. * include/sys/wait.h: Likewise. * include/termios.h: Likewise. * include/time.h: Likewise. * include/ulimit.h: Likewise. * include/utmp.h: Likewise. * include/wchar.h: Likewise. * include/wctype.h: Likewise. 1999-10-19 Andreas Jaeger <aj@suse.de> * math/libm-test.inc: Remove one K&R compatibility. (main): Enable nexttoward_test. * math/gen-libm-test.pl (output_ulps): Output name of Ulps file to libm-test-ulps.h; pretty print output a bit. 1999-10-19 Andreas Jaeger <aj@suse.de> * iconv/iconv_prog.c (main): Set exit value in case that reading from stdin failed [PR libc/1404].
This commit is contained in:
@@ -33,7 +33,7 @@ use vars qw (%ulps %failures);
|
||||
use vars qw (%beautify);
|
||||
use vars qw ($output_dir $ulps_file);
|
||||
|
||||
%beautify =
|
||||
%beautify =
|
||||
( "minus_zero" => "-0",
|
||||
"plus_zero" => "+0",
|
||||
"minus_infty" => "-inf",
|
||||
@@ -97,7 +97,7 @@ $count = 0;
|
||||
|
||||
&parse_ulps ($ulps_file);
|
||||
&generate_testfile ($input, $output);
|
||||
&output_ulps ("${output_dir}libm-test-ulps.h");
|
||||
&output_ulps ("${output_dir}libm-test-ulps.h", $ulps_file);
|
||||
&print_ulps_file ("${output_dir}NewUlps") if ($opt_n);
|
||||
|
||||
# Return a nicer representation
|
||||
@@ -142,8 +142,8 @@ sub build_complex_beautify {
|
||||
sub get_variable {
|
||||
my ($number) = @_;
|
||||
|
||||
return "x" if ($number == 1);
|
||||
return "y" if ($number == 2);
|
||||
return "x" if ($number == 1);
|
||||
return "y" if ($number == 2);
|
||||
return "z" if ($number == 3);
|
||||
# return x1,x2,...
|
||||
$number =-3;
|
||||
@@ -186,7 +186,7 @@ sub special_functions {
|
||||
my (@args, $str, $test, $cline);
|
||||
|
||||
@args = split /,\s*/, $args;
|
||||
|
||||
|
||||
unless ($args[0] =~ /sincos/) {
|
||||
die ("Don't know how to handle $args[0] extra.");
|
||||
}
|
||||
@@ -202,7 +202,7 @@ sub special_functions {
|
||||
$cline = " check_float (\"$test\", sin_res, $args[2]";
|
||||
$cline .= &new_test ($test, $args[4]);
|
||||
print $file $cline;
|
||||
|
||||
|
||||
# handle cos
|
||||
$test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res';
|
||||
$cline = " check_float (\"$test\", cos_res, $args[3]";
|
||||
@@ -261,7 +261,7 @@ sub parse_args {
|
||||
$call .= ')';
|
||||
$str = "$call == ";
|
||||
|
||||
# Result
|
||||
# Result
|
||||
@descr = split //,$descr_res;
|
||||
foreach (@descr) {
|
||||
if ($_ =~ /f|i|l|L/) {
|
||||
@@ -382,7 +382,7 @@ sub parse_args {
|
||||
my ($str) = "$call sets x to $special[0]";
|
||||
$post = " check_float (\"$str\", x, $special[0]";
|
||||
$post .= &new_test ($str, undef);
|
||||
}
|
||||
}
|
||||
} elsif ($args[0] eq 'remquo') {
|
||||
if (defined $special[0] && $special[0] ne "IGNORE") {
|
||||
my ($str) = "$call sets x to $special[0]";
|
||||
@@ -390,7 +390,7 @@ sub parse_args {
|
||||
$post .= &new_test ($str, undef);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print $file $pre if (defined $pre);
|
||||
|
||||
print $file " $cline\n";
|
||||
@@ -500,7 +500,7 @@ sub print_ulps {
|
||||
# Clean up a floating point number
|
||||
sub clean_up_number {
|
||||
my ($number) = @_;
|
||||
|
||||
|
||||
# Remove trailing zeros
|
||||
$number =~ s/0+$//;
|
||||
$number =~ s/\.$//;
|
||||
@@ -586,21 +586,23 @@ sub output_test {
|
||||
|
||||
# Print include file
|
||||
sub output_ulps {
|
||||
my ($file) = @_;
|
||||
my ($file, $ulps_filename) = @_;
|
||||
my ($i, $fct);
|
||||
|
||||
open ULP, ">$file" or die ("Can't open $file: $!");
|
||||
|
||||
print ULP "/* This file is automatically generated.\n";
|
||||
print ULP "/* This file is automatically generated\n";
|
||||
print ULP " from $ulps_filename with gen-libm-test.pl.\n";
|
||||
print ULP " Don't change it - change instead the master files. */\n\n";
|
||||
|
||||
print ULP "\n/* Maximal error of functions. */\n";
|
||||
foreach $fct (@functions) {
|
||||
output_test (\*ULP, $fct, $fct);
|
||||
}
|
||||
|
||||
print ULP "\n/* Error of single function calls. */\n";
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
output_test (\*ULP, $tests[$i], $i);
|
||||
}
|
||||
close ULP;
|
||||
}
|
||||
|
||||
|
@@ -2969,7 +2969,7 @@ nextafter_test (void)
|
||||
END (nextafter);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
static void
|
||||
nexttoward_test (void)
|
||||
{
|
||||
@@ -2993,7 +2993,6 @@ nexttoward_test (void)
|
||||
|
||||
END (nexttoward);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
@@ -3706,7 +3705,7 @@ static const struct argp_option options[] =
|
||||
static const char doc[] = "Math test suite: " TEST_MSG ;
|
||||
|
||||
/* Prototype for option handler. */
|
||||
static error_t parse_opt __P ((int key, char *arg, struct argp_state *state));
|
||||
static error_t parse_opt (int key, char *arg, struct argp_state *state);
|
||||
|
||||
/* Data structure to communicate with argp functions. */
|
||||
static struct argp argp =
|
||||
@@ -3884,7 +3883,7 @@ main (int argc, char **argv)
|
||||
/* Manipulation functions: */
|
||||
copysign_test ();
|
||||
nextafter_test ();
|
||||
// nexttoward_test ();
|
||||
nexttoward_test ();
|
||||
|
||||
/* maximum, minimum and positive difference functions */
|
||||
fdim_test ();
|
||||
|
Reference in New Issue
Block a user