* 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.
This commit is contained in:
Ulrich Drepper
2001-01-27 02:27:46 +00:00
parent 12b64309cf
commit ccd4b479dc
5 changed files with 100 additions and 18 deletions
+24
View File
@@ -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";