aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog11
-rw-r--r--gcc/ada/gsocket.h2
-rwxr-xr-xgcc/ada/s-regexp.adb5
-rw-r--r--gcc/ada/socket.c17
4 files changed, 33 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7404808..d65d598 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,14 @@
+2009-04-07 Emmanuel Briot <briot@adacore.com>
+
+ * s-regexp.adb (Create_Mapping): Ignore excaped open parenthesis when
+ looking for the end of a parenthesis group
+
+2009-04-07 Tristan Gingold <gingold@adacore.com>
+
+ * gsocket.h Don't #include resolvLib.h if __RTP__ is defined.
+
+ * socket.c Don't use resolvLib_ macros if not defined.
+
2009-04-07 Robert Dewar <dewar@adacore.com>
* g-socket.adb: Minor reformatting.
diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h
index 0dca1a9..5d866e0 100644
--- a/gcc/ada/gsocket.h
+++ b/gcc/ada/gsocket.h
@@ -66,7 +66,9 @@
#include <vxWorks.h>
#include <ioLib.h>
#include <hostLib.h>
+#ifndef __RTP__
#include <resolvLib.h>
+#endif
#define SHUT_RD 0
#define SHUT_WR 1
#define SHUT_RDWR 2
diff --git a/gcc/ada/s-regexp.adb b/gcc/ada/s-regexp.adb
index 268ec21..37c189a 100755
--- a/gcc/ada/s-regexp.adb
+++ b/gcc/ada/s-regexp.adb
@@ -32,7 +32,6 @@
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
--- with Ada.Exceptions;
with System.Case_Util;
@@ -205,6 +204,7 @@ package body System.Regexp is
J : Integer := S'First;
Parenthesis_Level : Integer := 0;
Curly_Level : Integer := 0;
+ Last_Open : Integer := S'First - 1;
-- Start of processing for Create_Mapping
@@ -282,6 +282,7 @@ package body System.Regexp is
when Open_Paren =>
if not Glob then
Parenthesis_Level := Parenthesis_Level + 1;
+ Last_Open := J;
else
Add_In_Map (Open_Paren);
end if;
@@ -296,7 +297,7 @@ package body System.Regexp is
& "expression", J);
end if;
- if S (J - 1) = Open_Paren then
+ if J = Last_Open + 1 then
Raise_Exception
("Empty parenthesis not allowed in regular "
& "expression", J);
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
index 1716a96..86d054f 100644
--- a/gcc/ada/socket.c
+++ b/gcc/ada/socket.c
@@ -352,22 +352,39 @@ __gnat_get_h_errno (void) {
case 0:
return 0;
+#ifdef S_resolvLib_HOST_NOT_FOUND
case S_resolvLib_HOST_NOT_FOUND:
+#endif
case S_hostLib_UNKNOWN_HOST:
+ case S_hostLib_HOST_NOT_FOUND:
return HOST_NOT_FOUND;
+#ifdef S_resolvLib_TRY_AGAIN
case S_resolvLib_TRY_AGAIN:
+#endif
+ case S_hostLib_TRY_AGAIN:
return TRY_AGAIN;
+#ifdef S_resolvLib_NO_RECOVERY
case S_resolvLib_NO_RECOVERY:
+#endif
+#ifdef S_resolvLib_BUFFER_2_SMALL
case S_resolvLib_BUFFER_2_SMALL:
+#endif
+#ifdef S_resolvLib_INVALID_PARAMETER
case S_resolvLib_INVALID_PARAMETER:
+#endif
+#ifdef S_resolvLib_INVALID_ADDRESS
case S_resolvLib_INVALID_ADDRESS:
+#endif
case S_hostLib_INVALID_PARAMETER:
+ case S_hostLib_NO_RECOVERY:
return NO_RECOVERY;
+#ifdef S_resolvLib_NO_DATA
case S_resolvLib_NO_DATA:
return NO_DATA;
+#endif
default:
return -1;