In order to catch timeout events on fds which are readable and which
have been ioctl(TCSETA)'d with a VTIMEout, we appear to need to ask if
the fd is writable, for some reason.  Ask me not why.  Since this is
strange and potentially troublesome we only do it if the user asks
specially, by specifying --wierd-hacks=ioctl-VTIME.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@264 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 330068d..05273b1 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -441,6 +441,7 @@
 ULong  VG_(clo_stop_after);
 Int    VG_(clo_dump_error);
 Int    VG_(clo_backtrace_size);
+Char*  VG_(clo_wierd_hacks);
 
 /* This Bool is needed by wrappers in vg_clientmalloc.c to decide how
    to behave.  Initially we say False. */
@@ -533,6 +534,7 @@
    VG_(clo_stop_after)       = 1000000000000LL;
    VG_(clo_dump_error)       = 0;
    VG_(clo_backtrace_size)   = 4;
+   VG_(clo_wierd_hacks)      = NULL;
 
    eventually_logfile_fd = VG_(clo_logfile_fd);
 
@@ -797,6 +799,9 @@
       else if (STREQ(argv[i], "--trace-pthread=all"))
          VG_(clo_trace_pthread_level) = 2;
 
+      else if (STREQN(14, argv[i], "--wierd-hacks="))
+         VG_(clo_wierd_hacks) = &argv[i][14];
+
       else if (STREQN(13, argv[i], "--stop-after="))
          VG_(clo_stop_after) = VG_(atoll)(&argv[i][13]);