if [ -r ${LIB}/$file ]; then
echo Fixing $file
- sed -e "s/\(#[ ]*\(ifndef\)[ ]*\)__wchar_t/\1_GCC_WCHAR_T/" \
- -e "s/\(#[ ]*\(define\)[ ]*\)__wchar_t/\1_GCC_WCHAR_T/" \
+ sed -e "s/\(#[ ]*ifndef[ ]*\)__wchar_t/\1_GCC_WCHAR_T/" \
+ -e "s/\(#[ ]*define[ ]*\)__wchar_t/\1_GCC_WCHAR_T/" \
${LIB}/$file > ${LIB}/${file}.sed
rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
if cmp $file ${LIB}/$file >/dev/null 2>&1; then
fi
done
+# These files in ARM/RISCiX use /**/ to concatenate tokens.
+for file in arm/as_support.h arm/mc_type.h arm/xcb.h dev/chardefmac.h \
+ dev/ps_irq.h dev/screen.h dev/scsi.h sys/tty.h \
+ X11/extensions/multibufst.h X11/Xmd.h X11/Xlibinit.h \
+ Xm.acorn/XmP.h
+do
+ if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+ cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
+ chmod +w ${LIB}/$file 2>/dev/null
+ chmod a+r ${LIB}/$file 2>/dev/null
+ fi
+
+ if [ -r ${LIB}/$file ]; then
+ sed -e 's|/\*\*/|##|g' ${LIB}/$file > ${LIB}/${file}.sed
+ rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+ if cmp $file ${LIB}/$file >/dev/null 2>&1; then
+ rm -f ${LIB}/$file
+ fi
+ fi
+done
+
echo 'Removing unneeded directories:'
cd $LIB
files=`find . -type d -print | sort -r`