2011-09-06 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Sep 2011 09:37:22 +0000 (09:37 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Sep 2011 09:37:22 +0000 (09:37 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178578 138bc75d-0d04-0410-961f-82ee72b054a4

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 b2c2a32..db97339 100644 (file)
@@ -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>
index 8201dc6..93dd109 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 6ba30c7..0210757 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 051cca5..ad3d065 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 fa42a60..bd37c11 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 fd7473c..fe2b82b 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;