mirror of git://gcc.gnu.org/git/gcc.git
[multiple changes]
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. From-SVN: r145680
This commit is contained in:
parent
df46b832b0
commit
06a16f58d6
|
@ -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>
|
2009-04-07 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
* g-socket.adb: Minor reformatting.
|
* g-socket.adb: Minor reformatting.
|
||||||
|
|
|
@ -66,7 +66,9 @@
|
||||||
#include <vxWorks.h>
|
#include <vxWorks.h>
|
||||||
#include <ioLib.h>
|
#include <ioLib.h>
|
||||||
#include <hostLib.h>
|
#include <hostLib.h>
|
||||||
|
#ifndef __RTP__
|
||||||
#include <resolvLib.h>
|
#include <resolvLib.h>
|
||||||
|
#endif
|
||||||
#define SHUT_RD 0
|
#define SHUT_RD 0
|
||||||
#define SHUT_WR 1
|
#define SHUT_WR 1
|
||||||
#define SHUT_RDWR 2
|
#define SHUT_RDWR 2
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
with Ada.Unchecked_Deallocation;
|
with Ada.Unchecked_Deallocation;
|
||||||
-- with Ada.Exceptions;
|
|
||||||
|
|
||||||
with System.Case_Util;
|
with System.Case_Util;
|
||||||
|
|
||||||
|
@ -205,6 +204,7 @@ package body System.Regexp is
|
||||||
J : Integer := S'First;
|
J : Integer := S'First;
|
||||||
Parenthesis_Level : Integer := 0;
|
Parenthesis_Level : Integer := 0;
|
||||||
Curly_Level : Integer := 0;
|
Curly_Level : Integer := 0;
|
||||||
|
Last_Open : Integer := S'First - 1;
|
||||||
|
|
||||||
-- Start of processing for Create_Mapping
|
-- Start of processing for Create_Mapping
|
||||||
|
|
||||||
|
@ -282,6 +282,7 @@ package body System.Regexp is
|
||||||
when Open_Paren =>
|
when Open_Paren =>
|
||||||
if not Glob then
|
if not Glob then
|
||||||
Parenthesis_Level := Parenthesis_Level + 1;
|
Parenthesis_Level := Parenthesis_Level + 1;
|
||||||
|
Last_Open := J;
|
||||||
else
|
else
|
||||||
Add_In_Map (Open_Paren);
|
Add_In_Map (Open_Paren);
|
||||||
end if;
|
end if;
|
||||||
|
@ -296,7 +297,7 @@ package body System.Regexp is
|
||||||
& "expression", J);
|
& "expression", J);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
if S (J - 1) = Open_Paren then
|
if J = Last_Open + 1 then
|
||||||
Raise_Exception
|
Raise_Exception
|
||||||
("Empty parenthesis not allowed in regular "
|
("Empty parenthesis not allowed in regular "
|
||||||
& "expression", J);
|
& "expression", J);
|
||||||
|
|
|
@ -352,22 +352,39 @@ __gnat_get_h_errno (void) {
|
||||||
case 0:
|
case 0:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
#ifdef S_resolvLib_HOST_NOT_FOUND
|
||||||
case S_resolvLib_HOST_NOT_FOUND:
|
case S_resolvLib_HOST_NOT_FOUND:
|
||||||
|
#endif
|
||||||
case S_hostLib_UNKNOWN_HOST:
|
case S_hostLib_UNKNOWN_HOST:
|
||||||
|
case S_hostLib_HOST_NOT_FOUND:
|
||||||
return HOST_NOT_FOUND;
|
return HOST_NOT_FOUND;
|
||||||
|
|
||||||
|
#ifdef S_resolvLib_TRY_AGAIN
|
||||||
case S_resolvLib_TRY_AGAIN:
|
case S_resolvLib_TRY_AGAIN:
|
||||||
|
#endif
|
||||||
|
case S_hostLib_TRY_AGAIN:
|
||||||
return TRY_AGAIN;
|
return TRY_AGAIN;
|
||||||
|
|
||||||
|
#ifdef S_resolvLib_NO_RECOVERY
|
||||||
case S_resolvLib_NO_RECOVERY:
|
case S_resolvLib_NO_RECOVERY:
|
||||||
|
#endif
|
||||||
|
#ifdef S_resolvLib_BUFFER_2_SMALL
|
||||||
case S_resolvLib_BUFFER_2_SMALL:
|
case S_resolvLib_BUFFER_2_SMALL:
|
||||||
|
#endif
|
||||||
|
#ifdef S_resolvLib_INVALID_PARAMETER
|
||||||
case S_resolvLib_INVALID_PARAMETER:
|
case S_resolvLib_INVALID_PARAMETER:
|
||||||
|
#endif
|
||||||
|
#ifdef S_resolvLib_INVALID_ADDRESS
|
||||||
case S_resolvLib_INVALID_ADDRESS:
|
case S_resolvLib_INVALID_ADDRESS:
|
||||||
|
#endif
|
||||||
case S_hostLib_INVALID_PARAMETER:
|
case S_hostLib_INVALID_PARAMETER:
|
||||||
|
case S_hostLib_NO_RECOVERY:
|
||||||
return NO_RECOVERY;
|
return NO_RECOVERY;
|
||||||
|
|
||||||
|
#ifdef S_resolvLib_NO_DATA
|
||||||
case S_resolvLib_NO_DATA:
|
case S_resolvLib_NO_DATA:
|
||||||
return NO_DATA;
|
return NO_DATA;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue