Mon, 27 May 2002 17:55:46 +0800 ------------------------------- The network support "|&" may not work under HP-UX 11. An error message appears similar to this: gawk: test_script.awk:3: fatal: get_a_record: iop->buf: can't allocate -61246 bytes of memory (not enough space) Solution: This is a bug in the fstat() call of HP-UX 11.00, please apply the cumulative ARPA Transport patch PHNE_26771 to fix it. The following is the related description in PHNE_26771: Customer's application gets the wrong value from fstat(). Resolution: The value returned via st_blksize is now retrieved from the same info as in 10.20. In case you cannot apply the HP patch, the attached patch to gawk source might work. Xiang Zhao Stepan Kasal --- gawk-3.1.2-plain/posix/gawkmisc.c Tue Apr 16 13:58:41 2002 +++ gawk-3.1.2-hpux/posix/gawkmisc.c Fri May 24 11:46:35 2002 @@ -77,7 +77,13 @@ * meant for in the first place. */ #ifdef HAVE_ST_BLKSIZE -#define DEFBLKSIZE (stb->st_blksize > 0 ? stb->st_blksize : BUFSIZ) + /* + * 100k must be enough for everybody, + * bigger number means probably a bug in fstat() + */ +#define MAXBLKSIZE 102400 +#define DEFBLKSIZE (stb->st_blksize > 0 && stb->st_blksize <= MAXBLKSIZE \ + ? stb->st_blksize : BUFSIZ) #else #define DEFBLKSIZE BUFSIZ #endif