www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10469] New: WinAPI declarations in std.process should be moved to core.sys.windows.windows

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10469

           Summary: WinAPI declarations in std.process should be moved to
                    core.sys.windows.windows
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: andrej.mitrovich gmail.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-06-24
15:25:08 PDT ---
These Windows API declarations should be moved out of std.process and into
core.sys.windows.windows:

-----
version (Windows)
{
    extern(Windows) BOOL GetHandleInformation(HANDLE hObject,
                                              LPDWORD lpdwFlags);
    extern(Windows) BOOL SetHandleInformation(HANDLE hObject,
                                              DWORD dwMask,
                                              DWORD dwFlags);
    extern(Windows) BOOL TerminateProcess(HANDLE hProcess,
                                          UINT uExitCode);
    extern(Windows) LPWSTR* CommandLineToArgvW(LPCWSTR lpCmdLine,
                                               int* pNumArgs);
    enum
    {
        HANDLE_FLAG_INHERIT = 0x1,
        HANDLE_FLAG_PROTECT_FROM_CLOSE = 0x2,
    }
    enum CREATE_UNICODE_ENVIRONMENT = 0x400;
}
-----

The reason why is because code which uses both the WindowsAPI[1] project and
std.process together can fail to build due to conflicts. It's mostly the enum
definitions that are the problem, but we should move the function declarations
to core.sys.windows.windows as well.

[1] : http://www.dsource.org/projects/bindings/wiki/WindowsApi

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 24 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10469


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-06-24
15:38:06 PDT ---
Both need to be pulled together:

https://github.com/D-Programming-Language/druntime/pull/533
https://github.com/D-Programming-Language/phobos/pull/1371

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 24 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10469



--- Comment #2 from github-bugzilla puremagic.com 2013-06-24 17:59:53 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/e12b000d05e6fa6d4bd08c611504ca4bf912f510
Fixes Issue 10469 - Move WinAPI prototypes and enums need by std.process into
core.sys.windows.windows.

https://github.com/D-Programming-Language/druntime/commit/3e51a556de7e943ddd026f8beb35ffccfc9cf408
Merge pull request #533 from AndrejMitrovic/Fix10469

Issue 10469 - Move WinAPI prototypes and enums need by std.process to
core.sys.windows.windows

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 24 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10469



--- Comment #3 from github-bugzilla puremagic.com 2013-06-24 22:56:59 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/f7b36b9124b8e0769d2a8a318745d5e9c4d61fda
Fixes Issue 10469 - Remove WinAPI prototypes and enums from std.process.

https://github.com/D-Programming-Language/phobos/commit/4e7cb93c44c1626c986b96b60dce7dcae934cc54
Merge pull request #1371 from AndrejMitrovic/Fix10469

Issue 10469 - Remove WinAPI prototypes and enums from std.process.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 24 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10469


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 24 2013