Revert "Revert "rts/base: Fix #9423"" and resolve issue that caused the revert.

Authored by AndreasVoellmy on Aug 23 2014, 12:05 PM.



This reverts commit 4748f5936fe72d96edfa17b153dbfd84f2c4c053. The fix for Trac #9423
was reverted because this commit introduced a C function setIOManagerControlFd()
(defined in Schedule.c) defined for all OS types, while the prototype
(in includes/rts/IOManager.h) was only included when mingw32_HOST_OS is
not defined. This broke Windows builds.

This commit reverts the original commit and resolves the problem by only defining
setIOManagerControlFd() when mingw32_HOST_OS is defined. Hence the missing prototype
error should not occur on Windows.

In addition, since the io_manager_control_wr_fd field of the Capability struct is only
usd by the setIOManagerControlFd, this commit includes the io_manager_control_wr_fd
field in the Capability struct only when mingw32_HOST_OS is not defined.

Test Plan

Try to compile successfully on all platforms.

Diff Detail

rGHC Glasgow Haskell Compiler
Lint Skipped
Unit Tests Skipped
AndreasVoellmy retitled this revision from to Revert "Revert "rts/base: Fix #9423"" and resolve issue that caused the revert..
AndreasVoellmy updated this object.
AndreasVoellmy edited the test plan for this revision. (Show Details)
AndreasVoellmy added a reviewer: austin.
AndreasVoellmy edited edge metadata.
  • Include of rts/IOManager.h is not needed for mingw32_HOST_OS.

This seems stalled, though I think it is ready. Is there anything I can do to help move this along?

austin accepted this revision.Sep 15 2014, 8:09 AM
austin edited edge metadata.

LGTM. I'm pushing this shortly...

This revision is now accepted and ready to land.Sep 15 2014, 8:09 AM
austin closed this revision.Sep 16 2014, 7:58 AM
austin updated this revision to Diff 553.

Closed by commit rGHC7e658bc14e2d (authored by @AndreasVoellmy, committed by @austin).