diff --git a/Makefile b/Makefile index 40bacea..e80bb4e 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ OBJ = $(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SRC))) INCLUDES = -I inc -I /usr/include/cryptopp -I sdk # C compiler flags (-g -O2 -Wall) -CCFLAGS = -O0 -g -fstack-protector-all -Wall #-non-call-exceptions +CCFLAGS = -Os -g -fstack-protector-all -Wall #-non-call-exceptions CCFLAGS += $(shell pkg-config --cflags libcurl fuse) CPPFLAGS = -std=c++0x $(CCFLAGS) -D_GLIBCXX_DEBUG @@ -29,7 +29,7 @@ CXX= g++ LIBS = # compile flags -LDFLAGS = -lcryptopp -lfreeimage -ldb_cxx +LDFLAGS = -lcryptopp -lfreeimage -ldb_cxx LDFLAGS += $(shell pkg-config --libs libcurl fuse) megafuse: $(OUT) diff --git a/src/Config.cpp b/src/Config.cpp index 2b57390..de7c291 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -15,14 +15,14 @@ Config* Config::getInstance() void Config::check_variable(int &var,std::string value,std::string name) { var=stoi(value); - printf("caricata la variabile %s con il valore %d\n",name.c_str(),var); + printf("Creating the variable %s with value %d\n",name.c_str(),var); } void Config::check_variable(std::string &var,std::string value,std::string name) { var = value; - printf("caricata la variabile %s con il valore %s\n",name.c_str(),value.c_str()); + printf("reating the variable %s with value %s\n",name.c_str(),value.c_str()); } diff --git a/src/file_cache_row.cpp b/src/file_cache_row.cpp index 4d0e096..a299272 100644 --- a/src/file_cache_row.cpp +++ b/src/file_cache_row.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -69,7 +70,7 @@ int CacheManager::numChunks(size_t pos) end +=i*ChunkedHash::SEGSIZE; if(end >= pos) return i; } - return 8 + ceil(float(pos-end)/(8.0*ChunkedHash::SEGSIZE)); + return 8 + std::ceil(float(pos-end)/(8.0*ChunkedHash::SEGSIZE)); }