init.c (facility_resignal_table): new array
authorVasiliy Fofanov <fofanov@adacore.com>
Fri, 17 Feb 2006 16:07:22 +0000 (17:07 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 17 Feb 2006 16:07:22 +0000 (17:07 +0100)
2006-02-17  Vasiliy Fofanov  <fofanov@adacore.com>

* init.c (facility_resignal_table): new array
(__gnat_default_resignal_p): enhance default predicate to resignal if
VMS condition has one of the predefined facility codes.

From-SVN: r111189

gcc/ada/init.c

index eb10d6363f1633256225c5db7bcabf1b221ce55d..11dc19de4f370db17526b1d493e196a729e33e12 100644 (file)
@@ -1308,6 +1308,12 @@ const int *cond_resignal_table [] = {
   0
 };
 
+const int facility_resignal_table [] = {
+  0x1380000, /* RDB */
+  0x2220000, /* SQL */
+  0
+};
+
 /* Default GNAT predicate for resignaling conditions.  */
 
 static int
@@ -1315,6 +1321,10 @@ __gnat_default_resignal_p (int code)
 {
   int i, iexcept;
 
+  for (i = 0; facility_resignal_table [i]; i++)
+    if ((code & 0xfff0000) == facility_resignal_table [i])
+      return 1;
+
   for (i = 0, iexcept = 0;
        cond_resignal_table [i] &&
        !(iexcept = LIB$MATCH_COND (&code, &cond_resignal_table [i]));