file_to_string: stat+reserve makes faster

This commit is contained in:
dockes
2008-12-08 11:22:58 +00:00
parent 48bf62c460
commit 5997dde6f3
2 changed files with 148 additions and 13 deletions
+8 -1
View File
@@ -1,7 +1,7 @@
depth = ..
include $(depth)/mk/sysconf
PROGS = trfileudi trconftree wipedir smallut trfstreewalk trpathut \
PROGS = trreadfile trfileudi trconftree wipedir smallut trfstreewalk trpathut \
transcode trbase64 \
trmimeparse trexecmd utf8iter idfile
@@ -18,6 +18,13 @@ trfstreewalk.o : fstreewalk.cpp fstreewalk.h
$(CXX) -o trfstreewalk.o -c $(ALL_CXXFLAGS) \
-DTEST_FSTREEWALK fstreewalk.cpp
READFILE_OBJS= trreadfile.o readfile.o $(BIGLIB)
trreadfile : $(READFILE_OBJS)
$(CXX) -o trreadfile $(READFILE_OBJS) $(LIBICONV) $(LIBSYS)
trreadfile.o : readfile.cpp readfile.h
$(CXX) -o trreadfile.o -c $(ALL_CXXFLAGS) \
-DTEST_READFILE readfile.cpp
PATHUT_OBJS= trpathut.o $(BIGLIB)
trpathut : $(PATHUT_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o trpathut $(PATHUT_OBJS) $(LIBICONV)