aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-27 19:45:21 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-27 19:45:21 +0000
commit257abbe2e31a500ee871075e3c8c486c4289c375 (patch)
treec45d1987ab8ae0c57ee11d3d6a11b8be00fcecbf
parent2ff458ebe647b5aba45d3b8f49ea76d2d993d5db (diff)
downloadglibc-257abbe2e31a500ee871075e3c8c486c4289c375.zip
glibc-257abbe2e31a500ee871075e3c8c486c4289c375.tar.gz
glibc-257abbe2e31a500ee871075e3c8c486c4289c375.tar.bz2
Update.
* conform/data/sys/shm.h-data: SHMLBA is not required to by a constant. * conform/conformtest.pl: Implement handling of symbol.
-rw-r--r--ChangeLog3
-rw-r--r--conform/conformtest.pl31
-rw-r--r--conform/data/sys/shm.h-data2
3 files changed, 35 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e2e5c8..7b1c32a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2001-01-27 Ulrich Drepper <drepper@redhat.com>
+ * conform/data/sys/shm.h-data: SHMLBA is not required to by a constant.
+ * conform/conformtest.pl: Implement handling of symbol.
+
* signal/signal.h: Fix handling of __need_* symbols.
* misc/sys/select.c: Define fd_set here. Remove __fd_set. Define
fd_mask only if __USE_MISC. Declare pselect for __USE_XOPEN2K.
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index b0220f5..f7c5368 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -546,6 +546,37 @@ while ($#headers >= 0) {
$res = runtest ($fnamebase, "Testing for value of constant $const",
"Constant \"$const\" has not the right value.", $res);
}
+ } elsif (/^symbol *([a-zA-Z0-9_]*) *([A-Za-z0-9_]*)?/) {
+ my($symbol) = $1;
+ my($value) = $2;
+ my($res) = $missing;
+
+ # Remember that this name is allowed.
+ push @allow, $symbol;
+
+ # Generate a program to test for the availability of this constant.
+ open (TESTFILE, ">$fnamebase.c");
+ print TESTFILE "$prepend";
+ print TESTFILE "#include <$h>\n";
+ print TESTFILE "void foobarbaz (void) {\n";
+ print TESTFILE "__typeof__ ($symbol) a = $symbol;\n";
+ print TESTFILE "}\n";
+ close (TESTFILE);
+
+ $res = compiletest ($fnamebase, "Testing for symbol $symbol",
+ "Symbol \"$symbol\" 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";
+ print TESTFILE "int main (void) { return $symbol != $value; }\n";
+ close (TESTFILE);
+
+ $res = runtest ($fnamebase, "Testing for value of symbol $symbol",
+ "Symbol \"$symbol\" has not the right value.", $res);
+ }
} elsif (/^typed-constant *([a-zA-Z0-9_]*) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*)?/) {
my($const) = $1;
my($type) = "$3$4";
diff --git a/conform/data/sys/shm.h-data b/conform/data/sys/shm.h-data
index a08d6f5..cac0163 100644
--- a/conform/data/sys/shm.h-data
+++ b/conform/data/sys/shm.h-data
@@ -1,5 +1,5 @@
constant SHM_RDONLY
-constant SHMLBA
+symbol SHMLBA
constant SHM_RND
type shmatt_t