[Ada] Redefine IOV_MAX on Tru64 and VMS

Arnaud Charlet charlet@adacore.com
Mon Jun 14 09:24:00 GMT 2010


Redefine IOV_MAX on Tru64 and VMS since the vector IO doesn't work at
default value properly.

Tested on x86_64-pc-linux-gnu, committed on trunk

2010-06-14  Vasiliy Fofanov  <fofanov@adacore.com>

	* s-oscons-tmplt.c (IOV_MAX): redefine on Tru64 and VMS since the
	vector IO doesn't work at default value properly.

-------------- next part --------------
Index: s-oscons-tmplt.c
===================================================================
--- s-oscons-tmplt.c	(revision 160705)
+++ s-oscons-tmplt.c	(working copy)
@@ -98,6 +98,22 @@ pragma Style_Checks ("M32766");
 #include <limits.h>
 #include <fcntl.h>
 
+#if defined (__alpha__) && defined (__osf__)
+/** Tru64 is unable to do vector IO operations with default value of IOV_MAX,
+ ** so its value is redefined to a small one which is known to work properly.
+ **/
+#undef IOV_MAX
+#define IOV_MAX 16
+#endif
+
+#if defined (__VMS)
+/** VMS is unable to do vector IO operations with default value of IOV_MAX,
+ ** so its value is redefined to a small one which is known to work properly.
+ **/
+#undef IOV_MAX
+#define IOV_MAX 16
+#endif
+
 #if ! (defined (__vxworks) || defined (__VMS) || defined (__MINGW32__) || \
        defined (__nucleus__))
 # define HAVE_TERMIOS


More information about the Gcc-patches mailing list