I've found that the bug first appears in r21-0b36. In order to fix it, I
changed line 3335 in src/fileio.c (from the r21-0b42 code) to:
#if (!defined (WINDOWSNT) && !defined (IRIX))
and line 3353 to:
#if (defined (WINDOWSNT) || defined (IRIX))
Since the bug also appears on 6.4 IRIX machines (and is fixed the same way),
I'm assuming other versions of IRIX might benefit.
Chris