diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:20:47 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:20:47 +0100 |
commit | ff149a358cd46b8e54a0080e8c714103a8def136 (patch) | |
tree | 4e344719fe7e21476885c5dfa264200317167033 /gcc/ada/socket.c | |
parent | 2fc5ecb5a8bb3ebc7fad471a0dbd40939c6885e0 (diff) | |
download | gcc-ff149a358cd46b8e54a0080e8c714103a8def136.zip gcc-ff149a358cd46b8e54a0080e8c714103a8def136.tar.gz gcc-ff149a358cd46b8e54a0080e8c714103a8def136.tar.bz2 |
[multiple changes]
2009-11-30 Vincent Celier <celier@adacore.com>
* prj-makr.adb (Source_Files): New hash table to keep track of source
file names.
(Finalize): Avoid putting several times the same source file name
in the source list file.
* prj-pp.adb (Print): Fix a bug in the placement of "at nn" for
associative array indexes.
2009-11-30 Robert Dewar <dewar@adacore.com>
* g-dyntab.ads: Add missing pragma Compiler_Unit
2009-11-30 Thomas Quinot <quinot@adacore.com>
* s-crtrun.ads, s-crtl.ads, g-stseme.adb, Makefile.rtl, s-fileio.adb
(System.CRTL.Runtime): New unit, to contain parts of s-crtl that are
used in the Ada runtime but can't be used in the compiler because of
bootstrap issues.
* socket.c, s-oscons-tmplt.c, g-sothco.ads
(System.OS_Constants.SIZEOF_struct_servent): New constant.
Use s-oscons constant instead of external variable to get size of
struct hostent.
From-SVN: r154772
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r-- | gcc/ada/socket.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index ecafb8a..0bc4b43 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -35,11 +35,24 @@ #ifdef VMS /* * For VMS, gsocket.h can't include sockets-related DEC C header files - * when building the runtime (because these files are in DEC C archives, - * not accessable to GCC). So, we generate a separate header file along - * with s-oscons.ads and include it here. + * when building the runtime (because these files are in a DEC C text library + * (DECC$RTLDEF.TLB) not accessable to GCC). So, we generate a separate header + * file along with s-oscons.ads and include it here. */ # include "s-oscons.h" + +/* + * We also need the declaration of struct servent, which s-oscons can't + * provide, so we copy it manually here. This needs to be kept in synch + * with the definition of that structure in the DEC C headers, which + * hopefully won't change frequently. + */ +struct servent { + char *s_name; /* official service name */ + char **s_aliases; /* alias list */ + int s_port; /* port # */ + char *s_proto; /* protocol to use */ +}; #endif #if defined(HAVE_SOCKETS) @@ -59,9 +72,6 @@ #include <string.h> /* Required for memcpy() */ -extern const size_t __gnat_sizeof_servent = sizeof(struct servent); -/* For passing the size of servent to Ada code. */ - extern void __gnat_disable_sigpipe (int fd); extern void __gnat_disable_all_sigpipes (void); extern int __gnat_create_signalling_fds (int *fds); |