aboutsummaryrefslogtreecommitdiffstats
path: root/README_d/README.hpux
blob: 59f8753906b184285a35747ce5979aae4b239519 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 <xiangz@163.net>
Stepan Kasal <kasal@math.cas.cz>

--- 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