mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 22:01:27 +08:00
[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>
|
||||
|
||||
* g-socket.adb: Minor reformatting.
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user