www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19177] New: No version (Solaris) in

https://issues.dlang.org/show_bug.cgi?id=19177

          Issue ID: 19177
           Summary: No version (Solaris) in druntime/src/core/stdc/time.d
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Solaris
            Status: NEW
          Severity: critical
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: crayolist gmail.com

When building ldc I get the following error;

/root/work/ldc/runtime/druntime/src/core/stdc/time.d(142): Error: static
assert:  "unsupported system"

This is because there is no version (Solaris) declared.

Need to add:

else version ( Solaris )
{
    enum clock_t CLOCKS_PER_SEC = 1_000_000;
    clock_t clock();
}









Here is the full section;

///
version( Windows )
{
    enum clock_t CLOCKS_PER_SEC = 1000;
    clock_t clock();
}
else version( OSX )
{
    enum clock_t CLOCKS_PER_SEC = 100;
    version (X86)
        extern (C) pragma(mangle, "clock$UNIX2003") clock_t clock();
    else
        clock_t clock();
}
else version( Darwin ) // other Darwins (iOS, TVOS, WatchOS)
{
    enum clock_t CLOCKS_PER_SEC = 1_000_000;
    clock_t clock();
}
else version( FreeBSD )
{
    enum clock_t CLOCKS_PER_SEC = 128;
    clock_t clock();
}
else version( NetBSD )
{
    enum clock_t CLOCKS_PER_SEC = 100;
    clock_t clock();
}
else version( OpenBSD )
{
    enum clock_t CLOCKS_PER_SEC = 100;
    clock_t clock();
}
else version( DragonFlyBSD )
{
    enum clock_t CLOCKS_PER_SEC = 128;
    clock_t clock();
}
else version (CRuntime_Glibc)
{
    enum clock_t CLOCKS_PER_SEC = 1_000_000;
    clock_t clock();
}
else version (CRuntime_Musl)
{
    enum clock_t CLOCKS_PER_SEC = 1_000_000;
    clock_t clock();
}
else version (CRuntime_Bionic)
{
    enum clock_t CLOCKS_PER_SEC = 1_000_000;
    clock_t clock();
}
else version (CRuntime_UClibc)
{
    enum clock_t CLOCKS_PER_SEC = 1_000_000;
    clock_t clock();
}
else
{
    static assert(0, "unsupported system");
}

--
Aug 17 2018