From ccd4b479dcec23c8b260ebf1de3df67014c778ce Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 27 Jan 2001 02:27:46 +0000 Subject: Update. * conform/conformtest.pl: Implement optional-type. * resolv/netdb.h: Include not . Include only if __USE_MISC. Include 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. --- conform/conformtest.pl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'conform/conformtest.pl') 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"; -- cgit 1.4.1