www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2507] New: No support for Posix on Windows

reply d-bugmail puremagic.com writes:

           Summary: No support for Posix on Windows
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: 2korden gmail.com

This is not a Phobos but a druntime issue, but it doesn't present in a list.

The following line fails to compile on Windows:
import stdc.posix.arpa.inet;

src\druntime\import\stdc\posix\arpa\inet.d(13): import socklen_t not found
src\druntime\import\stdc\posix\arpa\inet.d(13): alias
stdc.posix.arpa.inet.socklen_t recursive alias declaration

Many declorations any not present in version(Windows). There should be either a
static assert(false, "Not supported on Windows"); or it should just work.

In need this module to use bsd sockets and helper functions (htonl, ntohl etc)

Dec 11 2008
next sibling parent d-bugmail puremagic.com writes:

sean invisibleduck.org changed:

           What    |Removed                     |Added
         AssignedTo|bugzilla digitalmars.com    |sean invisibleduck.org

------- Comment #1 from sean invisibleduck.org  2008-12-11 16:46 -------
This is a slightly weird situation.  Windows does actually claim Posix
compliance provided you have the proper subsystem installed (I think it's even
bundled as a part of the OS with Vista), so I think the proper behavior should
be to treat Windows Posix support as simply not yet implemented, just like
Solaris, etc.  Given this, the headers are already implemented correctly.  The
compile errors are intended, and serve as an easy means of determining, by the
errors, what functionality must be added to support some new configuration.

That said, I'd suggest not actually using the Posix features of Windows, since
they're poorly implemented.  If you need something in the Windows headers that
aren't currently there, perhaps that should be submitted as a separate issue?

Dec 11 2008
prev sibling parent d-bugmail puremagic.com writes:

bugzilla digitalmars.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

------- Comment #2 from bugzilla digitalmars.com  2008-12-12 00:58 -------
I agree, Posix support under Windows should not be in druntime. druntime should
support the native Windows API. If there is posix support under Windows for D,
it should be done as a separate library.

Dec 11 2008