On OpenBSD 5.6 sys/ucred.h uses NGROUP define, but misses include to
sys/param.h in which NGROUP is defined. sys/ucred.h is included in
sys/mount.h which we need to get the cached ram. Because of this include
chain our compilation will fail with missing NGROUP define. This can be
resolved by including in our code (and in correct order) system headers.
- Removed OpenBSD stuff from freebsd port
- Renamed bsd folder to freebsd since now it contains only
freebsd-relevant files.
- Changed CMake instructions to account for bsd port changes
- modified main source file to account for openbsd port
- Removed OpenBSD stuff from freebsd port
- Renamed bsd folder to freebsd since now it contains only
freebsd-relevant files.
- Changed CMake instructions to account for bsd port changes
- modified main source file to account for openbsd port
See issue:
e7f2dd25e8 (commitcomment-9327932)
Unfortunately we can't pull info about cached memory from sysinfo.
Thus we need stick to /proc/meminfo parsing. See code for more comments.
instead of using hard coded divisions to calculate ram stats it's better to use
macros defined in config.h. BSD port was doing this already, using macros
defined in it's common.h header. I pulled those macros out and applied them to
all platforms.
File version.h.in got renamed into config.h.in since it doesn't caontain only
the version anymore.
2cc9efb187 (commitcomment-9327965)
Instead of checking for compiler version or whether it supports c++ features
through target_compile_features test whether compiler supports one of the c++11
flags (-std=c++11 or -std=c++0x). Cleaner and simplier code. And we can make it
fail loudly if comiler does not support c++11
now the version variables will be prefixed with 'tmux-mem-cpu-load'. This way we
won't clash with any future dependency that might redefine those variables.
This is exactly how CMake does it in their code, see:
f3e92d2816/Source/CMakeVersion.cmake6ae98ee18f/Source/cmVersionConfig.h.in6ae98ee18f/Source/CMakeVersionCompute.cmake
the only difference is that they have functions that return the versions and I
use those variables directly.
6ae98ee18f/Source/cmVersion.cxx
Since the partial version variables are not used anywhere in the code we might
as well remove them from version.h.in. I've deciced to leave them for now, since
we might need them in the future.