svn commit: samba r7861 - in branches/SAMBA_4_0/source/script: .

jelmer at samba.org jelmer at samba.org
Fri Jun 24 00:35:22 GMT 2005


Author: jelmer
Date: 2005-06-24 00:35:20 +0000 (Fri, 24 Jun 2005)
New Revision: 7861

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7861

Log:
Nicer output, remove some false warnings.

Modified:
   branches/SAMBA_4_0/source/script/configure_check_unused.pl


Changeset:
Modified: branches/SAMBA_4_0/source/script/configure_check_unused.pl
===================================================================
--- branches/SAMBA_4_0/source/script/configure_check_unused.pl	2005-06-24 00:18:20 UTC (rev 7860)
+++ branches/SAMBA_4_0/source/script/configure_check_unused.pl	2005-06-24 00:35:20 UTC (rev 7861)
@@ -62,13 +62,14 @@
 
 	open(FI, $in) or die("Can't open $in");
 	my $ln = 0;	
-	foreach(<FI>) { 
+	my $line;
+	foreach($line = <FI>) { 
 		$ln++;
-		foreach(/\#([ \t]*)include ["<]([^">]+)/g) { 
+		if ($line =~ /\#([ \t]*)include ["<]([^">]+)/) { 
 			$headers->{$2} = "$in:$ln";
 		}
 
-		foreach(/([A-Za-z0-9_]+)/g) { 
+		foreach($line =~ /([A-Za-z0-9_]+)/g) { 
 			$symbols->{$1} = "$in:$ln";
 		}
 	}
@@ -100,10 +101,11 @@
 (keys %ac_func_checks) or warn("No function checks found in configure.in file, parse error?");
 
 foreach (keys %ac_func_checks) {
+	my $def = "HAVE_".uc($_);
 	if (not defined($symbols{$_})) {
-		print "$ac_func_checks{$_}: Autoconf-checked function $_ is unused\n";
-	} elsif (not defined($symbols{"HAVE_".uc($_)})) {
-		print "$ac_func_checks{$_}: Autoconf-define for function $_ is unused\n";
+		print "$ac_func_checks{$_}: Autoconf-checked function `$_' is unused\n";
+	} elsif (not defined($symbols{$def})) {
+		print "$ac_func_checks{$_}: Autoconf-define `$def' for function `$_' is unused\n";
 	}
 }
 
@@ -113,8 +115,8 @@
 	my $def = "HAVE_".uc($_);
 	$def =~ s/[\/\.]/_/g;
 	if (not defined($headers{$_})) {
-		print "$ac_headers{$_}: Autoconf-checked header $_ is unused\n";
+		print "$ac_headers{$_}: Autoconf-checked header `$_' is unused\n";
 	} elsif (not defined($symbols{$def})) {
-		print "$ac_headers{$_}: Autoconf-define for header $_ is unused\n"; 
+		print "$ac_headers{$_}: Autoconf-define `$def' for header `$_' is unused\n"; 
 	}
 }



More information about the samba-cvs mailing list