OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [gccbug.in] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
#!/bin/sh
#!/bin/sh
# Submit a problem report to a GNATS site.
# Submit a problem report to a GNATS site.
# Copyright (C) 1993, 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
# Copyright (C) 1993, 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
# Contributed by Brendan Kehoe (brendan@cygnus.com), based on a
# Contributed by Brendan Kehoe (brendan@cygnus.com), based on a
# version written by Heinz G. Seidl (hgs@cygnus.com).
# version written by Heinz G. Seidl (hgs@cygnus.com).
#
#
# This file is part of GNU GNATS.
# This file is part of GNU GNATS.
#
#
# GNU GNATS is free software; you can redistribute it and/or modify
# GNU GNATS is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# any later version.
#
#
# GNU GNATS is distributed in the hope that it will be useful,
# GNU GNATS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with GNU GNATS; see the file COPYING3.  If not see
# along with GNU GNATS; see the file COPYING3.  If not see
# .
# .
# The version of this send-pr.
# The version of this send-pr.
VERSION=3.113
VERSION=3.113
# The submitter-id for your site.
# The submitter-id for your site.
SUBMITTER=net
SUBMITTER=net
# The default mail address for PR submissions.
# The default mail address for PR submissions.
GNATS_ADDR=gcc-gnats@gcc.gnu.org
GNATS_ADDR=gcc-gnats@gcc.gnu.org
# The default release for this host.
# The default release for this host.
# We have to guess at what program_transform_name might have done.
# We have to guess at what program_transform_name might have done.
# "sed 1q" because neither "head -1" nor "head -n 1" is universal, argh.
# "sed 1q" because neither "head -1" nor "head -n 1" is universal, argh.
DEFAULT_GCC="`echo $0 | sed -e 's/bug//'`"
DEFAULT_GCC="`echo $0 | sed -e 's/bug//'`"
DEFAULT_RELEASE="`$DEFAULT_GCC --version | sed 1q`"
DEFAULT_RELEASE="`$DEFAULT_GCC --version | sed 1q`"
# The default organization.
# The default organization.
DEFAULT_ORGANIZATION=
DEFAULT_ORGANIZATION=
# What mailer to use.  This must come after the config file, since it is
# What mailer to use.  This must come after the config file, since it is
# host-dependent.
# host-dependent.
# Copied from cvsbug
# Copied from cvsbug
if [ -f /usr/sbin/sendmail ]; then
if [ -f /usr/sbin/sendmail ]; then
    MAIL_AGENT="/usr/sbin/sendmail -oi -t"
    MAIL_AGENT="/usr/sbin/sendmail -oi -t"
else
else
    MAIL_AGENT="/usr/lib/sendmail -oi -t"
    MAIL_AGENT="/usr/lib/sendmail -oi -t"
fi
fi
MAILER=`echo $MAIL_AGENT | sed -e 's, .*,,'`
MAILER=`echo $MAIL_AGENT | sed -e 's, .*,,'`
if [ ! -f "$MAILER" ] ; then
if [ ! -f "$MAILER" ] ; then
    echo "$COMMAND: Cannot file mail program \"$MAILER\"."
    echo "$COMMAND: Cannot file mail program \"$MAILER\"."
    echo "$COMMAND: Please fix the MAIL_AGENT entry in the $COMMAND file."
    echo "$COMMAND: Please fix the MAIL_AGENT entry in the $COMMAND file."
    exit 1
    exit 1
fi
fi
# How to read the passwd database.
# How to read the passwd database.
PASSWD="cat /etc/passwd"
PASSWD="cat /etc/passwd"
ECHON=bsd
ECHON=bsd
if [ $ECHON = bsd ] ; then
if [ $ECHON = bsd ] ; then
  ECHON1="echo -n"
  ECHON1="echo -n"
  ECHON2=
  ECHON2=
elif [ $ECHON = sysv ] ; then
elif [ $ECHON = sysv ] ; then
  ECHON1=echo
  ECHON1=echo
  ECHON2='\c'
  ECHON2='\c'
else
else
  ECHON1=echo
  ECHON1=echo
  ECHON2=
  ECHON2=
fi
fi
#
#
if [ -z "$TMPDIR" ]; then
if [ -z "$TMPDIR" ]; then
  TMPDIR=/tmp
  TMPDIR=/tmp
else
else
  if [ "`echo $TMPDIR | grep '/$'`" != "" ]; then
  if [ "`echo $TMPDIR | grep '/$'`" != "" ]; then
    TMPDIR="`echo $TMPDIR | sed -e 's,/$,,'`"
    TMPDIR="`echo $TMPDIR | sed -e 's,/$,,'`"
  fi
  fi
fi
fi
if [ @have_mktemp_command@ = yes ]; then
if [ @have_mktemp_command@ = yes ]; then
        TEMP0=`mktemp $TMPDIR/poXXXXXX` || exit 1
        TEMP0=`mktemp $TMPDIR/poXXXXXX` || exit 1
        TEMP=`mktemp $TMPDIR/pXXXXXX` || exit 1
        TEMP=`mktemp $TMPDIR/pXXXXXX` || exit 1
        BAD=`mktemp $TMPDIR/pbadXXXXXX` || exit 1
        BAD=`mktemp $TMPDIR/pbadXXXXXX` || exit 1
        REF=`mktemp $TMPDIR/pfXXXXXX` || exit 1
        REF=`mktemp $TMPDIR/pfXXXXXX` || exit 1
        REMOVE_TEMP="rm -f $TEMP0 $TEMP $BAD $REF"
        REMOVE_TEMP="rm -f $TEMP0 $TEMP $BAD $REF"
else
else
        TEMPD=$TMPDIR/pd$$
        TEMPD=$TMPDIR/pd$$
        TEMP0=$TEMPD/po$$
        TEMP0=$TEMPD/po$$
        TEMP=$TEMPD/p$$
        TEMP=$TEMPD/p$$
        BAD=$TEMPD/pbad$$
        BAD=$TEMPD/pbad$$
        REF=$TEMPD/pf$$
        REF=$TEMPD/pf$$
        mkdir $TEMPD || exit 1
        mkdir $TEMPD || exit 1
        REMOVE_TEMP="rm -rf $TEMPD"
        REMOVE_TEMP="rm -rf $TEMPD"
fi
fi
# find a user name
# find a user name
if [ "$LOGNAME" = "" ]; then
if [ "$LOGNAME" = "" ]; then
        if [ "$USER" != "" ]; then
        if [ "$USER" != "" ]; then
                LOGNAME="$USER"
                LOGNAME="$USER"
        else
        else
                LOGNAME="UNKNOWN"
                LOGNAME="UNKNOWN"
        fi
        fi
fi
fi
FROM="$LOGNAME"
FROM="$LOGNAME"
REPLY_TO="${REPLY_TO:-${REPLYTO:-$LOGNAME}}"
REPLY_TO="${REPLY_TO:-${REPLYTO:-$LOGNAME}}"
# Find out the name of the originator of this PR.
# Find out the name of the originator of this PR.
if [ -n "$NAME" ]; then
if [ -n "$NAME" ]; then
  ORIGINATOR="$NAME"
  ORIGINATOR="$NAME"
elif [ -f $HOME/.fullname ]; then
elif [ -f $HOME/.fullname ]; then
  ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
  ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
else
else
  # Must use temp file due to incompatibilities in quoting behavior
  # Must use temp file due to incompatibilities in quoting behavior
  # and to protect shell metacharacters in the expansion of $LOGNAME
  # and to protect shell metacharacters in the expansion of $LOGNAME
  $PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP0
  $PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP0
  ORIGINATOR="`cat $TEMP0`"
  ORIGINATOR="`cat $TEMP0`"
  rm -f $TEMP0
  rm -f $TEMP0
fi
fi
if [ -n "$ORGANIZATION" ]; then
if [ -n "$ORGANIZATION" ]; then
  if [ -f "$ORGANIZATION" ]; then
  if [ -f "$ORGANIZATION" ]; then
    ORGANIZATION="`cat $ORGANIZATION`"
    ORGANIZATION="`cat $ORGANIZATION`"
  fi
  fi
else
else
  if [ -n "$DEFAULT_ORGANIZATION" ]; then
  if [ -n "$DEFAULT_ORGANIZATION" ]; then
    ORGANIZATION="$DEFAULT_ORGANIZATION"
    ORGANIZATION="$DEFAULT_ORGANIZATION"
  elif [ -f $HOME/.organization ]; then
  elif [ -f $HOME/.organization ]; then
    ORGANIZATION="`cat $HOME/.organization`"
    ORGANIZATION="`cat $HOME/.organization`"
  fi
  fi
fi
fi
# If they don't have a preferred editor set, then use
# If they don't have a preferred editor set, then use
if [ -z "$VISUAL" ]; then
if [ -z "$VISUAL" ]; then
  if [ -z "$EDITOR" ]; then
  if [ -z "$EDITOR" ]; then
    EDIT=vi
    EDIT=vi
  else
  else
    EDIT="$EDITOR"
    EDIT="$EDITOR"
  fi
  fi
else
else
  EDIT="$VISUAL"
  EDIT="$VISUAL"
fi
fi
# Find out some information.
# Find out some information.
SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
        ( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
        ( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
ARCH=`[ -f /bin/arch ] && /bin/arch`
ARCH=`[ -f /bin/arch ] && /bin/arch`
MACHINE=`[ -f /bin/machine ] && /bin/machine`
MACHINE=`[ -f /bin/machine ] && /bin/machine`
COMMAND=`echo $0 | sed -e 's,.*/,,'`
COMMAND=`echo $0 | sed -e 's,.*/,,'`
USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [-s severity]
USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [-s severity]
       [-c address] [--request-id] [--version]"
       [-c address] [--request-id] [--version]"
REMOVE=
REMOVE=
BATCH=
BATCH=
CC=
CC=
SEVERITY_C=
SEVERITY_C=
while [ $# -gt 0 ]; do
while [ $# -gt 0 ]; do
  case "$1" in
  case "$1" in
    -r) ;;              # Ignore for backward compat.
    -r) ;;              # Ignore for backward compat.
    -t | --to) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
    -t | --to) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
        shift ; GNATS_ADDR="$1"
        shift ; GNATS_ADDR="$1"
        EXPLICIT_GNATS_ADDR=true
        EXPLICIT_GNATS_ADDR=true
        ;;
        ;;
    -f | --file) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
    -f | --file) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
        shift ; IN_FILE="$1"
        shift ; IN_FILE="$1"
        if [ "$IN_FILE" != "-" -a ! -r "$IN_FILE" ]; then
        if [ "$IN_FILE" != "-" -a ! -r "$IN_FILE" ]; then
          echo "$COMMAND: cannot read $IN_FILE"
          echo "$COMMAND: cannot read $IN_FILE"
          $REMOVE_TEMP
          $REMOVE_TEMP
          exit 1
          exit 1
        fi
        fi
        ;;
        ;;
    -b | --batch) BATCH=true ;;
    -b | --batch) BATCH=true ;;
    -c | --cc) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
    -c | --cc) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
        shift ; CC="$1"
        shift ; CC="$1"
        ;;
        ;;
    -s | --severity) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
    -s | --severity) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
        shift ; SEVERITY_C="$1"
        shift ; SEVERITY_C="$1"
        ;;
        ;;
    -p | -P | --print) PRINT=true ;;
    -p | -P | --print) PRINT=true ;;
    -L | --list) FORMAT=norm ;;
    -L | --list) FORMAT=norm ;;
    -l | -CL | --lisp) FORMAT=lisp ;;
    -l | -CL | --lisp) FORMAT=lisp ;;
    --request-id) REQUEST_ID=true ;;
    --request-id) REQUEST_ID=true ;;
    -h | --help) echo "$USAGE"; $REMOVE_TEMP; exit 0 ;;
    -h | --help) echo "$USAGE"; $REMOVE_TEMP; exit 0 ;;
    -V | --version) cat <
    -V | --version) cat <
gccbug (GCC) $DEFAULT_RELEASE
gccbug (GCC) $DEFAULT_RELEASE
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
EOF
        $REMOVE_TEMP; exit 0 ;;
        $REMOVE_TEMP; exit 0 ;;
    -*) echo "$USAGE" ; $REMOVE_TEMP; exit 1 ;;
    -*) echo "$USAGE" ; $REMOVE_TEMP; exit 1 ;;
    *) echo "$USAGE" ; $REMOVE_TEMP; exit 1
    *) echo "$USAGE" ; $REMOVE_TEMP; exit 1
 esac
 esac
 shift
 shift
done
done
# spam does not need to be listed here
# spam does not need to be listed here
CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libgcj libobjc libstdc++ middle-end objc other pch preprocessor rtl-optimization target tree-optimization web"
CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libgcj libobjc libstdc++ middle-end objc other pch preprocessor rtl-optimization target tree-optimization web"
case "$FORMAT" in
case "$FORMAT" in
  lisp) echo "$CATEGORIES" | \
  lisp) echo "$CATEGORIES" | \
        awk 'BEGIN {printf "( "} {printf "(\"%s\") ",$0} END {printf ")\n"}'
        awk 'BEGIN {printf "( "} {printf "(\"%s\") ",$0} END {printf ")\n"}'
        $REMOVE_TEMP
        $REMOVE_TEMP
        exit 0
        exit 0
        ;;
        ;;
  norm) l=`echo "$CATEGORIES" | \
  norm) l=`echo "$CATEGORIES" | \
        awk 'BEGIN {max = 0; } { if (length($0) > max) { max = length($0); } }
        awk 'BEGIN {max = 0; } { if (length($0) > max) { max = length($0); } }
             END {print max + 1;}'`
             END {print max + 1;}'`
        c=`expr 70 / $l`
        c=`expr 70 / $l`
        if [ $c -eq 0 ]; then c=1; fi
        if [ $c -eq 0 ]; then c=1; fi
        echo "$CATEGORIES" | \
        echo "$CATEGORIES" | \
        awk 'BEGIN {print "Known categories:"; i = 0 }
        awk 'BEGIN {print "Known categories:"; i = 0 }
          { printf ("%-'$l'.'$l's", $0); if ((++i % '$c') == 0) { print "" } }
          { printf ("%-'$l'.'$l's", $0); if ((++i % '$c') == 0) { print "" } }
            END { print ""; }'
            END { print ""; }'
        $REMOVE_TEMP
        $REMOVE_TEMP
        exit 0
        exit 0
        ;;
        ;;
esac
esac
ORIGINATOR_C=''
ORIGINATOR_C=''
ORGANIZATION_C=''
ORGANIZATION_C=''
SYNOPSIS_C=''
SYNOPSIS_C=''
if [ -z "$SEVERITY_C" ]; then
if [ -z "$SEVERITY_C" ]; then
  SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
  SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
fi
fi
PRIORITY_C='<[ low | medium ] (one line)>'
PRIORITY_C='<[ low | medium ] (one line)>'
CATEGORY_C=''
CATEGORY_C=''
RELEASE_C=''
RELEASE_C=''
ENVIRONMENT_C=''
ENVIRONMENT_C=''
DESCRIPTION_C=''
DESCRIPTION_C=''
HOW_TO_REPEAT_C=''
HOW_TO_REPEAT_C=''
FIX_C=''
FIX_C=''
# Catch some signals. ($xs kludge needed by Sun /bin/sh)
# Catch some signals. ($xs kludge needed by Sun /bin/sh)
xs=0
xs=0
trap '$REMOVE_TEMP; exit $xs' 0
trap '$REMOVE_TEMP; exit $xs' 0
trap 'echo "$COMMAND: Aborting ..."; $REMOVE_TEMP; xs=1; exit' 1 3 13 15
trap 'echo "$COMMAND: Aborting ..."; $REMOVE_TEMP; xs=1; exit' 1 3 13 15
# If they told us to use a specific file, then do so.
# If they told us to use a specific file, then do so.
if [ -n "$IN_FILE" ]; then
if [ -n "$IN_FILE" ]; then
  if [ "$IN_FILE" = "-" ]; then
  if [ "$IN_FILE" = "-" ]; then
    # The PR is coming from the standard input.
    # The PR is coming from the standard input.
    if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
    if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
      sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" > $TEMP
      sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" > $TEMP
    else
    else
      cat > $TEMP
      cat > $TEMP
    fi
    fi
  else
  else
    # Use the file they named.
    # Use the file they named.
    if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
    if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
      sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" $IN_FILE > $TEMP
      sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" $IN_FILE > $TEMP
    else
    else
      cat $IN_FILE > $TEMP
      cat $IN_FILE > $TEMP
    fi
    fi
  fi
  fi
else
else
  if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
  if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
    # If their PR_FORM points to a bogus entry, then bail.
    # If their PR_FORM points to a bogus entry, then bail.
    if [ ! -f "$PR_FORM" -o ! -r "$PR_FORM" -o ! -s "$PR_FORM" ]; then
    if [ ! -f "$PR_FORM" -o ! -r "$PR_FORM" -o ! -s "$PR_FORM" ]; then
      echo "$COMMAND: can't seem to read your template file (\`$PR_FORM'), ignoring PR_FORM"
      echo "$COMMAND: can't seem to read your template file (\`$PR_FORM'), ignoring PR_FORM"
      sleep 1
      sleep 1
      PRINT_INTERN=bad_prform
      PRINT_INTERN=bad_prform
    fi
    fi
  fi
  fi
  if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
  if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
    cp $PR_FORM $TEMP ||
    cp $PR_FORM $TEMP ||
      ( echo "$COMMAND: could not copy $PR_FORM" ; xs=1; exit )
      ( echo "$COMMAND: could not copy $PR_FORM" ; xs=1; exit )
  else
  else
    for file in $TEMP $REF ; do
    for file in $TEMP $REF ; do
      cat  > $file << '__EOF__'
      cat  > $file << '__EOF__'
SEND-PR: -*- send-pr -*-
SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR:
SEND-PR:
SEND-PR: Please consult the GCC manual if you are not sure how to
SEND-PR: Please consult the GCC manual if you are not sure how to
SEND-PR: fill out a problem report.
SEND-PR: fill out a problem report.
SEND-PR: Note that the Synopsis field is mandatory.  The Subject (for
SEND-PR: Note that the Synopsis field is mandatory.  The Subject (for
SEND-PR: the mail) will be made the same as Synopsis unless explicitly
SEND-PR: the mail) will be made the same as Synopsis unless explicitly
SEND-PR: changed.
SEND-PR: changed.
SEND-PR:
SEND-PR:
SEND-PR: Choose from the following categories:
SEND-PR: Choose from the following categories:
SEND-PR:
SEND-PR:
__EOF__
__EOF__
      # Format the categories so they fit onto lines.
      # Format the categories so they fit onto lines.
        l=`echo "$CATEGORIES" | \
        l=`echo "$CATEGORIES" | \
        awk 'BEGIN {max = 0; } { if (length($0) > max) { max = length($0); } }
        awk 'BEGIN {max = 0; } { if (length($0) > max) { max = length($0); } }
             END {print max + 1;}'`
             END {print max + 1;}'`
        c=`expr 61 / $l`
        c=`expr 61 / $l`
        if [ $c -eq 0 ]; then c=1; fi
        if [ $c -eq 0 ]; then c=1; fi
        echo "$CATEGORIES" | \
        echo "$CATEGORIES" | \
        awk 'BEGIN {printf "SEND-PR: "; i = 0 }
        awk 'BEGIN {printf "SEND-PR: "; i = 0 }
          { printf ("%-'$l'.'$l's", $0);
          { printf ("%-'$l'.'$l's", $0);
            if ((++i % '$c') == 0) { printf "\nSEND-PR: " } }
            if ((++i % '$c') == 0) { printf "\nSEND-PR: " } }
            END { printf "\nSEND-PR:\n"; }' >> $file
            END { printf "\nSEND-PR:\n"; }' >> $file
      cat >> $file << __EOF__
      cat >> $file << __EOF__
To: $GNATS_ADDR
To: $GNATS_ADDR
Subject:
Subject:
From: $FROM
From: $FROM
Reply-To: $REPLYTO
Reply-To: $REPLYTO
Cc: $CC
Cc: $CC
X-send-pr-version: $VERSION
X-send-pr-version: $VERSION
X-GNATS-Notify:
X-GNATS-Notify:
>Submitter-Id:  $SUBMITTER
>Submitter-Id:  $SUBMITTER
>Originator:    $ORIGINATOR
>Originator:    $ORIGINATOR
>Organization:  ${ORGANIZATION-$ORGANIZATION_C}
>Organization:  ${ORGANIZATION-$ORGANIZATION_C}
>Confidential:  no
>Confidential:  no
SEND-PR: Leave "Confidential" as "no"; all GCC PRs are public.
SEND-PR: Leave "Confidential" as "no"; all GCC PRs are public.
>Synopsis:      $SYNOPSIS_C
>Synopsis:      $SYNOPSIS_C
>Severity:      $SEVERITY_C
>Severity:      $SEVERITY_C
SEND-PR: critical     GCC is completely not operational; no work-around known.
SEND-PR: critical     GCC is completely not operational; no work-around known.
SEND-PR: serious      GCC is not working properly; a work-around is possible.
SEND-PR: serious      GCC is not working properly; a work-around is possible.
SEND-PR: non-critical Report indicates minor problem.
SEND-PR: non-critical Report indicates minor problem.
>Priority:      $PRIORITY_C
>Priority:      $PRIORITY_C
SEND-PR: medium       The problem should be solved in the next release.
SEND-PR: medium       The problem should be solved in the next release.
SEND-PR: low          The problem should be solve in a future release.
SEND-PR: low          The problem should be solve in a future release.
>Category:      $CATEGORY_C
>Category:      $CATEGORY_C
>Class:         <[ doc-bug | accepts-illegal | rejects-legal | wrong-code | ice-on-legal-code| ice-on-illegal-code | pessimizes-code | sw-bug | change-request | support ] (one line)>
>Class:         <[ doc-bug | accepts-illegal | rejects-legal | wrong-code | ice-on-legal-code| ice-on-illegal-code | pessimizes-code | sw-bug | change-request | support ] (one line)>
SEND-PR: doc-bug          The documentation is incorrect.
SEND-PR: doc-bug          The documentation is incorrect.
SEND-PR: accepts-illegal  GCC fails to reject erroneous code.
SEND-PR: accepts-illegal  GCC fails to reject erroneous code.
SEND-PR: rejects-legal    GCC gives an error message for correct code.
SEND-PR: rejects-legal    GCC gives an error message for correct code.
SEND-PR: wrong-code       The machine code generated by gcc is incorrect.
SEND-PR: wrong-code       The machine code generated by gcc is incorrect.
SEND-PR: ice-on-legal-code   GCC gives an Internal Compiler Error (ICE)
SEND-PR: ice-on-legal-code   GCC gives an Internal Compiler Error (ICE)
SEND-PR:                     for correct code
SEND-PR:                     for correct code
SEND-PR: ice-on-illegal-code GCC gives an ICE instead of reporting an error
SEND-PR: ice-on-illegal-code GCC gives an ICE instead of reporting an error
SEND-PR: pessimizes-code     GCC misses an important optimization opportunity
SEND-PR: pessimizes-code     GCC misses an important optimization opportunity
SEND-PR: sw-bug              Software bug of some other class than above
SEND-PR: sw-bug              Software bug of some other class than above
SEND-PR: change-request      A feature in GCC is missing.
SEND-PR: change-request      A feature in GCC is missing.
SEND-PR: support             I need help with gcc.
SEND-PR: support             I need help with gcc.
>Release:       ${DEFAULT_RELEASE-$RELEASE_C}
>Release:       ${DEFAULT_RELEASE-$RELEASE_C}
>Environment:
>Environment:
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
        $ENVIRONMENT_C
        $ENVIRONMENT_C
host: @host@
host: @host@
build: @build@
build: @build@
target: @target@
target: @target@
__EOF__
__EOF__
      cat >> $file << \__EOF__
      cat >> $file << \__EOF__
configured with: @gcc_config_arguments@
configured with: @gcc_config_arguments@
__EOF__
__EOF__
      cat >> $file << __EOF__
      cat >> $file << __EOF__
>Description:
>Description:
        $DESCRIPTION_C
        $DESCRIPTION_C
>How-To-Repeat:
>How-To-Repeat:
        $HOW_TO_REPEAT_C
        $HOW_TO_REPEAT_C
>Fix:
>Fix:
        $FIX_C
        $FIX_C
__EOF__
__EOF__
    done
    done
  fi
  fi
  if [ "$PRINT" = true -o "$PRINT_INTERN" = true ]; then
  if [ "$PRINT" = true -o "$PRINT_INTERN" = true ]; then
    cat $TEMP
    cat $TEMP
    xs=0; exit
    xs=0; exit
  fi
  fi
  chmod u+w $TEMP
  chmod u+w $TEMP
  if [ -z "$REQUEST_ID" ]; then
  if [ -z "$REQUEST_ID" ]; then
    eval $EDIT $TEMP
    eval $EDIT $TEMP
  else
  else
    ed -s $TEMP << '__EOF__'
    ed -s $TEMP << '__EOF__'
/^Subject/s/^Subject:.*/Subject: request for a customer id/
/^Subject/s/^Subject:.*/Subject: request for a customer id/
/^>Category/s/^>Category:.*/>Category: send-pr/
/^>Category/s/^>Category:.*/>Category: send-pr/
w
w
q
q
__EOF__
__EOF__
  fi
  fi
  if cmp -s $REF $TEMP ; then
  if cmp -s $REF $TEMP ; then
    echo "$COMMAND: problem report not filled out, therefore not sent"
    echo "$COMMAND: problem report not filled out, therefore not sent"
    xs=1; exit
    xs=1; exit
  fi
  fi
fi
fi
#
#
#       Check the enumeration fields
#       Check the enumeration fields
# This is a "sed-subroutine" with one keyword parameter
# This is a "sed-subroutine" with one keyword parameter
# (with workaround for Sun sed bug)
# (with workaround for Sun sed bug)
#
#
SED_CMD='
SED_CMD='
/$PATTERN/{
/$PATTERN/{
s|||
s|||
s|<.*>||
s|<.*>||
s|^[    ]*||
s|^[    ]*||
s|[     ]*$||
s|[     ]*$||
p
p
q
q
}'
}'
while [ -z "$REQUEST_ID" ]; do
while [ -z "$REQUEST_ID" ]; do
  CNT=0
  CNT=0
  # 1) Confidential
  # 1) Confidential
  #
  #
  PATTERN=">Confidential:"
  PATTERN=">Confidential:"
  CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  case "$CONFIDENTIAL" in
  case "$CONFIDENTIAL" in
    no) CNT=`expr $CNT + 1` ;;
    no) CNT=`expr $CNT + 1` ;;
    *) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;;
    *) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;;
  esac
  esac
  #
  #
  # 2) Severity
  # 2) Severity
  #
  #
  PATTERN=">Severity:"
  PATTERN=">Severity:"
  SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  case "$SEVERITY" in
  case "$SEVERITY" in
    ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
    ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
    *)  echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
    *)  echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
  esac
  esac
  #
  #
  # 3) Priority
  # 3) Priority
  #
  #
  PATTERN=">Priority:"
  PATTERN=">Priority:"
  PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  case "$PRIORITY" in
  case "$PRIORITY" in
    ""|low|medium) CNT=`expr $CNT + 1` ;;
    ""|low|medium) CNT=`expr $CNT + 1` ;;
    high) echo "$COMMAND: \`Priority: high' is reserved for GCC maintainers." ;;
    high) echo "$COMMAND: \`Priority: high' is reserved for GCC maintainers." ;;
    *)  echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
    *)  echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
  esac
  esac
  #
  #
  # 4) Category
  # 4) Category
  #
  #
  PATTERN=">Category:"
  PATTERN=">Category:"
  CATEGORY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  CATEGORY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  FOUND=
  FOUND=
  for C in $CATEGORIES
  for C in $CATEGORIES
  do
  do
    if [ "$C" = "$CATEGORY" ]; then FOUND=true ; break ; fi
    if [ "$C" = "$CATEGORY" ]; then FOUND=true ; break ; fi
  done
  done
  if [ -n "$FOUND" ]; then
  if [ -n "$FOUND" ]; then
    CNT=`expr $CNT + 1`
    CNT=`expr $CNT + 1`
  else
  else
    if [ -z "$CATEGORY" ]; then
    if [ -z "$CATEGORY" ]; then
      echo "$COMMAND: you must include a Category: field in your report."
      echo "$COMMAND: you must include a Category: field in your report."
    else
    else
      echo "$COMMAND: \`$CATEGORY' is not a known category."
      echo "$COMMAND: \`$CATEGORY' is not a known category."
    fi
    fi
  fi
  fi
  #
  #
  # 5) Class
  # 5) Class
  #
  #
  PATTERN=">Class:"
  PATTERN=">Class:"
  CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
  case "$CLASS" in
  case "$CLASS" in
    ""|doc-bug|accepts-illegal|rejects-legal|wrong-code|ice-on-legal-code|ice-on-illegal-code|pessimizes-code|sw-bug|change-request|support) CNT=`expr $CNT + 1` ;;
    ""|doc-bug|accepts-illegal|rejects-legal|wrong-code|ice-on-legal-code|ice-on-illegal-code|pessimizes-code|sw-bug|change-request|support) CNT=`expr $CNT + 1` ;;
    *)  echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
    *)  echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
  esac
  esac
  #
  #
  # 6) Check that synopsis is not empty
  # 6) Check that synopsis is not empty
  #
  #
  if grep "^>Synopsis:[         ]*${SYNOPSIS_C}\$" $TEMP > /dev/null
  if grep "^>Synopsis:[         ]*${SYNOPSIS_C}\$" $TEMP > /dev/null
  then
  then
    echo "$COMMAND: Synopsis must not be empty."
    echo "$COMMAND: Synopsis must not be empty."
  else
  else
    CNT=`expr $CNT + 1`
    CNT=`expr $CNT + 1`
  fi
  fi
  [ $CNT -lt 6 -a -z "$BATCH" ] &&
  [ $CNT -lt 6 -a -z "$BATCH" ] &&
    echo "Errors were found with the problem report."
    echo "Errors were found with the problem report."
  while true; do
  while true; do
    if [ -z "$BATCH" ]; then
    if [ -z "$BATCH" ]; then
      $ECHON1 "a)bort, e)dit or s)end? $ECHON2"
      $ECHON1 "a)bort, e)dit or s)end? $ECHON2"
      read input
      read input
    else
    else
      if [ $CNT -eq 6 ]; then
      if [ $CNT -eq 6 ]; then
        input=s
        input=s
      else
      else
        input=a
        input=a
      fi
      fi
    fi
    fi
    case "$input" in
    case "$input" in
      a*)
      a*)
        if [ -z "$BATCH" ]; then
        if [ -z "$BATCH" ]; then
          echo "$COMMAND: the problem report remains in $BAD and is not sent."
          echo "$COMMAND: the problem report remains in $BAD and is not sent."
          REMOVE_TEMP="rm -f $TEMP0 $TEMP $REF"
          REMOVE_TEMP="rm -f $TEMP0 $TEMP $REF"
          mv $TEMP $BAD
          mv $TEMP $BAD
        else
        else
          echo "$COMMAND: the problem report is not sent."
          echo "$COMMAND: the problem report is not sent."
        fi
        fi
        xs=1; exit
        xs=1; exit
        ;;
        ;;
      e*)
      e*)
        eval $EDIT $TEMP
        eval $EDIT $TEMP
        continue 2
        continue 2
        ;;
        ;;
      s*)
      s*)
        break 2
        break 2
        ;;
        ;;
    esac
    esac
  done
  done
done
done
#
#
# Make sure the mail has got a Subject.  If not, use the same as
# Make sure the mail has got a Subject.  If not, use the same as
# in Synopsis.
# in Synopsis.
#
#
if grep '^Subject:[     ]*$' $TEMP > /dev/null
if grep '^Subject:[     ]*$' $TEMP > /dev/null
then
then
  SYNOPSIS=`grep '^>Synopsis:' $TEMP | sed -e 's/^>Synopsis:[   ]*//'`
  SYNOPSIS=`grep '^>Synopsis:' $TEMP | sed -e 's/^>Synopsis:[   ]*//'`
  ed -s $TEMP << __EOF__
  ed -s $TEMP << __EOF__
/^Subject:/s/:.*\$/: $SYNOPSIS/
/^Subject:/s/:.*\$/: $SYNOPSIS/
w
w
q
q
__EOF__
__EOF__
fi
fi
#
#
#       Remove comments and send the problem report
#       Remove comments and send the problem report
#       (we have to use patterns, where the comment contains regex chars)
#       (we have to use patterns, where the comment contains regex chars)
#
#
# /^>Originator:/s;$ORIGINATOR;;
# /^>Originator:/s;$ORIGINATOR;;
sed  -e "
sed  -e "
/^SEND-PR:/d
/^SEND-PR:/d
/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
/^>Confidential:/s;<.*>;;
/^>Confidential:/s;<.*>;;
/^>Synopsis:/s;$SYNOPSIS_C;;
/^>Synopsis:/s;$SYNOPSIS_C;;
/^>Severity:/s;<.*>;;
/^>Severity:/s;<.*>;;
/^>Priority:/s;<.*>;;
/^>Priority:/s;<.*>;;
/^>Category:/s;$CATEGORY_C;;
/^>Category:/s;$CATEGORY_C;;
/^>Class:/s;<.*>;;
/^>Class:/s;<.*>;;
/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
" $TEMP > $REF
" $TEMP > $REF
if $MAIL_AGENT < $REF; then
if $MAIL_AGENT < $REF; then
  echo "$COMMAND: problem report sent"
  echo "$COMMAND: problem report sent"
  xs=0; exit
  xs=0; exit
else
else
  echo "$COMMAND: mysterious mail failure."
  echo "$COMMAND: mysterious mail failure."
  if [ -z "$BATCH" ]; then
  if [ -z "$BATCH" ]; then
    echo "$COMMAND: the problem report remains in $BAD and is not sent."
    echo "$COMMAND: the problem report remains in $BAD and is not sent."
    REMOVE_TEMP="rm -f $TEMP0 $TEMP $REF"
    REMOVE_TEMP="rm -f $TEMP0 $TEMP $REF"
    mv $REF $BAD
    mv $REF $BAD
  else
  else
    echo "$COMMAND: the problem report is not sent."
    echo "$COMMAND: the problem report is not sent."
  fi
  fi
  xs=1; exit
  xs=1; exit
fi
fi
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.