Wolfram Gloger wrote: >> 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... Yeah, I tend to agree with that; keep it simple if possible.
>> -#include <unistd.h> >> +// #include <unistd.h> >> #include <cstring> >> #include <cstdlib> >> // #include <cstdio> > > Why this? Ok, my impression from the gcc 4.3 info {and I am long way from being knowledgable}, is that some of these standard templates have been split up with the point that some of the older <old-names> are covered with smaller <names-items>. If that is the case, it might be legitimate to remove #include <old-names> that aren't being used by the code, and include only the smaller <names-items>. As you probably noticed, Michael disagrees: "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." > Do you get errors without these removals? No. > In fact these includes may be superfluous and could perhaps > be removed, but I can't see how they can cause errors. They don't cause errors. > Or did you go through systematically and remove all unneeded > headers? That was how I came up with those ones; comment one out - try to compile - if compiled -try a basic open-start-end-export run. I didn't go through all source files only the ones in the svndiff. I didn't do full application testing {or with problematic files etc} that might actually require those includes at runtime. ... > Can't you achive this from the specfile (a'la "make install > PREFIX=...") without changing SConstruct? Yes, I'll have my rpm build section pass the correct values to make; it is probably best for a hand compiled app to place all it's parts under /usr/local, and leave a distros package system to do the correct thing. Thanks, DaveT. ------------------------------------------------------------------------- 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