Skip to content

Commit 81f3a62

Browse files
authored
Increase the mamake buffer size to 4096 (#97)
src/cmd/INIT/mamake.c: - Fix a rare build error by applying Oracle's patch to increase mamake's buffer size[*]. Description from the original patch: The build of KornShell might spuriously fail with the following error. ... /usr/bin/ksh: line 40: syntax error at line 44: `else unmatched mamake [lib/libast]: *** exit code 3 making ast.req mamake: *** exit code 139 making lib/libast The patch increases the buffer size of mamake to avoid spurious build failures. I can't reproduce build error, but this patch should be merged anyway because OpenSUSE also increases mamake's buffer size in a patch titled 'workaround-stupid-build-system.diff'[**]. This indicates that the build failure is a heisenbug that can occur on at least Linux and Solaris. [*]: oracle/solaris-userland@7cad9da [**]: https://build.opensuse.org/package/view_file/shells/ksh/workaround-stupid-build-system.diff?expand=1
1 parent 69720a5 commit 81f3a62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/INIT/mamake.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ USAGE_LICENSE
118118
#define set(b,o) ((b)->nxt=(b)->buf+(o))
119119
#define use(b) (*(b)->nxt=0,(b)->nxt=(b)->buf)
120120

121-
#define CHUNK 1024
121+
#define CHUNK 4096
122122
#define KEY(a,b,c,d) ((((unsigned long)(a))<<15)|(((unsigned long)(b))<<10)|(((unsigned long)(c))<<5)|(((unsigned long)(d))))
123123
#define NOW ((unsigned long)time((time_t*)0))
124124
#define ROTATE(p,l,r,t) ((t)=(p)->l,(p)->l=(t)->r,(t)->r=(p),(p)=(t))

0 commit comments

Comments
 (0)