File: gccbug-posix.dpatch

package info (click to toggle)
gcc-h8300-hms 1%3A3.4.6%2Bdfsg2-4.2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 94,620 kB
  • sloc: ansic: 627,399; cpp: 89,017; makefile: 24,797; asm: 21,058; sh: 16,616; yacc: 3,740; perl: 718; xml: 692; lex: 587; exp: 298; awk: 223; pascal: 86; lisp: 59; sed: 37
file content (62 lines) | stat: -rw-r--r-- 2,188 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# DP: Make gccbug POSIX compliant (patch by David Weinehall)
# DP: http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
Index: gcc-h8300-hms-3.4.6/gcc/gccbug.in
===================================================================
--- gcc-h8300-hms-3.4.6.orig/gcc/gccbug.in	2011-06-08 23:53:21.000000000 +0200
+++ gcc-h8300-hms-3.4.6/gcc/gccbug.in	2011-06-08 23:53:22.000000000 +0200
@@ -165,7 +165,7 @@
         ;;
     -f | --file) if [ $# -eq 1 ]; then echo "$USAGE"; $REMOVE_TEMP; exit 1; fi
 	shift ; IN_FILE="$1"
-	if [ "$IN_FILE" != "-" -a ! -r "$IN_FILE" ]; then
+	if [ "$IN_FILE" != "-" ] && [ ! -r "$IN_FILE" ]; then
 	  echo "$COMMAND: cannot read $IN_FILE"
 	  $REMOVE_TEMP
 	  exit 1
@@ -237,7 +237,7 @@
 # Catch some signals. ($xs kludge needed by Sun /bin/sh)
 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' HUP QUIT PIPE TERM
 
 # If they told us to use a specific file, then do so.
 if [ -n "$IN_FILE" ]; then
@@ -258,16 +258,16 @@
   fi
 else
 
-  if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
+  if [ -n "$PR_FORM" ] && [ -z "$PRINT_INTERN" ]; then
     # 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" ] || [ ! -r "$PR_FORM" ] || [ ! -s "$PR_FORM" ]; then
       echo "$COMMAND: can't seem to read your template file (\`$PR_FORM'), ignoring PR_FORM"
       sleep 1
       PRINT_INTERN=bad_prform
     fi
   fi
 
-  if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
+  if [ -n "$PR_FORM" ] && [ -z "$PRINT_INTERN" ]; then
     cp $PR_FORM $TEMP || 
       ( echo "$COMMAND: could not copy $PR_FORM" ; xs=1; exit )
   else
@@ -359,7 +359,7 @@
     done
   fi
 
-  if [ "$PRINT" = true -o "$PRINT_INTERN" = true ]; then
+  if [ "$PRINT" = true ] || [ "$PRINT_INTERN" = true ]; then
     cat $TEMP
     xs=0; exit
   fi
@@ -467,7 +467,7 @@
     CNT=`expr $CNT + 1`
   fi
 
-  [ $CNT -lt 6 -a -z "$BATCH" ] && 
+  [ $CNT -lt 6 ] && [ -z "$BATCH" ] && 
     echo "Errors were found with the problem report."
 
   while true; do