ORIG_DIR=`pwd`
-# Make LIB absolute.
-cd $LIB; LIB=`pwd`
+# Make LIB absolute if it is relative.
+# Don't do this if not necessary, since may screw up automounters.
+case $LIB in
+/*)
+ ;;
+*)
+ cd $LIB; LIB=`${PWDCMD-pwd}`
+ ;;
+esac
echo 'Building fixincludes in ' ${LIB}
echo 'Checking header files:'
for file in $files; do
if egrep '!__STDC__' $file >/dev/null; then
- echo Fixing $file
if [ -r $file ]; then
cp $file $2/$file >/dev/null 2>&1 || echo "Can't copy $file"
chmod +w $2/$file
mv $2/$file.sed $2/$file
if cmp $file $2/$file >/dev/null 2>&1; then
rm $2/$file
+ else
+ echo Fixed $file
fi
fi
fi