Commit fc5c2df8 by Richard Stallman

(regexp.h): Don't add a getrnge declaration if a conflicting

declaration is already present.

From-SVN: r2823
parent 30c08fcc
...@@ -467,6 +467,10 @@ fi ...@@ -467,6 +467,10 @@ fi
# Add a `static' declaration of `getrnge' into <regexp.h>. # Add a `static' declaration of `getrnge' into <regexp.h>.
# Don't do this if there is already a `static void getrnge' declaration
# present, since this would cause a redeclaration error. Solaris 2.x has
# such a declaration.
file=regexp.h file=regexp.h
base=`basename $file` base=`basename $file`
if [ -r ${LIB}/$file ]; then if [ -r ${LIB}/$file ]; then
...@@ -480,22 +484,26 @@ else ...@@ -480,22 +484,26 @@ else
fi fi
if [ \! -z "$file_to_fix" ]; then if [ \! -z "$file_to_fix" ]; then
echo Checking $file_to_fix echo Checking $file_to_fix
cp $file_to_fix /tmp/$base if grep "static void getrnge" $file_to_fix > /dev/null; then
chmod +w /tmp/$base true
ex /tmp/$base <<EOF else
/^static int[ ]*size;/c cp $file_to_fix /tmp/$base
chmod +w /tmp/$base
ex /tmp/$base <<EOF
/^static int[ ]*size;/c
static int size ; static int size ;
static int getrnge (); static int getrnge ();
. .
wq wq
EOF EOF
if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \
echo No change needed in $file_to_fix No change needed in $file_to_fix
else else
echo Fixed $file_to_fix echo Fixed $file_to_fix
rm -f ${LIB}/$file rm -f ${LIB}/$file
cp /tmp/$base ${LIB}/$file cp /tmp/$base ${LIB}/$file
fi
fi fi
rm -f /tmp/$base rm -f /tmp/$base
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment