summaryrefslogtreecommitdiff
path: root/source4/script/find_unused_defines.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-06-24 00:07:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:43 -0500
commit3022bfef70f4d76d3a12cfb8ee8cbdc72644b58f (patch)
treeb3b1d9084178dd546e04114b4c67f807b34a11e6 /source4/script/find_unused_defines.pl
parent3e476207765df4387bc89206316b95dfed251dd7 (diff)
downloadsamba-3022bfef70f4d76d3a12cfb8ee8cbdc72644b58f.tar.gz
samba-3022bfef70f4d76d3a12cfb8ee8cbdc72644b58f.tar.bz2
samba-3022bfef70f4d76d3a12cfb8ee8cbdc72644b58f.zip
r7859: Merge a few scripts to one script that checks for the following unused
(used in configure.in, but their output is never used) autoconf macros: - AC_DEFINE - AC_CHECK_FUNC - AC_CHECK_FUNCS - AC_CHECK_HEADER - AC_CHECK_HEADERS (This used to be commit 897d7b7d390815778adea1adf5e73b94f75a3048)
Diffstat (limited to 'source4/script/find_unused_defines.pl')
-rwxr-xr-xsource4/script/find_unused_defines.pl30
1 files changed, 0 insertions, 30 deletions
diff --git a/source4/script/find_unused_defines.pl b/source4/script/find_unused_defines.pl
deleted file mode 100755
index def1bd159f..0000000000
--- a/source4/script/find_unused_defines.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-# Script that reads in configure and outputs the names of all the defines
-# it defines that are used nowhere in the code
-
-# Arguments:
-# 1: configure.in
-# 2: C files pattern
-
-my %symbols;
-
-# First, make a list of defines in configure
-$in = shift;
-
-while($tmp = shift) {
- open(FI, $tmp);
- while(<FI>) {
- while(/([A-Za-z0-9_]+)/sgm) {
- $symbols{$1} = 1;
- }
- }
- close FI;
-}
-
-open(IN, $in) or die("Can't open $in");
-
-while(<IN>) {
- if(/AC_DEFINE\(([^,]+),/ and $symbols{$1} != 1) { print "$1\n"; }
-}
-
-close IN;