|
|
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:
1.1.1.5 ! root 11: echo 'Finding header files:'
! 12: cd /usr/include
! 13: files=`find . -print`
! 14: echo 'Checking header files:'
! 15: for file in $files; do
! 16: if egrep -s '[ ]_IO[A-Z]*\(|#define._IO|CTRL' $file; then
! 17: echo Fixing $file
! 18: if [ -r $file ]; then
! 19: cp $file ${LIB}/$file >/dev/null 2>&1 \
! 20: || (mkdir `dirname ${LIB}/$file` \
! 21: && cp $file ${LIB}/$file) \
! 22: || echo "Can't copy $file"
! 23: chmod +w ${LIB}/$file
! 24: ex ${LIB}/$file <<EOF
! 25: g/[ ]_IO[A-Z]*(/s/(\(.\),/('\1',/
! 26: g/#define._IO/s/'x'/x/g
! 27: g/CTRL[ ]*(/s/\(.\))/'\1')/
! 28: g/#define.CTRL/s/'c'/c/g
! 29: wq
! 30: EOF
! 31: fi
1.1.1.2 root 32: fi
33: done
34:
1.1 root 35:
1.1.1.5 ! root 36: # Fix one other error in this file: a mismatched quote not inside a C comment.
! 37: file=sundev/vuid_event.h
! 38: if [ -r $file ]; then
! 39: if [ ! -r ${LIB}/$file ]; then
! 40: cp $file ${LIB}/$file >/dev/null 2>&1 \
! 41: || (mkdir `dirname ${LIB}/$file` \
! 42: && cp $file ${LIB}/$file) \
! 43: || echo "Can't copy $file"
1.1.1.3 root 44: chmod +w ${LIB}/$file
1.1.1.2 root 45: fi
1.1.1.5 ! root 46: fi
1.1.1.4 root 47:
1.1.1.5 ! root 48: if [ -r ${LIB}/sundev/vuid_event.h ]; then
! 49: echo Fixing sundev/vuid_event.h comment
! 50: ex ${LIB}/sundev/vuid_event.h <<EOF
! 51: g/doesn't/s/doesn't/doesn''t/
! 52: wq
1.1 root 53: EOF
1.1.1.5 ! root 54: fi
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.