Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 405722d

Browse files
committed
Sync with dlang/PR/1999
1 parent aecc450 commit 405722d

9 files changed

Lines changed: 103 additions & 99 deletions

File tree

src/core/stdc/errno.d

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,106 +1103,106 @@ else version( FreeBSD )
11031103
}
11041104
else version( DragonFlyBSD )
11051105
{
1106-
enum EPERM = 1; /// Operation not permitted
1107-
enum ENOENT = 2; /// No such file or directory
1108-
enum ESRCH = 3; /// No such process
1109-
enum EINTR = 4; /// Interrupted system call
1110-
enum EIO = 5; /// Input/output error
1111-
enum ENXIO = 6; /// Device not configured
1112-
enum E2BIG = 7; /// Argument list too long
1113-
enum ENOEXEC = 8; /// Exec format error
1114-
enum EBADF = 9; /// Bad file descriptor
1115-
enum ECHILD = 10; /// No child processes
1116-
enum EDEADLK = 11; /// Resource deadlock avoided
1117-
enum ENOMEM = 12; /// Cannot allocate memory
1118-
enum EACCES = 13; /// Permission denied
1119-
enum EFAULT = 14; /// Bad address
1120-
enum ENOTBLK = 15; /// Block device required
1121-
enum EBUSY = 16; /// Device busy
1122-
enum EEXIST = 17; /// File exists
1123-
enum EXDEV = 18; /// Cross-device link
1124-
enum ENODEV = 19; /// Operation not supported by device
1125-
enum ENOTDIR = 20; /// Not a directory
1126-
enum EISDIR = 21; /// Is a directory
1127-
enum EINVAL = 22; /// Invalid argument
1128-
enum ENFILE = 23; /// Too many open files in system
1129-
enum EMFILE = 24; /// Too many open files
1130-
enum ENOTTY = 25; /// Inappropriate ioctl for device
1131-
enum ETXTBSY = 26; /// Text file busy
1132-
enum EFBIG = 27; /// File too large
1133-
enum ENOSPC = 28; /// No space left on device
1134-
enum ESPIPE = 29; /// Illegal seek
1135-
enum EROFS = 30; /// Read-only file system
1136-
enum EMLINK = 31; /// Too many links
1137-
enum EPIPE = 32; /// Broken pipe
1138-
enum EDOM = 33; /// Numerical argument out of domain
1139-
enum ERANGE = 34; /// Result too large
1140-
enum EAGAIN = 35; /// Resource temporarily unavailable
1141-
enum EWOULDBLOCK = EAGAIN; /// Operation would block
1142-
enum EINPROGRESS = 36; /// Operation now in progress
1143-
enum EALREADY = 37; /// Operation already in progress
1144-
enum ENOTSOCK = 38; /// Socket operation on non-socket
1145-
enum EDESTADDRREQ = 39; /// Destination address required
1146-
enum EMSGSIZE = 40; /// Message too long
1147-
enum EPROTOTYPE = 41; /// Protocol wrong type for socket
1148-
enum ENOPROTOOPT = 42; /// Protocol not available
1149-
enum EPROTONOSUPPORT = 43; /// Protocol not supported
1150-
enum ENOTSUP = 45; /// Operation not supported
1151-
enum EOPNOTSUPP = ENOTSUP; /// Operation not supported on socket
1152-
enum EPFNOSUPPORT = 46; /// Protocol family not supported
1153-
enum EAFNOSUPPORT = 47; /// Address family not supported by protocol family
1154-
enum EADDRINUSE = 48; /// Address already in use
1155-
enum EADDRNOTAVAIL = 49; /// Can't assign requested address
1156-
enum ENETDOWN = 50; /// Network is down
1157-
enum ENETUNREACH = 51; /// Network is unreachable
1158-
enum ENETRESET = 52; /// Network dropped connection on reset
1159-
enum ECONNABORTED = 53; /// Software caused connection abort
1160-
enum ECONNRESET = 54; /// Connection reset by peer
1161-
enum ENOBUFS = 55; /// No buffer space available
1162-
enum EISCONN = 56; /// Socket is already connected
1163-
enum ENOTCONN = 57; /// Socket is not connected
1164-
enum ESHUTDOWN = 58; /// Can't send after socket shutdown
1165-
enum ETOOMANYREFS = 59; /// Too many refrences; can't splice
1166-
enum ETIMEDOUT = 60; /// Operation timed out
1167-
enum ECONNREFUSED = 61; /// Connection refused
1168-
enum ELOOP = 62; /// Too many levels of symbolic links
1169-
enum ENAMETOOLONG = 63; /// File name too long
1170-
enum EHOSTUNREACH = 65; /// No route to host
1171-
enum ENOTEMPTY = 66; /// Directory not empty
1172-
enum EPROCLIM = 67; /// Too many processes
1173-
enum EUSERS = 68; /// Too many users
1174-
enum EDQUOT = 69; /// Disc quota exceeded
1175-
enum ESTALE = 70; /// Stale NFS file handle
1176-
enum EREMOTE = 71; /// Too many levels of remote in path
1177-
enum EBADRPC = 72; /// RPC struct is bad
1178-
enum ERPCMISMATCH = 73; /// RPC version wrong
1179-
enum EPROGUNAVAIL = 74; /// RPC prog. not avail
1180-
enum EPROGMISMATCH = 75; /// Program version wrong
1181-
enum EPROCUNAVAIL = 76; /// Bad procedure for program
1182-
enum ENOLCK = 77; /// No locks available
1183-
enum ENOSYS = 78; /// Function not implemented
1184-
enum EFTYPE = 79; /// Inappropriate file type or format
1185-
enum EAUTH = 80; /// Authentication error
1186-
enum ENEEDAUTH = 81; /// Need authenticator
1187-
enum EIDRM = 82; /// Itendifier removed
1188-
enum ENOMSG = 83; /// No message of desired type
1189-
enum EOVERFLOW = 84; /// Value too large to be stored in data type
1190-
enum ECANCELED = 85; /// Operation canceled
1191-
enum EILSEQ = 86; /// Illegal byte sequence
1192-
enum ENOATTR = 87; /// Attribute not found
1193-
enum EDOOFUS = 88; /// Programming error
1194-
enum EBADMSG = 89; /// Bad message
1195-
enum EMULTIHOP = 90; /// Multihop attempted
1196-
enum ENOLINK = 91; /// Link has been severed
1197-
enum EPROTO = 92; /// Protocol error
1106+
enum EPERM = 1;
1107+
enum ENOENT = 2;
1108+
enum ESRCH = 3;
1109+
enum EINTR = 4;
1110+
enum EIO = 5;
1111+
enum ENXIO = 6;
1112+
enum E2BIG = 7;
1113+
enum ENOEXEC = 8;
1114+
enum EBADF = 9;
1115+
enum ECHILD = 10;
1116+
enum EDEADLK = 11;
1117+
enum ENOMEM = 12;
1118+
enum EACCES = 13;
1119+
enum EFAULT = 14;
1120+
enum ENOTBLK = 15;
1121+
enum EBUSY = 16;
1122+
enum EEXIST = 17;
1123+
enum EXDEV = 18;
1124+
enum ENODEV = 19;
1125+
enum ENOTDIR = 20;
1126+
enum EISDIR = 21;
1127+
enum EINVAL = 22;
1128+
enum ENFILE = 23;
1129+
enum EMFILE = 24;
1130+
enum ENOTTY = 25;
1131+
enum ETXTBSY = 26;
1132+
enum EFBIG = 27;
1133+
enum ENOSPC = 28;
1134+
enum ESPIPE = 29;
1135+
enum EROFS = 30;
1136+
enum EMLINK = 31;
1137+
enum EPIPE = 32;
1138+
enum EDOM = 33;
1139+
enum ERANGE = 34;
1140+
enum EAGAIN = 35;
1141+
enum EWOULDBLOCK = EAGAIN;
1142+
enum EINPROGRESS = 36;
1143+
enum EALREADY = 37;
1144+
enum ENOTSOCK = 38;
1145+
enum EDESTADDRREQ = 39;
1146+
enum EMSGSIZE = 40;
1147+
enum EPROTOTYPE = 41;
1148+
enum ENOPROTOOPT = 42;
1149+
enum EPROTONOSUPPORT = 43;
1150+
enum ENOTSUP = 45;
1151+
enum EOPNOTSUPP = ENOTSUP;
1152+
enum EPFNOSUPPORT = 46;
1153+
enum EAFNOSUPPORT = 47;
1154+
enum EADDRINUSE = 48;
1155+
enum EADDRNOTAVAIL = 49;
1156+
enum ENETDOWN = 50;
1157+
enum ENETUNREACH = 51;
1158+
enum ENETRESET = 52;
1159+
enum ECONNABORTED = 53;
1160+
enum ECONNRESET = 54;
1161+
enum ENOBUFS = 55;
1162+
enum EISCONN = 56;
1163+
enum ENOTCONN = 57;
1164+
enum ESHUTDOWN = 58;
1165+
enum ETOOMANYREFS = 59;
1166+
enum ETIMEDOUT = 60;
1167+
enum ECONNREFUSED = 61;
1168+
enum ELOOP = 62;
1169+
enum ENAMETOOLONG = 63;
1170+
enum EHOSTUNREACH = 65;
1171+
enum ENOTEMPTY = 66;
1172+
enum EPROCLIM = 67;
1173+
enum EUSERS = 68;
1174+
enum EDQUOT = 69;
1175+
enum ESTALE = 70;
1176+
enum EREMOTE = 71;
1177+
enum EBADRPC = 72;
1178+
enum ERPCMISMATCH = 73;
1179+
enum EPROGUNAVAIL = 74;
1180+
enum EPROGMISMATCH = 75;
1181+
enum EPROCUNAVAIL = 76;
1182+
enum ENOLCK = 77;
1183+
enum ENOSYS = 78;
1184+
enum EFTYPE = 79;
1185+
enum EAUTH = 80;
1186+
enum ENEEDAUTH = 81;
1187+
enum EIDRM = 82;
1188+
enum ENOMSG = 83;
1189+
enum EOVERFLOW = 84;
1190+
enum ECANCELED = 85;
1191+
enum EILSEQ = 86;
1192+
enum ENOATTR = 87;
1193+
enum EDOOFUS = 88;
1194+
enum EBADMSG = 89;
1195+
enum EMULTIHOP = 90;
1196+
enum ENOLINK = 91;
1197+
enum EPROTO = 92;
11981198
enum ENOMEDIUM = 93;
11991199
enum EUNUSED94 = 94;
12001200
enum EUNUSED95 = 95;
12011201
enum EUNUSED96 = 96;
12021202
enum EUNUSED97 = 97;
12031203
enum EUNUSED98 = 98;
12041204
enum EASYNC = 99;
1205-
enum ELAST = 99; /// Must be equal largest errno
1205+
enum ELAST = 99;
12061206
}
12071207
else version (Solaris)
12081208
{

src/core/stdc/stdio.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ else version ( DragonFlyBSD )
182182
L_tmpnam = 1024
183183
}
184184

185-
struct __sbuf { // <sys/sbuf.h>
185+
struct __sbuf { // <sys/sbuf.h>
186186
byte* s_buf; // storage buffer
187187
int function(void *, const char *, int) sbuf_drain_func;
188188
void* s_drain_arg; // user-supplied drain argument
@@ -203,7 +203,7 @@ else version ( DragonFlyBSD )
203203
SBUF_INSECTION = 0x00100000, // set by sbuf_start_section()
204204
}
205205

206-
union __mbstate_t // <sys/stdint.h>
206+
union __mbstate_t // <sys/stdint.h>
207207
{
208208
char[128] _mbstate8;
209209
long _mbstateL;
@@ -459,7 +459,7 @@ else version( DragonFlyBSD )
459459
/// See /usr/include/stdio.h
460460
struct __FILE_public
461461
{
462-
ubyte* *_p; /* current position in (some) buffer */
462+
ubyte* *_p; /* current position in (some) buffer */
463463
int _flags; /* flags, below; this FILE is free if 0 */
464464
int _fileno; /* fileno, if Unix descriptor, else -1 */
465465
ssize_t _r; /* read space left for getc() */

src/core/sys/freebsd/sys/elf_common.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ enum ELFOSABI_NSK = 14;
7878
enum ELFOSABI_AROS = 15;
7979
enum ELFOSABI_ARM = 97;
8080
enum ELFOSABI_STANDALONE = 255;
81+
enum ELFOSABI_DRAGONFLYBSD = ELFOSABI_NONE;
8182

8283
extern (D)
8384
{

src/core/sys/linux/elf.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ enum ELFOSABI_OPENBSD = 12;
121121
enum ELFOSABI_ARM_AEABI = 64;
122122
enum ELFOSABI_ARM = 97;
123123
enum ELFOSABI_STANDALONE = 255;
124+
enum ELFOSABI_DRAGONFLYBSD = ELFOSABI_NONE;
124125

125126
enum EI_ABIVERSION = 8;
126127

src/core/sys/osx/sys/mman.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* D header file for FreeBSD
2+
* D header file for OSX
33
*
44
* Authors: Martin Nowak
55
*/

src/core/sys/solaris/sys/elf.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ enum ELFOSABI_NSK = 14;
229229
enum ELFOSABI_AROS = 15;
230230
enum ELFOSABI_ARM = 97;
231231
enum ELFOSABI_STANDALONE = 255;
232+
enum ELFOSABI_DRAGONFLYBSD = ELFOSABI_NONE;
232233

233234
enum EAV_SUNW_NONE = 0;
234235
enum EAV_SUNW_CURRENT = 1;

src/core/thread.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ class Thread
979979
}
980980
else
981981
{
982-
// NOTE: pthread_setschedprio is not implemented on OSX or FreeBSD, so use
982+
// NOTE: pthread_setschedprio is not implemented on Darwin, FreeBSD or DragonFlyBSD, so use
983983
// the more complicated get/set sequence below.
984984
int policy;
985985
sched_param param;

src/core/threadasm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* http://www.boost.org/LICENSE_1_0.txt)
1414
*/
1515

16-
#if (defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)) && defined(__ELF__)
16+
#if (__linux__ || __FreeBSD__ || __NetBSD__ || __DragonFly__) && __ELF__
1717
/*
1818
* Mark the resulting object file as not requiring execution permissions on
1919
* stack memory. The absence of this section would mark the whole resulting

test/shared/src/load.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import core.runtime, core.stdc.stdio, core.thread;
22

33
version (linux) import core.sys.linux.dlfcn;
44
else version (FreeBSD) import core.sys.freebsd.dlfcn;
5+
else version (DragonFlyBSD) import core.sys.dragonflybsd.dlfcn;
56
else static assert(0, "unimplemented");
67

78
void loadSym(T)(void* handle, ref T val, const char* mangle)

0 commit comments

Comments
 (0)