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

Commit

Permalink
Mark at least some of CMSG_* pure, because they are
Browse files Browse the repository at this point in the history
  • Loading branch information
todayman committed Nov 21, 2014
1 parent 0606b1b commit d77ba1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/sys/posix/sys/socket.d
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ version( linux )

static if( false /* (!is( __STRICT_ANSI__ ) && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L */ )
{
extern (D) ubyte[1] CMSG_DATA( cmsghdr* cmsg ) { return cmsg.__cmsg_data; }
extern (D) ubyte[1] CMSG_DATA( cmsghdr* cmsg ) pure { return cmsg.__cmsg_data; }
}
else
{
extern (D) ubyte* CMSG_DATA( cmsghdr* cmsg ) { return cast(ubyte*)( cmsg + 1 ); }
extern (D) ubyte* CMSG_DATA( cmsghdr* cmsg ) pure { return cast(ubyte*)( cmsg + 1 ); }
}

/*private*/ cmsghdr* __cmsg_nxthdr(msghdr*, cmsghdr*);
Expand All @@ -206,12 +206,12 @@ version( linux )

extern (D)
{
size_t CMSG_ALIGN( size_t len)
size_t CMSG_ALIGN( size_t len ) pure nothrow @nogc
{
return (len + size_t.sizeof - 1) & cast(size_t) (~(size_t.sizeof - 1));
}

size_t CMSG_LEN( size_t len )
size_t CMSG_LEN( size_t len ) pure nothrow @nogc
{
return CMSG_ALIGN(cmsghdr.sizeof) + len;
}
Expand Down

0 comments on commit d77ba1f

Please sign in to comment.