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