Hi! David Timms wrote: > Wolfram Gloger wrote: > ... > >> Please try the appended patch. >> >> Regards, >> Wolfram >> >> --- src/dvbcut.cpp~ 2008-01-16 09:43:48.000000000 +0100 >> +++ src/dvbcut.cpp 2008-02-03 14:02:47.000000000 +0100 >> @@ -24,6 +24,7 @@ >> #include <cstdlib> >> #include <climits> >> #include <memory> >> +#include <algorithm> >> >> #include <qlabel.h> >> #include <qpixmap.h> > > > Thanks Wolfram, you were spot on; that got me through the first set of > issues, and helped me find: > http://gcc.gnu.org/gcc-4.3/porting_to.html "Header Dependency Cleanup" > > I also needed to add #includes in tsfile.cpp .
Applied & committed. Welcome to r113. > At this point it > compiles, runs and operates OK {except for the audio preview/postview - > which notes that it wasn't compiles with mp2 support}. I now played with > commenting out the other includes, and found a few that do not stop the > compile|run|basic operation of dvbcut {for gcc 4.3} > > I include an svn-diff with these changes. I imagine you can't apply them > to the svn - because that would stop compilation for the more common > gcc-4.1 users ? It shouldn't. <algorithm> has been there for quite a while - in the old gcc 3.3.1 I still have installed as well as in Intel's compilers for Linux. > Is it possible to special case the gcc version like ?: > if GCC<4.3 > #include x > else > #include y > endif > > sort of thing ? If so I'll work on a patch ? It is possible, but... > Index: src/buffer.cpp > =================================================================== > --- src/buffer.cpp (revision 112) > +++ src/buffer.cpp (working copy) > @@ -20,12 +20,12 @@ > > #define __STDC_LIMIT_MACROS // for INT64_MAX > > -#include <sys/types.h> > -#include <sys/stat.h> > +// #include <sys/types.h> > +// #include <sys/stat.h> > #include <sys/mman.h> > #include <cerrno> > #include <fcntl.h> > -#include <unistd.h> > +// #include <unistd.h> > #include <cstring> > #include <cstdlib> > // #include <cstdio> ... patches like this one are not acceptable. Whenever you use a particular function or macro, you need to include the appropriate header file(s) - whether it's automatically included by other headers or not. Besides that, there are other operating systems than Linux which may have specific needs. E.g. <sys/types.h> or <unistd.h> is not always included automatically. [...] > Index: SConstruct > =================================================================== > --- SConstruct (revision 112) > +++ SConstruct (working copy) > @@ -7,9 +7,10 @@ > > opts=Options() > > -opt=opts.Add(PathOption('PREFIX', 'Directory to install under', > '/usr/local')) > +#opt=opts.Add(PathOption('PREFIX', 'Directory to install under', > '/usr/local')) > +opt=opts.Add(PathOption('PREFIX', 'Directory to install under', '/usr')) > opt=opts.Add(PathOption('BINDIR', 'Directory to install under', > os.path.join('$PREFIX','bin'))) > -opt=opts.Add(PathOption('MANPATH', 'Directory to install under', > os.path.join('$PREFIX','man'))) > +opt=opts.Add(PathOption('MANPATH', 'Directory to install under', > os.path.join('$PREFIX','share/man'))) Actually, this depends on the system you're running. Therefore, it can be changed by assigning values to the environment variables. I agree with the last change - 'share/man' is required by FHS - but I really think that people who compile and install dvbcut themselves should put it into /usr/local. Distribution makers should of course use /usr, but that must not be the default. -- Michael "Tired" Riepe <[EMAIL PROTECTED]> X-Tired: Each morning I get up I die a little ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ DVBCUT-user mailing list DVBCUT-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dvbcut-user