=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cpp/cpp.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/cpp/cpp.sh 2003/06/03 02:56:07 1.6 --- src/usr.bin/cpp/cpp.sh 2004/02/10 02:02:22 1.7 *************** *** 1,5 **** #!/bin/sh ! # $OpenBSD: cpp.sh,v 1.6 2003/06/03 02:56:07 millert Exp $ # # Copyright (c) 1990 The Regents of the University of California. --- 1,5 ---- #!/bin/sh ! # $OpenBSD: cpp.sh,v 1.7 2004/02/10 02:02:22 espie Exp $ # # Copyright (c) 1990 The Regents of the University of California. *************** *** 40,50 **** # doesn't search gcc-include # PATH=/usr/bin:/bin ! ALST="-traditional -$ -D__GNUC__" ! NSI=no OPTS="" INCS="-nostdinc" ! FOUNDFILES=no CPP=/usr/libexec/cpp if [ ! -x $CPP ]; then --- 40,52 ---- # doesn't search gcc-include # PATH=/usr/bin:/bin ! TRAD=-traditional ! DGNUC="-D__GNUC__" ! STDINC="-I/usr/include" ! DOLLAR="@dollaropt@" OPTS="" INCS="-nostdinc" ! FOUNDFILES=false CPP=/usr/libexec/cpp if [ ! -x $CPP ]; then *************** *** 62,76 **** case $A in -nostdinc) ! NSI=yes ;; -traditional) ;; -I*) INCS="$INCS $A" ;; -U__GNUC__) ! ALST=`echo $ALST | sed -e s/-D__GNUC__//` ;; -imacros|-include|-idirafter|-iprefix|-iwithprefix) INCS="$INCS '$A' '$1'" --- 64,82 ---- case $A in -nostdinc) ! STDINC= ;; -traditional) + TRAD=-traditional ;; + -notraditional) + TRAD= + ;; -I*) INCS="$INCS $A" ;; -U__GNUC__) ! DGNUC= ;; -imacros|-include|-idirafter|-iprefix|-iwithprefix) INCS="$INCS '$A' '$1'" *************** *** 80,104 **** OPTS="$OPTS '$A'" ;; *) ! FOUNDFILES=yes ! if [ $NSI = "no" ] ! then ! INCS="$INCS -I/usr/include" ! NSI=skip ! fi ! eval $CPP $ALST $INCS $OPTS $A || exit $? ;; esac done ! if [ $FOUNDFILES = "no" ] then # read standard input ! if [ $NSI = "no" ] ! then ! INCS="$INCS -I/usr/include" ! fi ! eval exec $CPP $ALST $INCS $OPTS fi exit 0 --- 86,101 ---- OPTS="$OPTS '$A'" ;; *) ! FOUNDFILES=true ! eval $CPP $TRAD $DGNUC $DOLLAR $INCS $STDINC $OPTS $A || exit $? ;; esac done ! if ! $FOUNDFILES then # read standard input ! eval exec $CPP $TRAD $DGNUC $DOLLAR $INCS $STDINC $OPTS fi exit 0