[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 6 Sep 2011 09:37:22 +0000 (11:37 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 6 Sep 2011 09:37:22 +0000 (11:37 +0200)
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.

From-SVN: r178578

gcc/ada/ChangeLog
gcc/ada/ali.adb
gcc/ada/lib-xref.adb
gcc/ada/s-oscons-tmplt.c
gcc/ada/s-osinte-linux.ads
gcc/ada/sem_ch13.adb

index b2c2a32f6cfc3e629fe12998a92eaeaaffe3e526..db97339dda2ff3df4ff0f1761a2700bdf7504a10 100644 (file)
@@ -1,3 +1,12 @@
+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
index 8201dc6461fba5c8ca9fb859d1cf07c2dd61a1dd..93dd10956ccc31481f3470b649289b61d4b17146 100644 (file)
@@ -2405,6 +2405,7 @@ package body ALI is
 
                            pragma Assert (Nextc = '>');
                            Skipc;
+
                         else
                            XR.Imported_Lang := No_Name;
                            XR.Imported_Name := No_Name;
index 6ba30c71ee4985893d4e069b04c002f3db015d5b..02107570a6e5f8cc75c7cf73ebbf40e0f30121c9 100644 (file)
@@ -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 --
index 051cca5456a9c18fc1033787ade4abc9cf04cb4d..ad3d06520d85e0ebc8f5b214b731311e6ecf07a7 100644 (file)
@@ -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
index fa42a607ef785eff12b9f19dfd9dd090492e435b..bd37c119fd1bd704b865e6fa3b960aaa1ecd74ca 100644 (file)
@@ -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;
 
index fd7473cece6142060fdea40faaf331c16e7568a6..fe2b82bdf1a0b6ab1e2bb6b10bf65d1215b0f44f 100644 (file)
@@ -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;