|
|
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.4 ! root 41: # Fix one other error in this file: a mismatched quote not inside a C comment.
! 42: ex ${LIB}/sundev/vuid_event.h <<EOF
! 43: g/doesn't/s/doesn't/doesn''t/
! 44: wq
! 45:
1.1.1.3 root 46: cp /usr/include/sys/ttychars.h ${LIB}/sys/ttychars.h
47: chmod +w ${LIB}/sys/ttychars.h
48: ex ${LIB}/sys/ttychars.h << EOF
1.1 root 49: g/CTRL/s/(\(.\))/('\1')/
50: g/#define.CTRL/s/'c'/c/g
51: wq
52: EOF
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.