Fix linux specific issue.
This commit is contained in:
parent
52fdd7ce2b
commit
96991e7623
5
Makefile
5
Makefile
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
.PHONY: clean cleandist
|
.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
|
#CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Wno-implicit-function-declaration
|
||||||
|
|
||||||
EXECUTABLES=parse
|
EXECUTABLES=parse
|
||||||
|
@ -24,7 +25,7 @@ $(LIDDOUBLE) : dependencies/double-conversion/README.md
|
||||||
cd dependencies/double-conversion/ && mkdir -p release && cd release && cmake .. && make
|
cd dependencies/double-conversion/ && mkdir -p release && cd release && cmake .. && make
|
||||||
|
|
||||||
parse: main.cpp common_defs.h linux-perf-events.h
|
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
|
testflatten: parse parsenocheesy parsenodep8
|
||||||
for filename in jsonexamples/twitter.json jsonexamples/gsoc-2018.json jsonexamples/citm_catalog.json jsonexamples/canada.json ; do \
|
for filename in jsonexamples/twitter.json jsonexamples/gsoc-2018.json jsonexamples/citm_catalog.json jsonexamples/canada.json ; do \
|
||||||
|
|
4
main.cpp
4
main.cpp
|
@ -896,8 +896,8 @@ really_inline bool parse_number(const u8 * buf, UNUSED size_t len, UNUSED Parsed
|
||||||
///
|
///
|
||||||
#ifdef DOUBLECONV
|
#ifdef DOUBLECONV
|
||||||
int processed_characters_count;
|
int processed_characters_count;
|
||||||
double result = converter.StringToDouble((const char*)( buf+offset), 10, &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, processed_characters_count);
|
printf("number is %f and used %d chars \n", result_double_conv, processed_characters_count);
|
||||||
#endif
|
#endif
|
||||||
////////////////
|
////////////////
|
||||||
// end of double conv temporary stuff.
|
// end of double conv temporary stuff.
|
||||||
|
|
Loading…
Reference in New Issue