$NetBSD: patch-ac,v 1.3 2000/07/11 14:36:20 dmcmahill Exp $

give the correct return value

--- iverilog.c.orig	Fri Jun 16 15:00:06 2000
+++ iverilog.c	Tue Jul 11 10:27:28 2000
@@ -26,4 +26,7 @@
 #include <string.h>
 
+#include <sys/types.h>
+#include <sys/wait.h>
+
 #ifndef IVL_ROOT
 # define IVL_ROOT "."
@@ -88,5 +91,5 @@
 
       rc = system(cmd);
-      return rc;
+      return(WEXITSTATUS(rc));
 }
 
@@ -142,5 +145,5 @@
       if (rc != 0) {
 	    fprintf(stderr, "errors translating Verilog program.\n");
-	    return rc;
+	    return(WEXITSTATUS(rc));
       }
 
@@ -155,5 +158,5 @@
       if (rc != 0) {
 	    fprintf(stderr, "errors compiling translated program.\n");
-	    return rc;
+	    return(WEXITSTATUS(rc));
       }
 
@@ -201,5 +204,5 @@
       rc = system(cmd);
 
-      return rc;
+      return(WEXITSTATUS(rc));
 }
 
@@ -225,4 +228,5 @@
       int opt, idx;
       char*cp;
+      int rc;
 
       while ((opt = getopt(argc, argv, "B:D:Ef:I:m:o:Ss:t:vW:")) != EOF) {
@@ -362,5 +366,6 @@
 		  printf("preprocess: %s\n", cmd);
 
-	    return system(cmd);
+	    rc=system(cmd);
+	    return(WEXITSTATUS(rc));
       }
 
