declared.sh: Fix bug with variables of pointer type.
authorBruno Haible <bruno@clisp.org>
Wed, 6 Feb 2019 01:41:49 +0000 (02:41 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 6 Feb 2019 01:41:49 +0000 (02:41 +0100)
* build-aux/declared.sh (sed_extract_extern_declared): Allow the space
before the symbol to be omitted if the preceding character is a '*'.

ChangeLog
build-aux/declared.sh

index c2fa684bdab56ef1ae8dea9046ca6e85f7dc2f09..2392d68bd8bea3aa4e60522c6fecea8ecef91afa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-02-05  Bruno Haible  <bruno@clisp.org>
+
+       declared.sh: Fix bug with variables of pointer type.
+       * build-aux/declared.sh (sed_extract_extern_declared): Allow the space
+       before the symbol to be omitted if the preceding character is a '*'.
+
 2019-02-04  Bruno Haible  <bruno@clisp.org>
 
        Add script for running tests under valgrind.
index f3279571b7f848e9933ee5a1f7d9f0fdb16c8acf..e606661ca52873e2fb6b445a001cd463c1bbdd50 100755 (executable)
@@ -130,7 +130,7 @@ sed_join_multiline_externs='
 }'
 
 # A sed expression that extracts the identifier of each 'extern' declaration.
-sed_extract_extern_declared='s/^extern [^()]* \([A-Za-z_][A-Za-z0-9_]*\) *[;(].*$/\1/p'
+sed_extract_extern_declared='s/^extern [^()]*[ *]\([A-Za-z_][A-Za-z0-9_]*\) *[;(].*$/\1/p'
 
 sed -e "$sed_remove_comments" \
   | sed -e "$sed_join_multiline_externs" \