Commit b991dd43 by Arnaud Charlet

[multiple changes]

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
parent 516785cc
2011-09-06 Robert Dewar <dewar@adacore.com> 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 * g-socket.adb: Minor reformatting
2011-09-06 Javier Miranda <miranda@adacore.com> 2011-09-06 Javier Miranda <miranda@adacore.com>
......
...@@ -2405,6 +2405,7 @@ package body ALI is ...@@ -2405,6 +2405,7 @@ package body ALI is
pragma Assert (Nextc = '>'); pragma Assert (Nextc = '>');
Skipc; Skipc;
else else
XR.Imported_Lang := No_Name; XR.Imported_Lang := No_Name;
XR.Imported_Name := No_Name; XR.Imported_Name := No_Name;
......
...@@ -1163,7 +1163,7 @@ package body Lib.Xref is ...@@ -1163,7 +1163,7 @@ package body Lib.Xref is
procedure Output_Import_Export_Info (Ent : Entity_Id); procedure Output_Import_Export_Info (Ent : Entity_Id);
-- Output language and external name information for an interfaced -- 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 -- -- Get_Type_Reference --
......
...@@ -165,6 +165,7 @@ pragma Style_Checks ("M32766"); ...@@ -165,6 +165,7 @@ pragma Style_Checks ("M32766");
#ifdef __linux__ #ifdef __linux__
# include <pthread.h> # include <pthread.h>
# include <signal.h>
#endif #endif
#ifdef NATIVE #ifdef NATIVE
...@@ -1267,6 +1268,11 @@ CND(SIZEOF_struct_hostent, "struct hostent"); ...@@ -1267,6 +1268,11 @@ CND(SIZEOF_struct_hostent, "struct hostent");
#define SIZEOF_struct_servent (sizeof (struct servent)) #define SIZEOF_struct_servent (sizeof (struct servent))
CND(SIZEOF_struct_servent, "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 -- Fields of struct msghdr
......
...@@ -534,7 +534,8 @@ package System.OS_Interface is ...@@ -534,7 +534,8 @@ package System.OS_Interface is
private 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); pragma Convention (C, sigset_t);
for sigset_t'Alignment use Interfaces.C.unsigned_long'Alignment; for sigset_t'Alignment use Interfaces.C.unsigned_long'Alignment;
...@@ -561,28 +562,35 @@ private ...@@ -561,28 +562,35 @@ private
type unsigned_long_long_t is mod 2 ** 64; type unsigned_long_long_t is mod 2 ** 64;
-- Local type only used to get the alignment of this type below -- Local type only used to get the alignment of this type below
type pthread_attr_t is subtype char_array is Interfaces.C.char_array;
array (1 .. OS_Constants.PTHREAD_ATTR_SIZE) of unsigned_char;
type pthread_attr_t is record
Data : char_array (1 .. OS_Constants.PTHREAD_ATTR_SIZE);
end record;
pragma Convention (C, pthread_attr_t); pragma Convention (C, pthread_attr_t);
for pthread_attr_t'Alignment use Interfaces.C.unsigned_long'Alignment; for pthread_attr_t'Alignment use Interfaces.C.unsigned_long'Alignment;
type pthread_condattr_t is type pthread_condattr_t is record
array (1 .. OS_Constants.PTHREAD_CONDATTR_SIZE) of unsigned_char; Data : char_array (1 .. OS_Constants.PTHREAD_CONDATTR_SIZE);
end record;
pragma Convention (C, pthread_condattr_t); pragma Convention (C, pthread_condattr_t);
for pthread_condattr_t'Alignment use Interfaces.C.int'Alignment; for pthread_condattr_t'Alignment use Interfaces.C.int'Alignment;
type pthread_mutexattr_t is type pthread_mutexattr_t is record
array (1 .. OS_Constants.PTHREAD_MUTEXATTR_SIZE) of unsigned_char; Data : char_array (1 .. OS_Constants.PTHREAD_MUTEXATTR_SIZE);
end record;
pragma Convention (C, pthread_mutexattr_t); pragma Convention (C, pthread_mutexattr_t);
for pthread_mutexattr_t'Alignment use Interfaces.C.int'Alignment; for pthread_mutexattr_t'Alignment use Interfaces.C.int'Alignment;
type pthread_mutex_t is type pthread_mutex_t is record
array (1 .. OS_Constants.PTHREAD_MUTEX_SIZE) of unsigned_char; Data : char_array (1 .. OS_Constants.PTHREAD_MUTEX_SIZE);
end record;
pragma Convention (C, pthread_mutex_t); pragma Convention (C, pthread_mutex_t);
for pthread_mutex_t'Alignment use Interfaces.C.unsigned_long'Alignment; for pthread_mutex_t'Alignment use Interfaces.C.unsigned_long'Alignment;
type pthread_cond_t is type pthread_cond_t is record
array (1 .. OS_Constants.PTHREAD_COND_SIZE) of unsigned_char; Data : char_array (1 .. OS_Constants.PTHREAD_COND_SIZE);
end record;
pragma Convention (C, pthread_cond_t); pragma Convention (C, pthread_cond_t);
for pthread_cond_t'Alignment use unsigned_long_long_t'Alignment; for pthread_cond_t'Alignment use unsigned_long_long_t'Alignment;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment