patch-for-solaris (715B)
1 #!/usr/xpg4/bin/sh 2 3 patchit () { 4 if head -n 1 $1 | grep -qF -- -e ; then 5 echo '#!/usr/xpg4/bin/sh -e' > $1.tmp 6 else 7 echo '#!/usr/xpg4/bin/sh' > $1.tmp 8 fi 9 tail -n +2 $1 >> $1.tmp 10 mv -f $1.tmp $1 11 chmod 0755 $1 12 } 13 14 # Solaris doesn't understand POSIX.1-2008 either. 15 sed -e 's/XOPEN_SOURCE=700/XOPEN_SOURCE=600/' < configure > configure.tmp 16 mv -f configure.tmp configure 17 18 patchit ./configure 19 patchit ./tools/install.sh 20 patchit ./tools/gen-deps.sh 21 patchit ./tools/gen-types.sh 22 patchit ./tools/gen-types-internal.sh 23 patchit ./tools/gen-bits.sh 24 patchit ./tools/gen-sysdepsh.sh 25 26 echo 'SHELL := /usr/xpg4/bin/sh' > Makefile.tmp 27 echo >> Makefile.tmp 28 cat Makefile >> Makefile.tmp 29 mv -f Makefile.tmp Makefile