summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socthi-mingw.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/g-socthi-mingw.ads')
-rw-r--r--gcc/ada/g-socthi-mingw.ads26
1 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ada/g-socthi-mingw.ads b/gcc/ada/g-socthi-mingw.ads
index a73b0a7ce03..11509c095ea 100644
--- a/gcc/ada/g-socthi-mingw.ads
+++ b/gcc/ada/g-socthi-mingw.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2001-2005 AdaCore --
+-- Copyright (C) 2001-2005, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -61,20 +61,32 @@ package GNAT.Sockets.Thin is
-- Set last socket error number
function Socket_Error_Message
- (Errno : Integer)
- return C.Strings.chars_ptr;
+ (Errno : Integer) return C.Strings.chars_ptr;
-- Returns the error message string for the error number Errno. If
-- Errno is not known it returns "Unknown system error".
+ function Host_Errno return Integer;
+ pragma Import (C, Host_Errno, "__gnat_get_h_errno");
+ -- Returns last host error number
+
subtype Fd_Set_Access is System.Address;
No_Fd_Set : constant Fd_Set_Access := System.Null_Address;
- type Timeval_Unit is new C.long;
- pragma Convention (C, Timeval_Unit);
+ type time_t is
+ range -(2 ** (8 * Constants.SIZEOF_tv_sec - 1))
+ .. 2 ** (8 * Constants.SIZEOF_tv_sec - 1) - 1;
+ for time_t'Size use 8 * Constants.SIZEOF_tv_sec;
+ pragma Convention (C, time_t);
+
+ type suseconds_t is
+ range -(2 ** (8 * Constants.SIZEOF_tv_usec - 1))
+ .. 2 ** (8 * Constants.SIZEOF_tv_usec - 1) - 1;
+ for suseconds_t'Size use 8 * Constants.SIZEOF_tv_usec;
+ pragma Convention (C, suseconds_t);
type Timeval is record
- Tv_Sec : Timeval_Unit;
- Tv_Usec : Timeval_Unit;
+ Tv_Sec : time_t;
+ Tv_Usec : suseconds_t;
end record;
pragma Convention (C, Timeval);