diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-27 00:15:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-27 00:15:16 +0000 |
commit | 12b64309cfa2289e57d439ec9f2d645c59f7bcf1 (patch) | |
tree | 84decd88094c35982eda3eb6354a495c900d09c2 /conform/conformtest.pl | |
parent | a7927149a1e2070fbcf182d80133f42c0638a1ae (diff) | |
download | glibc-12b64309cfa2289e57d439ec9f2d645c59f7bcf1.tar glibc-12b64309cfa2289e57d439ec9f2d645c59f7bcf1.tar.gz glibc-12b64309cfa2289e57d439ec9f2d645c59f7bcf1.tar.bz2 glibc-12b64309cfa2289e57d439ec9f2d645c59f7bcf1.zip |
Update.
* conform/conformtest.pl: Implement optional-macro.
* conform/data/math.h-data: Update for XPG6.
* math/math.h (HUGE): Define as FLT_MAX value but don't use
FLT_MAX. Don't include <float.h>.
(MAXFLOAT): Likewise.
* math/math.h: Define MATH_ERRNO and MATH_ERREXCEPT.
Diffstat (limited to 'conform/conformtest.pl')
-rw-r--r-- | conform/conformtest.pl | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/conform/conformtest.pl b/conform/conformtest.pl index 6aade40c55..cfb23f2602 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -361,7 +361,7 @@ while ($#headers >= 0) { $res = compiletest ($fnamebase, "Testing for constant $const", "NOT PRESENT", $res, 1); - if ($value ne "") { + if ($value ne "" && $res == 0) { # Generate a program to test for the value of this constant. open (TESTFILE, ">$fnamebase.c"); print TESTFILE "$prepend"; @@ -373,7 +373,7 @@ while ($#headers >= 0) { $res = runtest ($fnamebase, "Testing for value of constant $const", "Constant \"$const\" has not the right value.", $res); } - } elsif (/^constant *([a-zA-Z0-9_]*) ([>=<]+) ([A-Za-z0-9_]*)/) { + } elsif (/^constant *([a-zA-Z0-9_]*) *([>=<]+) ([A-Za-z0-9_]*)/) { my($const) = $1; my($op) = $2; my($value) = $3; @@ -464,7 +464,7 @@ while ($#headers >= 0) { $res = compiletest ($fnamebase, "Testing for constant $const", "NOT PRESENT", $res, 1); - if ($value ne "") { + if ($value ne "" && $res == 0) { # Generate a program to test for the value of this constant. open (TESTFILE, ">$fnamebase.c"); print TESTFILE "$prepend"; @@ -726,6 +726,56 @@ while ($#headers >= 0) { $res = runtest ($fnamebase, "Testing for value of macro $macro", "Macro \"$macro\" has not the right value.", $res); + } elsif (/^optional-macro *([^ ]*)/) { + my($macro) = "$1"; + + # Remember that this name is allowed. + push @allow, $macro; + + # Generate a program to test for availability of this macro. + open (TESTFILE, ">$fnamebase.c"); + print TESTFILE "$prepend"; + print TESTFILE "#include <$h>\n"; + print TESTFILE "#ifndef $macro\n"; + print TESTFILE "# error \"Macro $macro not defined\"\n"; + print TESTFILE "#endif\n"; + close (TESTFILE); + + compiletest ($fnamebase, "Test availability of macro $macro", + "NOT PRESENT", $missing, 1); + } elsif (/^macro *([a-zA-Z0-9_]*) *([>=<]+) ([A-Za-z0-9_]*)/) { + my($macro) = "$1"; + my($op) = $2; + my($value) = $3; + my($res) = $missing; + + # Remember that this name is allowed. + push @allow, $macro; + + # Generate a program to test for availability of this macro. + open (TESTFILE, ">$fnamebase.c"); + print TESTFILE "$prepend"; + print TESTFILE "#include <$h>\n"; + print TESTFILE "#ifndef $macro\n"; + print TESTFILE "# error \"Macro $macro not defined\"\n"; + print TESTFILE "#endif\n"; + close (TESTFILE); + + $res = compiletest ($fnamebase, "Test availability of macro $macro", + "Macro \"$macro\" is not available.", $res, 0); + + if ($value ne "") { + # Generate a program to test for the value of this constant. + open (TESTFILE, ">$fnamebase.c"); + print TESTFILE "$prepend"; + print TESTFILE "#include <$h>\n"; + # Negate the value since 0 means ok + print TESTFILE "int main (void) { return !($macro $op $value); }\n"; + close (TESTFILE); + + $res = runtest ($fnamebase, "Testing for value of constant $macro", + "Macro \"$macro\" has not the right value.", $res); + } } elsif (/^macro *([^ ]*)/) { my($macro) = "$1"; |