[add hIsEOF and hWaitForInput to standard library
John Meacham <john@repetae.net>**20090228052850
 Ignore-this: 557be21d165b4f938a9d041756e47785
] hunk ./data/rts/jhc_rts.c 10
-static HsInt jhc_data_unique;
+static HsInt jhc_data_unique A_UNUSED;
hunk ./data/rts/jhc_rts.c 81
+static HsBool A_UNUSED
+jhc_wait_for_input(FILE *f,HsInt timeout) {
+        fd_set fds;
+        FD_ZERO(&fds);
+        FD_SET(fileno(f),&fds);
+        struct timeval to = {  0, timeout * 1000 };
+        int retval = select(1,&fds,NULL,&fds,&to);
+        if(retval)
+                return HS_BOOL_TRUE;
+        else
+                return HS_BOOL_FALSE;
+
+}
+
hunk ./data/rts/jhc_rts_header.h 12
+#include <sys/select.h>
hunk ./lib/base/System/IO.hs 24
+    hIsEOF,
+    hWaitForInput,
hunk ./lib/base/System/IO.hs 80
+hWaitForInput :: Handle -> Int -> IO Bool
+hWaitForInput h to = withHandle h $ \ptr -> c_wait_for_input ptr to
+
hunk ./lib/base/System/IO.hs 171
+foreign import ccall "jhc_wait_for_input" c_wait_for_input :: Ptr Handle -> Int -> IO Bool