include fixes to make it compile on osx, added *~ files to gitignore

This commit is contained in:
Pawel "l0ner" Soltys 2015-01-04 17:21:20 +01:00
parent 2040736dd6
commit 47b9f62a10
4 changed files with 10 additions and 3 deletions

3
.gitignore vendored

@ -7,6 +7,7 @@
*.o
*.so
sysstat
tmux-mem-cpu-load
# CMake generated #
###################
@ -17,7 +18,6 @@ CMakeCache.txt
install_manifest.txt
version.h
CTestTestfile.cmake
tmux-mem-cpu-load
DartConfiguration.tcl
# Packages #
@ -49,3 +49,4 @@ ehthumbs.db
Thumbs.db
*.swp
*.swo
*~

@ -10,6 +10,8 @@
#include <sys/sysctl.h> // for sysctl
#include <sys/types.h> // for integer types
#include <unistd.h> // usleep()
// OSX or BSD based system, use BSD APIs instead
// See: http://www.opensource.apple.com/source/xnu/xnu-201/osfmk/mach/host_info.h
// and: http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/

@ -1,10 +1,13 @@
#include <string>
#include <sstream>
#include <fstream>
#include <cmath> // floorf()
#include <unistd.h>
#include <stdlib.h> // getloadavg()
#include "../luts.h"
std::string load_string( bool use_colors = false ) {
std::ostringstream oss;

@ -1,6 +1,5 @@
#include <string>
#include <sstring>
#include <fstring>
#include <sstream>
#include <mach/vm_statistics.h>
#include <mach/processor_info.h>
@ -14,6 +13,8 @@
#include <sys/sysctl.h> // for sysctl
#include <sys/types.h> // for integer types
#include "../luts.h"
std::string mem_string( bool use_colors ) {
std::ostringstream oss;