Hi,
> 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 .
Ok, looks good.
> 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 ?
> Is it possible to special case the gcc version like ?:
> if GCC<4.3
> #include x
> else
> #include y
> endif
That looks horrible, and unnecessary. gcc-4.1 should also work
with the standard-conforming header #include-s...
> 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>
Why this? Do you get errors without these removals?
In fact these includes may be superfluous and could perhaps
be removed, but I can't see how they can cause errors.
Or did you go through systematically and remove all unneeded
headers? If so, great, I'll try this with older gcc!
> Index: src/dvbcut.cpp
> ===================================================================
> --- src/dvbcut.cpp (revision 112)
> +++ src/dvbcut.cpp (working copy)
> @@ -18,12 +18,12 @@
>
> /* $Id$ */
>
> -#include <cstring>
> +// #include <cstring>
> #include <cerrno>
> #include <cmath>
> -#include <cstdlib>
> -#include <climits>
> +// #include <climits>
Same here.
> #include <memory>
> +#include <algorithm>
That one is definitely necessary so the addition fixes a bug,
and should be applied to subversion soon.
> --- src/tsfile.cpp (revision 112)
> +++ src/tsfile.cpp (working copy)
> @@ -21,8 +21,10 @@
> #include "port.h"
> #include "tsfile.h"
> #include "streamhandle.h"
> -#include <list>
> -#include <utility>
> +// #include <list>
> +// #include <utility>
> +#include <algorithm>
> +#include <cstring>
Same probably here, these includes are probably neccessary
and should be added.
> tsfile::tsfile(inbuffer &b, int initial_offset) : mpgfile(b, initial_offset)
> {
> 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')))
>
Can't you achive this from the specfile (a'la "make install
PREFIX=...") without changing SConstruct?
Regards,
Wolfram
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user