aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/socket.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-09 14:46:27 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-09 14:46:27 +0200
commit8cce3d7579f87245302f6ceae1b33412558da1c0 (patch)
tree95d004c63d3883e1949ae823996d9c6caeea7d2a /gcc/ada/socket.c
parente6a96e55f310e7221bf2c183a746cfe1746a97c9 (diff)
downloadgcc-8cce3d7579f87245302f6ceae1b33412558da1c0.zip
gcc-8cce3d7579f87245302f6ceae1b33412558da1c0.tar.gz
gcc-8cce3d7579f87245302f6ceae1b33412558da1c0.tar.bz2
[multiple changes]
2010-09-09 Robert Dewar <dewar@adacore.com> * sem_attr.adb: Minor reformatting. 2010-09-09 Thomas Quinot <quinot@adacore.com> * socket.c (__gnat_socket_ioctl): On Darwin, the req parameter is an unsigned long, not an int. 2010-09-09 Vincent Celier <celier@adacore.com> * make.adb, mlib-prj.adb, prj.adb, prj-nmsc.adb, mlib-tgt.adb, prj-conf.adb, prj-env.adb: Use Display_Name instead of Name whenever we are not checking for equality of path or file names. 2010-09-09 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Remove_Side_Effects): If the expression is a packed array reference, reset the Analyzed flag so that it is properly expanded when the resulting object declaration is analyzed. 2010-09-09 Vincent Celier <celier@adacore.com> * sinput-p.adb (Source_File_Is_Subunit): Return False if X is No_Source_File. 2010-09-09 Ramon Fernandez <fernandez@adacore.com> * sysdep.c: The wrSbc8548 BSP in MILS doesn't know anything about the VX_SPE_TASK option, so disable it. From-SVN: r164084
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r--gcc/ada/socket.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
index e68f435..31e3e58 100644
--- a/gcc/ada/socket.c
+++ b/gcc/ada/socket.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2003-2009, Free Software Foundation, Inc. *
+ * Copyright (C) 2003-2010, 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- *
@@ -529,6 +529,12 @@ int
__gnat_socket_ioctl (int fd, int req, int *arg) {
#if defined (_WIN32)
return ioctlsocket (fd, req, arg);
+#elif defined (__APPLE__)
+ /*
+ * On Darwin, req is an unsigned long, and we want to convert without sign
+ * extension to get the proper bit pattern in the case of a 64 bit kernel.
+ */
+ return ioctl (fd, (unsigned int) req, arg);
#else
return ioctl (fd, req, arg);
#endif