talloc:mksyms: allow characters after closing functions parenthesis.
[amitay/samba.git] / source3 / script / mksyms.awk
index a30bea4d340ba7b8ad2d4e8d8c391a25be68d735..94a405ca689ff8741a8b188df27be210efb378f6 100644 (file)
@@ -4,7 +4,7 @@
 # Extract symbols to export from C-header files.
 # output in version-script format for linking shared libraries.
 #
-# Copyright (C) 2008 Micheal Adam <obnox@samba.org>
+# Copyright (C) 2008 Michael Adam <obnox@samba.org>
 #
 BEGIN {
        inheader=0;
@@ -28,7 +28,7 @@ END {
                current_file=FILENAME
        }
        if (inheader) {
-               if (match($0,"[)][ \t]*[;][ \t]*$")) {
+               if (match($0,"[)][^()]*[;][ \t]*$")) {
                        inheader = 0;
                }
                next;
@@ -57,10 +57,10 @@ END {
        }
 }
 
-/[_A-Za-z0-9]+[ \t]*[(].*[)][ \t]*;[ \t]*$/ {
+/[_A-Za-z0-9]+[ \t]*[(].*[)][^()]*;[ \t]*$/ {
        sub(/[(].*$/, "");
        gsub(/[^ \t]+[ \t]+/, "");
-       gsub(/^[*]/, "");
+       gsub(/^[*]+/, "");
        printf "\t\t%s;\n",$0;
        next;
 }