Annotation of gcc/fixincludes, revision 1.1.1.3

1.1.1.2   root        1: #! /bin/sh
1.1       root        2: # Install modified versions of certain ANSI-incompatible system header files
                      3: # which are fixed to work correctly with ANSI C
                      4: # and placed in a directory that GNU C will search.
                      5: # This works properly on a Sun in system version 3.4;
                      6: # for other versions, you had better check.
                      7: 
1.1.1.3 ! root        8: # Directory in which to store the results.
        !             9: LIB=/usr/local/lib/gcc-include
        !            10: 
        !            11: mkdir ${LIB}
1.1.1.2   root       12: for dir in sys sun sundev sunwindow; do
                     13:   if [ -d /usr/include/$dir ]; then
1.1.1.3 ! root       14:     mkdir ${LIB}/$dir
1.1.1.2   root       15:   fi
                     16: done
                     17: 
1.1.1.3 ! root       18: cp /usr/include/sys/ioctl.h ${LIB}/sys/ioctl.h
        !            19: chmod +w ${LIB}/sys/ioctl.h
        !            20: ex ${LIB}/sys/ioctl.h <<EOF
1.1       root       21: g/_IO/s/(\(.\),/('\1',/
                     22: g/#define._IO/s/'x'/x/g
                     23: wq
                     24: EOF
                     25: 
1.1.1.2   root       26: for file in sys/mtio.h sys/vcmd.h sys/des.h  \
                     27:            vaxuba/qvioctl.h \
                     28:            sun/dkio.h sun/fbio.h sun/gpio.h sun/ndio.h  \
                     29:             sundev/kbio.h sundev/msio.h sundev/fpareg.h sundev/mcpcmd.h  \
                     30:            sundev/msreg.h sundev/vuid_event.h sunwindow/win_ioctl.h; do
                     31:   if [ -r /usr/include/$file ]; then
1.1.1.3 ! root       32:     cp /usr/include/$file ${LIB}/$file
        !            33:     chmod +w ${LIB}/$file
        !            34:     ex ${LIB}/$file <<EOF
1.1.1.2   root       35:     g/_IO/s/(\(.\),/('\1',/
                     36:     wq
                     37: EOF
                     38:   fi
                     39: done
                     40: 
1.1.1.3 ! root       41: cp /usr/include/sys/ttychars.h ${LIB}/sys/ttychars.h
        !            42: chmod +w ${LIB}/sys/ttychars.h
        !            43: ex ${LIB}/sys/ttychars.h << EOF
1.1       root       44: g/CTRL/s/(\(.\))/('\1')/
                     45: g/#define.CTRL/s/'c'/c/g
                     46: wq
                     47: EOF

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.