aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/ali.adb1
-rw-r--r--gcc/ada/lib-xref.adb2
-rw-r--r--gcc/ada/s-oscons-tmplt.c6
-rw-r--r--gcc/ada/s-osinte-linux.ads30
-rw-r--r--gcc/ada/sem_ch13.adb2
6 files changed, 37 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index b2c2a32f..db97339 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,14 @@
2011-09-06 Robert Dewar <dewar@adacore.com>
+ * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
+
+2011-09-06 Pascal Obry <obry@adacore.com>
+
+ * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
+ types.
+
+2011-09-06 Robert Dewar <dewar@adacore.com>
+
* g-socket.adb: Minor reformatting
2011-09-06 Javier Miranda <miranda@adacore.com>
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb
index 8201dc6..93dd109 100644
--- a/gcc/ada/ali.adb
+++ b/gcc/ada/ali.adb
@@ -2405,6 +2405,7 @@ package body ALI is
pragma Assert (Nextc = '>');
Skipc;
+
else
XR.Imported_Lang := No_Name;
XR.Imported_Name := No_Name;
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 6ba30c7..0210757 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1163,7 +1163,7 @@ package body Lib.Xref is
procedure Output_Import_Export_Info (Ent : Entity_Id);
-- Output language and external name information for an interfaced
- -- entity, using the format <language, external_name>
+ -- entity, using the format <language, external_name>.
------------------------
-- Get_Type_Reference --
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index 051cca5..ad3d065 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -165,6 +165,7 @@ pragma Style_Checks ("M32766");
#ifdef __linux__
# include <pthread.h>
+# include <signal.h>
#endif
#ifdef NATIVE
@@ -1267,6 +1268,11 @@ CND(SIZEOF_struct_hostent, "struct hostent");
#define SIZEOF_struct_servent (sizeof (struct servent))
CND(SIZEOF_struct_servent, "struct servent");
+
+#if defined (__linux__)
+#define SIZEOF_sigset (sizeof (sigset_t))
+CND(SIZEOF_sigset, "sigset");
+#endif
/*
-- Fields of struct msghdr
diff --git a/gcc/ada/s-osinte-linux.ads b/gcc/ada/s-osinte-linux.ads
index fa42a60..bd37c11 100644
--- a/gcc/ada/s-osinte-linux.ads
+++ b/gcc/ada/s-osinte-linux.ads
@@ -534,7 +534,8 @@ package System.OS_Interface is
private
- type sigset_t is array (0 .. 127) of unsigned_char;
+ type sigset_t is
+ array (0 .. OS_Constants.SIZEOF_sigset - 1) of unsigned_char;
pragma Convention (C, sigset_t);
for sigset_t'Alignment use Interfaces.C.unsigned_long'Alignment;
@@ -561,28 +562,35 @@ private
type unsigned_long_long_t is mod 2 ** 64;
-- Local type only used to get the alignment of this type below
- type pthread_attr_t is
- array (1 .. OS_Constants.PTHREAD_ATTR_SIZE) of unsigned_char;
+ subtype char_array is Interfaces.C.char_array;
+
+ type pthread_attr_t is record
+ Data : char_array (1 .. OS_Constants.PTHREAD_ATTR_SIZE);
+ end record;
pragma Convention (C, pthread_attr_t);
for pthread_attr_t'Alignment use Interfaces.C.unsigned_long'Alignment;
- type pthread_condattr_t is
- array (1 .. OS_Constants.PTHREAD_CONDATTR_SIZE) of unsigned_char;
+ type pthread_condattr_t is record
+ Data : char_array (1 .. OS_Constants.PTHREAD_CONDATTR_SIZE);
+ end record;
pragma Convention (C, pthread_condattr_t);
for pthread_condattr_t'Alignment use Interfaces.C.int'Alignment;
- type pthread_mutexattr_t is
- array (1 .. OS_Constants.PTHREAD_MUTEXATTR_SIZE) of unsigned_char;
+ type pthread_mutexattr_t is record
+ Data : char_array (1 .. OS_Constants.PTHREAD_MUTEXATTR_SIZE);
+ end record;
pragma Convention (C, pthread_mutexattr_t);
for pthread_mutexattr_t'Alignment use Interfaces.C.int'Alignment;
- type pthread_mutex_t is
- array (1 .. OS_Constants.PTHREAD_MUTEX_SIZE) of unsigned_char;
+ type pthread_mutex_t is record
+ Data : char_array (1 .. OS_Constants.PTHREAD_MUTEX_SIZE);
+ end record;
pragma Convention (C, pthread_mutex_t);
for pthread_mutex_t'Alignment use Interfaces.C.unsigned_long'Alignment;
- type pthread_cond_t is
- array (1 .. OS_Constants.PTHREAD_COND_SIZE) of unsigned_char;
+ type pthread_cond_t is record
+ Data : char_array (1 .. OS_Constants.PTHREAD_COND_SIZE);
+ end record;
pragma Convention (C, pthread_cond_t);
for pthread_cond_t'Alignment use unsigned_long_long_t'Alignment;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index fd7473c..fe2b82b 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -1295,7 +1295,7 @@ package body Sem_Ch13 is
-- part it applies to a completion.
if Nkind_In (N, N_Private_Type_Declaration,
- N_Private_Extension_Declaration)
+ N_Private_Extension_Declaration)
then
null;