#!/bin/bash
# The script comments the cygwin includes from the newlib header files.
# This is required because, they generate lot of dependency scan errors 
# in HEW.
# Prerequisites:  
# 					         Created on: 08/04/2004

CURRENT_DIR=`pwd`
cd $NEWLIBSRCDIR
cd $DIR_TO_SEARCH
sed "/^.*\<cygwin\/.*$/s|^|\/\/|g" grp.h > grp.h
tempfile=temp.h
for file in `find . -name "*.h"`
	do sed "/^.*\<cygwin\/.*$/s|^|\/\/|g" $file > $tempfile
	mv $tempfile $file
done
rm -f $tempfile	

cd $CURRENT_DIR
