Skip to content

Commit

Permalink
Increase the mamake buffer size to 4096 (#97)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JohnoKing authored Jul 27, 2020
1 parent 69720a5 commit 81f3a62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/INIT/mamake.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ USAGE_LICENSE
#define set(b,o) ((b)->nxt=(b)->buf+(o))
#define use(b) (*(b)->nxt=0,(b)->nxt=(b)->buf)

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

0 comments on commit 81f3a62

Please sign in to comment.