Skip to content

Commit

Permalink
Move S_I* constants and MSG_NOSIGNAL to compat.h
Browse files Browse the repository at this point in the history
  • Loading branch information
laanwj committed Aug 26, 2014
1 parent af8297c commit b4aa769
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 14 additions & 0 deletions src/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ typedef u_int SOCKET;
#define SOCKET_ERROR -1
#endif

#ifdef WIN32
#ifndef S_IRUSR
#define S_IRUSR 0400
#define S_IWUSR 0200
#endif
#else
#define MAX_PATH 1024
#endif

// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
#define MSG_NOSIGNAL 0
#endif

#ifndef WIN32
// PRIO_MAX is not defined on Solaris
#ifndef PRIO_MAX
Expand Down
14 changes: 0 additions & 14 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ static const int64_t CENT = 1000000;
// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
#define PAIRTYPE(t1, t2) std::pair<t1, t2>

#ifdef WIN32
#define MSG_DONTWAIT 0

#ifndef S_IRUSR
#define S_IRUSR 0400
#define S_IWUSR 0200
#endif
#else
#define MAX_PATH 1024
#endif
// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
#define MSG_NOSIGNAL 0
#endif

inline void MilliSleep(int64_t n)
{
Expand Down

0 comments on commit b4aa769

Please sign in to comment.