r12831: add 'extern' to public prototypes
authorStefan Metzmacher <metze@samba.org>
Tue, 10 Jan 2006 16:54:21 +0000 (16:54 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:50:03 +0000 (13:50 -0500)
metze
(This used to be commit d4d2f011e2ba11dee67aa6933a75bb6088f92fc0)

source4/script/mkproto.pl

index 1b2a9d355abbf56e068087ed903721160cfd724c..2332cb06abb6a0edf0dafc0a60278d6265ab26b7 100755 (executable)
@@ -120,6 +120,7 @@ sub process_file($$$)
 
        while (my $line = <FH>) {             
                my $target = $private_file;
+               my $is_public = 0;
 
                # these are ordered for maximum speed
                next if ($line =~ /^\s/);
@@ -128,11 +129,12 @@ sub process_file($$$)
 
                next if ($line =~ /^\/|[;]/);
 
-               if ($line =~ s/^_PUBLIC_[\t ]//) {
+               if ($line =~ s/^_PUBLIC_[\t ]/extern /) {
                        $target = $public_file;
+                       $is_public = 1;
                }
 
-               next unless ( $line =~ /
+               next unless ( $is_public || $line =~ /
                              ^void|^BOOL|^int|^struct|^char|^const|^\w+_[tT]\s|^uint|^unsigned|^long|
                              ^NTSTATUS|^ADS_STATUS|^enum\s.*\(|^DATA_BLOB|^WERROR|^XFILE|^FILE|^DIR|
                              ^double|^TDB_CONTEXT|^TDB_DATA|^TALLOC_CTX|^NTTIME|^FN_|^init_module|