Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/core/runtime.d
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ extern (C) bool runModuleUnitTests()
import core.sys.osx.execinfo;
else version( FreeBSD )
import core.sys.freebsd.execinfo;
else version( DragonFlyBSD )
import core.sys.dragonflybsd.execinfo;
else version( Windows )
import core.sys.windows.stacktrace;
else version( Solaris )
Expand Down Expand Up @@ -489,6 +491,8 @@ Throwable.TraceInfo defaultTraceHandler( void* ptr = null )
import core.sys.osx.execinfo;
else version( FreeBSD )
import core.sys.freebsd.execinfo;
else version( DragonFlyBSD )
import core.sys.dragonflybsd.execinfo;
else version( Windows )
import core.sys.windows.stacktrace;
else version( Solaris )
Expand Down Expand Up @@ -650,6 +654,18 @@ Throwable.TraceInfo defaultTraceHandler( void* ptr = null )
symEnd = eptr - buf.ptr;
}
}
else version( DragonFlyBSD )
{
// format is: 0x00000000 <_D6module4funcAFZv+0x78> at module
auto bptr = cast(char*) memchr( buf.ptr, '<', buf.length );
auto eptr = cast(char*) memchr( buf.ptr, '+', buf.length );

if( bptr++ && eptr )
{
symBeg = bptr - buf.ptr;
symEnd = eptr - buf.ptr;
}
}
else version( Solaris )
{
// format is object'symbol+offset [pc]
Expand Down
2 changes: 2 additions & 0 deletions src/core/stdc/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ else version( DigitalMars )
alias real c_long_double;
else version( FreeBSD )
alias real c_long_double;
else version( DragonFlyBSD )
alias real c_long_double;
else version( Solaris )
alias real c_long_double;
else version( OSX )
Expand Down
103 changes: 103 additions & 0 deletions src/core/stdc/errno.d
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,109 @@ else version( FreeBSD )
enum EPROTO = 92; /// Protocol error
enum ELAST = 92; /// Must be equal largest errno
}
else version( DragonFlyBSD )
{
enum EPERM = 1;
enum ENOENT = 2;
enum ESRCH = 3;
enum EINTR = 4;
enum EIO = 5;
enum ENXIO = 6;
enum E2BIG = 7;
enum ENOEXEC = 8;
enum EBADF = 9;
enum ECHILD = 10;
enum EDEADLK = 11;
enum ENOMEM = 12;
enum EACCES = 13;
enum EFAULT = 14;
enum ENOTBLK = 15;
enum EBUSY = 16;
enum EEXIST = 17;
enum EXDEV = 18;
enum ENODEV = 19;
enum ENOTDIR = 20;
enum EISDIR = 21;
enum EINVAL = 22;
enum ENFILE = 23;
enum EMFILE = 24;
enum ENOTTY = 25;
enum ETXTBSY = 26;
enum EFBIG = 27;
enum ENOSPC = 28;
enum ESPIPE = 29;
enum EROFS = 30;
enum EMLINK = 31;
enum EPIPE = 32;
enum EDOM = 33;
enum ERANGE = 34;
enum EAGAIN = 35;
enum EWOULDBLOCK = EAGAIN;
enum EINPROGRESS = 36;
enum EALREADY = 37;
enum ENOTSOCK = 38;
enum EDESTADDRREQ = 39;
enum EMSGSIZE = 40;
enum EPROTOTYPE = 41;
enum ENOPROTOOPT = 42;
enum EPROTONOSUPPORT = 43;
enum ENOTSUP = 45;
enum EOPNOTSUPP = ENOTSUP;
enum EPFNOSUPPORT = 46;
enum EAFNOSUPPORT = 47;
enum EADDRINUSE = 48;
enum EADDRNOTAVAIL = 49;
enum ENETDOWN = 50;
enum ENETUNREACH = 51;
enum ENETRESET = 52;
enum ECONNABORTED = 53;
enum ECONNRESET = 54;
enum ENOBUFS = 55;
enum EISCONN = 56;
enum ENOTCONN = 57;
enum ESHUTDOWN = 58;
enum ETOOMANYREFS = 59;
enum ETIMEDOUT = 60;
enum ECONNREFUSED = 61;
enum ELOOP = 62;
enum ENAMETOOLONG = 63;
enum EHOSTUNREACH = 65;
enum ENOTEMPTY = 66;
enum EPROCLIM = 67;
enum EUSERS = 68;
enum EDQUOT = 69;
enum ESTALE = 70;
enum EREMOTE = 71;
enum EBADRPC = 72;
enum ERPCMISMATCH = 73;
enum EPROGUNAVAIL = 74;
enum EPROGMISMATCH = 75;
enum EPROCUNAVAIL = 76;
enum ENOLCK = 77;
enum ENOSYS = 78;
enum EFTYPE = 79;
enum EAUTH = 80;
enum ENEEDAUTH = 81;
enum EIDRM = 82;
enum ENOMSG = 83;
enum EOVERFLOW = 84;
enum ECANCELED = 85;
enum EILSEQ = 86;
enum ENOATTR = 87;
enum EDOOFUS = 88;
enum EBADMSG = 89;
enum EMULTIHOP = 90;
enum ENOLINK = 91;
enum EPROTO = 92;
enum ENOMEDIUM = 93;
enum EUNUSED94 = 94;
enum EUNUSED95 = 95;
enum EUNUSED96 = 96;
enum EUNUSED97 = 97;
enum EUNUSED98 = 98;
enum EASYNC = 99;
enum ELAST = 99;
}
else version (Solaris)
{
enum EPERM = 1 /** Not super-user */;
Expand Down
24 changes: 24 additions & 0 deletions src/core/stdc/fenv.d
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,24 @@ else version ( FreeBSD )

alias ushort fexcept_t;
}
else version ( DragonFlyBSD )
{
struct fenv_t
{
struct _x87
{
uint control;
uint status;
uint tag;
uint[4] others;
};
_x87 x87;

uint mxcsr;
}

alias uint fexcept_t;
}
else version( CRuntime_Bionic )
{
version(X86)
Expand Down Expand Up @@ -304,6 +322,12 @@ else version( FreeBSD )
///
enum FE_DFL_ENV = &__fe_dfl_env;
}
else version( DragonFlyBSD )
{
private extern const fenv_t __fe_dfl_env;
///
enum FE_DFL_ENV = &__fe_dfl_env;
}
else version( CRuntime_Bionic )
{
private extern const fenv_t __fe_dfl_env;
Expand Down
17 changes: 17 additions & 0 deletions src/core/stdc/locale.d
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ else version(FreeBSD)
///
enum LC_MESSAGES = 6;
}
else version(DragonFlyBSD)
{
///
enum LC_ALL = 0;
///
enum LC_COLLATE = 1;
///
enum LC_CTYPE = 2;
///
enum LC_MONETARY = 3;
///
enum LC_NUMERIC = 4;
///
enum LC_TIME = 5;
///
enum LC_MESSAGES = 6;
}
else version(Solaris)
{
enum LC_CTYPE = 0;
Expand Down
Loading