From: Varun H. <var...@ii...> - 2008-01-28 17:08:26
|
Hi, On Mon, 28 Jan, 2008 at 05:14:24PM +0100, Michal Hocko wrote: > No, we are including it from confparser.cc, but this won't make any > difference here. > > > to build but now I have included kernel/static.h and it builds. > > Could you try the latest CVS (from devel-msts-unified_makefiles branch)? > Do you still have problem to get sources from there? > I have just tried: > cvs -z3 -d:pserver:ano...@pd...:/cvsroot/pdfedit \ > co -r devel-msts-unified_makefiles pdfedit Okay, I checked out the latest sources and tried autoconf + configure but it gave some error saying install-sh script not present. So, I copied /usr/share/automake-1.9/install-sh to pdfedit directory, then did configure + make and it compiled without any problems. So kernel/static.h was missing when I checked out last time. > > and didn't have any problems. > > > > > But, actually you are indirectly including cstring through the boost > > header files. In kernel/static.h you have: > > > > //============================================ > > // boost > > //============================================ > > #include <boost/smart_ptr.hpp> > > #include <boost/iostreams/stream.hpp> > > #include <boost/iostreams/filtering_stream.hpp> > > > > > > If you look at boost/iostreams/stream.hpp it has: > > > > #include <boost/iostreams/constants.hpp> > > #include <boost/iostreams/detail/char_traits.hpp> > > > > and now if you look at boost/iostreams/detail/char_traits.hpp: > > > > # include <boost/config.hpp> // Make sure size_t is in std. > > # include <cstddef> > > # include <cstring> <<=========== > > # include <cstdio> > > Yes, but note that these are included only if > BOOST_IOSTREAMS_NO_STREAM_TEMPLATES is defined. I don't have any idea > what is it... > Nevertheless it is not clean to rely on including this header by > boost headers, so it has to be sorted out. > > > So, you can as well include cstring directly because the #include > > <string> is never used from kernel/static.h (you may remove it). It is > > this cstring which is included through boost headers that makes it > > work with gcc/g++ 4.3 > > Jozo, could you check if it is clear to add #include <cstring> into > kernel/static.h instead of string? > My quick test (cd src && make clean & make) was succesfull. > > > > > Hope that ends all confusion. > > Thanks for your investigation. > > Just to be sure. Could you send me string from 4.3 and some older c++ > directory? I still don't understand difference between those 2 files. > All C++ manuals/books claims that #include <string> should be used when > C++ strings are used. Please find attached cstring and string files. I was also under the same impression that we should use string for all string functions (that is what I read in school :-)) until recently when I was told that now we are supposed to use cstring. I think it is the same string.h file rewritten to comply with new c++ standards. BTW, if you use string.h instead of string it works I guess (I tried it before) Thanks Varun -- Varun Hiremath Undergraduate Student, Aerospace Engineering Department, Indian Institute of Technology Madras, Chennai, India ------------------------------------- Homepage: http://varun.travisbsd.org |