--- gcc/fixincludes 2018/04/24 16:44:56 1.1.1.4 +++ gcc/fixincludes 2018/04/24 16:49:34 1.1.1.9 @@ -8,45 +8,54 @@ # Directory in which to store the results. LIB=/usr/local/lib/gcc-include -mkdir ${LIB} -for dir in sys sun sundev sunwindow; do - if [ -d /usr/include/$dir ]; then - mkdir ${LIB}/$dir - fi +echo 'Making directories:' +cd /usr/include +files=`find . -type d -print` +for file in $files; do + mkdir $LIB/$file > /dev/null 2>&1 done -cp /usr/include/sys/ioctl.h ${LIB}/sys/ioctl.h -chmod +w ${LIB}/sys/ioctl.h -ex ${LIB}/sys/ioctl.h </dev/null 2>&1 \ + || echo "Can't copy $file" + chmod +w ${LIB}/$file + ex ${LIB}/$file </dev/null 2>&1; then + echo Deleting ${LIB}/$file\; no fixes were needed. + rm ${LIB}/$file + fi + fi fi done + # Fix one other error in this file: a mismatched quote not inside a C comment. -ex ${LIB}/sundev/vuid_event.h </dev/null 2>&1 \ + || echo "Can't copy $file" + chmod +w ${LIB}/$file + fi +fi -cp /usr/include/sys/ttychars.h ${LIB}/sys/ttychars.h -chmod +w ${LIB}/sys/ttychars.h -ex ${LIB}/sys/ttychars.h << EOF -g/CTRL/s/(\(.\))/('\1')/ -g/#define.CTRL/s/'c'/c/g -wq +if [ -r ${LIB}/sundev/vuid_event.h ]; then + echo Fixing sundev/vuid_event.h comment + ex ${LIB}/sundev/vuid_event.h <