[GRASS5] What's holding 5.3.0 release?
Hamish
hamish_nospam at yahoo.com
Sat Jan 31 00:18:47 EST 2004
> And I just remembered r.terraflow. Is that fixed to compile on
> gcc 2.9x and >3.x now? I don't see it in the man pages for 5.3 on the
> web. Will it be included for 5.3? I assume not.
It should be working now, please test.
You are likely to see some "depreciated" messages, but there's not much
we can do about that without breaking compatibility with gcc 2.95s.
... having said that ...
I think the best way to fix it is as Laura suggested, to use the
shortened include names if gcc version>=3.2, and in all other cases (and
compilers) use full <name.h>. Someone with gcc 3.0 might tell us if it
includes <ostream> so we can get the minor version correct?
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
#include <ostream>
#else
#include <ostream.h>
#endif
etc
This should make it compile cleanly for both gcc 2.95 and 3.x and fix
the error Paul saw using IRIX's CC:
http://article.gmane.org/gmane.comp.gis.grass.devel/2896
e.g. a test for gcc version >=3.1,
#include <stdio.h>
int main(void) {
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
printf("new gcc version %d.%d\n", __GNUC__, __GNUC_MINOR__);
#else
printf("not a modern gcc\n");
#endif
return 0;
}
regards,
Hamish
More information about the grass-dev
mailing list