[Octopus-users] [Fwd: Octopus 2.0.1 compile-time errors on SGI
IRIX]
Xavier Andrade
xavier at tddft.org
Sun Mar 26 22:50:42 WEST 2006
Hi Charles,
It seems that the problem is that Irix's libc has some differences with
other libraries. Can you try the following changes?
varinfo.c: 65
I couldn't find strndup in SGI's documentation, i think the problem is that
it returns a "void *" and not a "char *".
Change
*dest = strndup(s, s1-s);
to
*dest = (char *) strndup(s, s1-s);
varinfo.c: 78
Getc returns an integer not a character, and as the value is been casted to
a char directly, the comparison will always fail. Try the following
modifications:
void get_text(FILE *in, char **dest)
{
char c, line[256];
int b; <<<<
for(;;){
/* check if the next line starts by a space */
if((b=getc(in)) == EOF) return; <<<<
c=(char) b; <<<<
ungetc(c, in);
Cheers,
Xavier
More information about the Octopus-users
mailing list