diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-27 02:27:46 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-27 02:27:46 +0000 |
commit | ccd4b479dcec23c8b260ebf1de3df67014c778ce (patch) | |
tree | 848eaa036f9fc55acf2144cc3c01f57c51806f99 /conform/conformtest.pl | |
parent | 12b64309cfa2289e57d439ec9f2d645c59f7bcf1 (diff) | |
download | glibc-ccd4b479dcec23c8b260ebf1de3df67014c778ce.tar.gz glibc-ccd4b479dcec23c8b260ebf1de3df67014c778ce.tar.xz glibc-ccd4b479dcec23c8b260ebf1de3df67014c778ce.zip |
Update.
* conform/conformtest.pl: Implement optional-type. * resolv/netdb.h: Include <netinet/in.h> not <sys/socket.h>. Include <rpc/netdb.h> only if __USE_MISC. Include <stdint.h> instead of defining uint32_t here. Define IPPORT_RESERVED. (struct hostent): Type of h_length element is int. (getnameinfo): Type of flags parameter is unsigned int. * inet/getnameinfo.c (getnameinfo): flags argument is unsigned. * conform/data/netdb.h-data: Add many missing definitions.
Diffstat (limited to 'conform/conformtest.pl')
-rw-r--r-- | conform/conformtest.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/conform/conformtest.pl b/conform/conformtest.pl index cfb23f2602..6ac72af460 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -546,6 +546,30 @@ while ($#headers >= 0) { $res = runtest ($fnamebase, "Testing for value of constant $const", "Constant \"$const\" has not the right value.", $res); } + } elsif (/^optional-type *({([^}]*)|([a-zA-Z0-9_]*))/) { + my($type) = "$2$3"; + + # Remember that this name is allowed. + if ($type =~ /^struct *(.*)/) { + push @allow, $1; + } elsif ($type =~ /^union *(.*)/) { + push @allow, $1; + } else { + push @allow, $type; + } + + # Remember that this name is allowed. + push @allow, $type; + + # 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 "$type *a;\n"; + close (TESTFILE); + + compiletest ($fnamebase, "Testing for type $type", + "Type \"$type\" not available.", $missing, 1); } elsif (/^type *({([^}]*)|([a-zA-Z0-9_]*))/) { my($type) = "$2$3"; |