- num_found =
- poll (gdb_notifier.poll_fds,
- (unsigned long) gdb_notifier.num_fds,
- gdb_notifier.timeout_valid ? gdb_notifier.timeout : -1);
-
- /* Don't print anything if we get out of poll because of a
- signal. */
- if (num_found == -1 && errno != EINTR)
- perror_with_name ("Poll");
-
-#else /* ! HAVE_POLL */
- memcpy (gdb_notifier.ready_masks,
- gdb_notifier.check_masks,
- 3 * MASK_SIZE * sizeof (fd_mask));
- num_found = select (gdb_notifier.num_fds,
- (SELECT_MASK *) & gdb_notifier.ready_masks[0],
- (SELECT_MASK *) & gdb_notifier.ready_masks[MASK_SIZE],
- (SELECT_MASK *) & gdb_notifier.ready_masks[2 * MASK_SIZE],
- gdb_notifier.timeout_valid ? &gdb_notifier.timeout : NULL);
-
- /* Clear the masks after an error from select. */
- if (num_found == -1)
+ num_found =
+ poll (gdb_notifier.poll_fds,
+ (unsigned long) gdb_notifier.num_fds,
+ gdb_notifier.timeout_valid ? gdb_notifier.poll_timeout : -1);
+
+ /* Don't print anything if we get out of poll because of a
+ signal. */
+ if (num_found == -1 && errno != EINTR)
+ perror_with_name ("Poll");
+#else
+ internal_error (__FILE__, __LINE__,
+ "use_poll without HAVE_POLL");
+#endif /* HAVE_POLL */
+ }
+ else