Fix linux specific issue.

This commit is contained in:
Daniel Lemire 2018-07-28 21:17:54 -04:00
parent 52fdd7ce2b
commit 96991e7623
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,8 @@
.PHONY: clean cleandist
CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Idependencies/double-conversion -Ldependencies/double-conversion/release -ldouble-conversion
CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Idependencies/double-conversion -Ldependencies/double-conversion/release
LIBFLAGS = -ldouble-conversion
#CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Wno-implicit-function-declaration
EXECUTABLES=parse
@ -24,7 +25,7 @@ $(LIDDOUBLE) : dependencies/double-conversion/README.md
cd dependencies/double-conversion/ && mkdir -p release && cd release && cmake .. && make
parse: main.cpp common_defs.h linux-perf-events.h
$(CXX) $(CXXFLAGS) -o parse main.cpp
$(CXX) $(CXXFLAGS) -o parse main.cpp $(LIBFLAGS)
testflatten: parse parsenocheesy parsenodep8
for filename in jsonexamples/twitter.json jsonexamples/gsoc-2018.json jsonexamples/citm_catalog.json jsonexamples/canada.json ; do \

View File

@ -896,8 +896,8 @@ really_inline bool parse_number(const u8 * buf, UNUSED size_t len, UNUSED Parsed
///
#ifdef DOUBLECONV
int processed_characters_count;
double result = converter.StringToDouble((const char*)( buf+offset), 10, &processed_characters_count);
printf("number is %f and used %d chars \n", result, processed_characters_count);
double result_double_conv = converter.StringToDouble((const char*)( buf+offset), 10, &processed_characters_count);
printf("number is %f and used %d chars \n", result_double_conv, processed_characters_count);
#endif
////////////////
// end of double conv temporary stuff.