Hi again,
As you will recall, I had problems with gpc on AIX when opening files. I made a little change in rts-file.c: I replaced line 370:
_p_generic (701); /* FDR not initialized */
with
_p_initfdr(File,filename,8,0xf);
This means: if m_SIZ(File) == 0 (indicating that _p_initfdr was not called), I call it with a standard buffersize and flags). This enables me indeed to open files for reading and writing! However, I have no clue about the impact of this change.
But then we noticed something else: reading a string (string[255]) with readln (from file or stdin) always returned an empty string, although eoln and eof are set appropriately (so it is actually reading the file!). We checked and noticed that the argument maxlen to _p_reads in rts-rdsub.c is always zero. Question: would this be because va_arg (which gets maxlen from a variable argument list) doesn't work probably, or because the variable argument list is not set properly when calling _p_read in rts-read.c ?
Anyone any idea about what's going wrong??
If I hard code maxlen=256 then everything runs (on a simple test at least; again, the impact of this setting is not clear and it may be a dangerous setting!)
We've come that far now, I hope we can eventually get gpc running on our aix boxes......
Nick