aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-oscons-tmplt.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 18:01:19 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 18:01:19 +0100
commitf1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7 (patch)
treea0ba866ce4e9b2ddf5a2203f29d444ceede22713 /gcc/ada/s-oscons-tmplt.c
parent47752af2e8442f1141f1025e58f9dcb76cdd7422 (diff)
downloadgcc-f1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7.zip
gcc-f1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7.tar.gz
gcc-f1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7.tar.bz2
[multiple changes]
2014-02-24 Thomas Quinot <quinot@adacore.com> * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image. * s-oscons-tmplt.c: On VxWorks, include adaint.h only after vxWorks.h has been included. Also ensure that file attributes related definitions are output even in cases where socket support is not enabled. * a-tags.adb: Code clean up. * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote instead of -I to add the main ada source directory to the header search path, in order to avoid conflict between our own "types.h" and VxWork's <types.h>. 2014-02-24 Robert Dewar <dewar@adacore.com> * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter. * debug.adb: Remove documentation of -gnatd.X, no longer used. * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated. 2014-02-24 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Improve documentation of gnatpp. From-SVN: r208083
Diffstat (limited to 'gcc/ada/s-oscons-tmplt.c')
-rw-r--r--gcc/ada/s-oscons-tmplt.c62
1 files changed, 36 insertions, 26 deletions
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index deb1855..5a034d5 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -89,7 +89,6 @@ pragma Style_Checks ("M32766");
/* Include gsocket.h before any system header so it can redefine FD_SETSIZE */
#include "gsocket.h"
-#include "adaint.h"
#include <stdlib.h>
#include <string.h>
@@ -114,12 +113,15 @@ pragma Style_Checks ("M32766");
/**
** For VxWorks, always include vxWorks.h (gsocket.h provides it only for
- ** the case of runtime libraries that support sockets).
+ ** the case of runtime libraries that support sockets). Note: this must
+ ** be done before including adaint.h.
**/
# include <vxWorks.h>
#endif
+#include "adaint.h"
+
#ifdef DUMMY
# if defined (TARGET)
@@ -1344,30 +1346,6 @@ CND(SIZEOF_struct_servent, "struct servent")
CND(SIZEOF_sigset, "sigset")
#endif
-/**
- ** Note: this constant can be used in the GNAT runtime library. In compiler
- ** units on the other hand, System.OS_Constants is not available, so we
- ** declare an Ada constant (Osint.File_Attributes_Size) independently, which
- ** is at least as large as sizeof (struct file_attributes), and we have an
- ** assertion at initialization of Osint checking that the size is indeed at
- ** least sufficient.
- **/
-#define SIZEOF_struct_file_attributes (sizeof (struct file_attributes))
-CND(SIZEOF_struct_file_attributes, "struct file_attributes")
-
-/**
- ** Maximal size of buffer for struct dirent. Note: Since POSIX.1 does not
- ** specify the size of the d_name field, and other nonstandard fields may
- ** precede that field within the dirent structure, we must make a conservative
- ** computation.
- **/
-{
- struct dirent dent;
-#define SIZEOF_struct_dirent_alloc \
- ((char*) &dent.d_name - (char*) &dent) + NAME_MAX + 1
-CND(SIZEOF_struct_dirent_alloc, "struct dirent allocation")
-}
-
/*
-- Fields of struct msghdr
@@ -1508,6 +1486,38 @@ CND(PTHREAD_ONCE_SIZE, "pthread_once_t")
#endif /* __APPLE__ || __linux__ */
+/*
+
+ --------------------------------
+ -- File and directory support --
+ --------------------------------
+
+*/
+
+/**
+ ** Note: this constant can be used in the GNAT runtime library. In compiler
+ ** units on the other hand, System.OS_Constants is not available, so we
+ ** declare an Ada constant (Osint.File_Attributes_Size) independently, which
+ ** is at least as large as sizeof (struct file_attributes), and we have an
+ ** assertion at initialization of Osint checking that the size is indeed at
+ ** least sufficient.
+ **/
+#define SIZEOF_struct_file_attributes (sizeof (struct file_attributes))
+CND(SIZEOF_struct_file_attributes, "struct file_attributes")
+
+/**
+ ** Maximal size of buffer for struct dirent. Note: Since POSIX.1 does not
+ ** specify the size of the d_name field, and other nonstandard fields may
+ ** precede that field within the dirent structure, we must make a conservative
+ ** computation.
+ **/
+{
+ struct dirent dent;
+#define SIZEOF_struct_dirent_alloc \
+ ((char*) &dent.d_name - (char*) &dent) + NAME_MAX + 1
+CND(SIZEOF_struct_dirent_alloc, "struct dirent allocation")
+}
+
/**
** System-specific constants follow
** Each section should be activated if compiling for the corresponding