digitalmars.D.bugs - [Issue 15036] New: SimpleDllMain assumes various symbols are
- via Digitalmars-d-bugs (28/28) Sep 11 2015 https://issues.dlang.org/show_bug.cgi?id=15036
https://issues.dlang.org/show_bug.cgi?id=15036 Issue ID: 15036 Summary: SimpleDllMain assumes various symbols are available unqualified Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: trivial Priority: P1 Component: druntime Assignee: nobody puremagic.com Reporter: jakobovrum gmail.com Code like the following does not compile: version(Windows) { import core.sys.windows.dll : SimpleDllMain; mixin SimpleDllMain; } Because SimpleDllMain depends on dll_process_attach, dll_process_detach, dll_thread_attach and dll_thread_detach from core.sys.windows.dll. Statically importing the module, or using a renamed import, would also break the mixin. It would probably be a robust fix to add: import core.sys.windows.dll : dll_process_attach, dll_process_detach, dll_thread_attach, dll_thread_detach; To the body of the DllMain function inside the mixin. --
Sep 11 2015