--- gcc/fixincludes 2018/04/24 16:44:56 1.1.1.4 +++ gcc/fixincludes 2018/04/24 16:46:51 1.1.1.6 @@ -8,45 +8,49 @@ # 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 -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 -for file in sys/mtio.h sys/vcmd.h sys/des.h \ - vaxuba/qvioctl.h \ - sun/dkio.h sun/fbio.h sun/gpio.h sun/ndio.h \ - sundev/kbio.h sundev/msio.h sundev/fpareg.h sundev/mcpcmd.h \ - sundev/msreg.h sundev/vuid_event.h sunwindow/win_ioctl.h; do - if [ -r /usr/include/$file ]; then - cp /usr/include/$file ${LIB}/$file - chmod +w ${LIB}/$file - ex ${LIB}/$file </dev/null 2>&1 \ + || (mkdir `dirname ${LIB}/$file` \ + && cp $file ${LIB}/$file) \ + || echo "Can't copy $file" + chmod +w ${LIB}/$file + ex ${LIB}/$file </dev/null 2>&1 \ + || (mkdir `dirname ${LIB}/$file` \ + && cp $file ${LIB}/$file) \ + || 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 <