1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

Added -D_ANSI_SOURCE as discussed with bde,

removed bogus -trigraph (pointed out by bde),
included check of operands (suggested by joerg)
This commit is contained in:
Wolfgang Helbig 1997-10-05 18:44:37 +00:00
parent 4a3b1f84ff
commit ff0894cf3c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30128

View File

@ -24,7 +24,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id: c89.sh,v 1.1.1.1 1997/09/17 20:44:53 joerg Exp $
# $Id: c89.sh,v 1.2 1997/09/18 20:55:50 joerg Exp $
#
# This is the Posix.2 mandated C compiler. Basically, a hook to the
# cc(1) command.
@ -36,6 +36,8 @@ usage()
exit 64
}
_PARAMS="$@"
while getopts "cD:EgI:L:o:OsU:" opt
do
case $opt in
@ -47,11 +49,25 @@ do
esac
done
if [ $(($OPTIND - 1)) = $# ]
shift $(($OPTIND - 1))
if [ $# = "0" ]
then
echo "Missing operand" 1>&2
usage
fi
exec cc -ansi -pedantic -trigraphs "$@"
while [ $# != "0" ]
do
case $1 in
-l* | *.a | *.c | *.o)
shift
;;
*)
echo "Invalid operand" 1>&2
usage
;;
esac
done
exec cc -ansi -pedantic -D_ANSI_SOURCE $_PARAMS