Use inline functions not macros for workarounds for missing functions.

See https://svn.boost.org/trac/boost/ticket/12501.
This commit is contained in:
jzmaddock
2017-04-16 19:22:19 +01:00
parent 3fbf51f31a
commit 8037ff436b

View File

@ -350,11 +350,11 @@ namespace std {
// Include signal.h which might contain a typo to be corrected here // Include signal.h which might contain a typo to be corrected here
#include <signal.h> #include <signal.h>
#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway!
#ifndef S_ISSOCK #ifndef S_ISSOCK
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? # define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
#endif #endif
#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#ifndef FPE_FLTINV #ifndef FPE_FLTINV
# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy # define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy
#endif #endif