Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 6e5682a

Browse files
authored
Merge pull request #3738 from ibuclaw/merge_stable
Merge branch 'stable' into merge_stable Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com> Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents 571de3c + cc0cc38 commit 6e5682a

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

src/core/math.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ nothrow:
3636
* greater than long.max, the result is
3737
* indeterminate.
3838
*/
39+
deprecated("rndtonl is to be removed by 2.100. Please use round instead")
3940
extern (C) real rndtonl(real x);
4041

4142
pure:

src/core/sys/posix/sys/socket.d

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,9 @@ else version (OpenBSD)
10381038
{
10391039
ubyte ss_len;
10401040
sa_family_t ss_family;
1041-
byte[6] __ss_pad1;
1041+
ubyte[6] __ss_pad1;
10421042
long __ss_align;
1043-
byte[240] __ss_pad2;
1043+
ubyte[240] __ss_pad2;
10441044
}
10451045

10461046
struct msghdr
@@ -1063,20 +1063,25 @@ else version (OpenBSD)
10631063

10641064
enum : uint
10651065
{
1066-
SCM_RIGHTS = 0x01
1066+
SCM_RIGHTS = 0x01,
1067+
SCM_TIMESTAMP = 0x04
10671068
}
10681069

10691070
private // <sys/_types.h>
10701071
{
1071-
extern (D) size_t _ALIGN(size_t p) { return (p + _ALIGNBYTES) & ~_ALIGNBYTES; }
1072+
enum _ALIGNBYTES = c_long.sizeof - 1;
1073+
extern (D) size_t _ALIGN(size_t p) pure nothrow @nogc
1074+
{
1075+
return (p + _ALIGNBYTES) & ~_ALIGNBYTES;
1076+
}
10721077
}
10731078

1074-
extern (D) ubyte* CMSG_DATA(cmsghdr* cmsg)
1079+
extern (D) ubyte* CMSG_DATA(cmsghdr* cmsg) pure nothrow @nogc
10751080
{
10761081
return cast(ubyte*) cmsg + _ALIGN(cmsghdr.sizeof);
10771082
}
10781083

1079-
extern (D) cmsghdr* CMSG_NXTHDR(msghdr* mhdr, cmsghdr* cmsg)
1084+
extern (D) cmsghdr* CMSG_NXTHDR(msghdr* mhdr, cmsghdr* cmsg) pure nothrow @nogc
10801085
{
10811086
if (cast(ubyte*) cmsg + _ALIGN(cmsg.cmsg_len) + _ALIGN(cmsghdr.sizeof) >
10821087
cast(ubyte*) mhdr.msg_control + mhdr.msg_controllen)
@@ -1085,11 +1090,24 @@ else version (OpenBSD)
10851090
return cast(cmsghdr*) (cast(ubyte*) cmsg + _ALIGN(cmsg.cmsg_len));
10861091
}
10871092

1088-
extern (D) cmsghdr* CMSG_FIRSTHDR(msghdr* mhdr)
1093+
extern (D) cmsghdr* CMSG_FIRSTHDR(msghdr* mhdr) pure nothrow @nogc
10891094
{
10901095
return mhdr.msg_controllen >= cmsghdr.sizeof ? cast(cmsghdr*) mhdr.msg_control : null;
10911096
}
10921097

1098+
extern (D)
1099+
{
1100+
size_t CMSG_LEN(size_t len) pure nothrow @nogc
1101+
{
1102+
return _ALIGN(cmsghdr.sizeof) + len;
1103+
}
1104+
}
1105+
1106+
extern (D) size_t CMSG_SPACE(size_t len) pure nothrow @nogc
1107+
{
1108+
return _ALIGN(cmsghdr.sizeof) + _ALIGN(len);
1109+
}
1110+
10931111
struct linger
10941112
{
10951113
int l_onoff;

0 commit comments

Comments
 (0)