diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 12:41:01 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 12:41:01 +0100 |
commit | 6db566c308dd9ecf9e82938d7bec32884a596e74 (patch) | |
tree | 3beb37af116d2dcf9f705e6d213741c7822895b3 /gcc/ada/socket.c | |
parent | 43254605cb483d1f7fd5f8df8390d29e4442ba4e (diff) | |
download | gcc-6db566c308dd9ecf9e82938d7bec32884a596e74.zip gcc-6db566c308dd9ecf9e82938d7bec32884a596e74.tar.gz gcc-6db566c308dd9ecf9e82938d7bec32884a596e74.tar.bz2 |
[multiple changes]
2012-10-29 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document that pragma Optimize_Alignment (Space) is
ignored with a warning for packed variable length records.
2012-10-29 Thomas Quinot <quinot@adacore.com>
* socket.c, g-socthi-dummy.adb, g-socthi-dummy.ads, g-socthi-vms.adb,
g-socthi-vms.ads, g-socthi-vxworks.adb, g-socthi-vxworks.ads,
s-oscons-tmplt.c, g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
g-socthi.ads, xoscons.adb, g-socket.adb, g-sothco.ads: Introduce an
appropriate subtype for IOCTL requests, since these may be signed or
unsigned.
From-SVN: r192939
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r-- | gcc/ada/socket.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index ee1f760..18999b3 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 2003-2010, Free Software Foundation, Inc. * + * Copyright (C) 2003-2012, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -33,7 +33,7 @@ #include "gsocket.h" -#ifdef VMS +#if defined(VMS) /* * For VMS, gsocket.h can't include sockets-related DEC C header files * when building the runtime (because these files are in a DEC C text library @@ -65,6 +65,10 @@ struct servent { int s_port; __netdb_char_ptr s_proto; }; +#elif defined(__FreeBSD__) +typedef unsigned int IOCTL_Req_T; +#else +typedef int IOCTL_Req_T; #endif #if defined(HAVE_SOCKETS) @@ -98,7 +102,7 @@ extern fd_set *__gnat_new_socket_set (fd_set *); extern void __gnat_remove_socket_from_set (fd_set *, int); extern void __gnat_reset_socket_set (fd_set *); extern int __gnat_get_h_errno (void); -extern int __gnat_socket_ioctl (int, int, int *); +extern int __gnat_socket_ioctl (int, IOCTL_Req_T, int *); extern char * __gnat_servent_s_name (struct servent *); extern char * __gnat_servent_s_alias (struct servent *, int index); @@ -526,7 +530,7 @@ __gnat_get_h_errno (void) { /* Wrapper for ioctl(2), which is a variadic function */ int -__gnat_socket_ioctl (int fd, int req, int *arg) { +__gnat_socket_ioctl (int fd, IOCTL_Req_T req, int *arg) { #if defined (_WIN32) return ioctlsocket (fd, req, arg); #elif defined (__APPLE__) |