]> granicus.if.org Git - curl/commitdiff
symbol-scan.pl: detect duplicates
authorDaniel Stenberg <daniel@haxx.se>
Fri, 18 Mar 2011 14:42:58 +0000 (15:42 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Mar 2011 14:42:58 +0000 (15:42 +0100)
Test 1119 now also makes sure that symbols-in-versions doesn't contain
any duplicates

tests/symbol-scan.pl

index cda9b73831eda35bdd84b957ac2112ccea9b6ac2..279053cb95a567b6fd31b9b9591a0e0697f738e9 100644 (file)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010-2011, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -82,6 +82,11 @@ open S, "<$root/docs/libcurl/symbols-in-versions";
 while(<S>) {
     if(/(^CURL[^ \n]*) *(.*)/) {
         my ($sym, $rest)=($1, $2);
+        if($doc{$sym}) {
+            print "Detected duplicate symbol: $sym\n";
+            $misses++;
+            next;
+        }
         $doc{$sym}=$sym;
         my @a=split(/ +/, $rest);
         if($a[2]) {