| 1 | :
|
|---|
| 2 | # hints/posix-bc.sh
|
|---|
| 3 | #
|
|---|
| 4 | # BS2000 (Posix Subsystem) hints by Thomas Dorner <[email protected]>
|
|---|
| 5 | #
|
|---|
| 6 | # Thanks to the authors of the os390.sh for the very first draft.
|
|---|
| 7 | #
|
|---|
| 8 | # You can modify almost any parameter set here using Configure with
|
|---|
| 9 | # the appropriate -D option.
|
|---|
| 10 |
|
|---|
| 11 | # remove this line if dynamic libraries are working for you:
|
|---|
| 12 | bs2000_ignoredl='y'
|
|---|
| 13 |
|
|---|
| 14 | # To get ANSI C, we need to use c89
|
|---|
| 15 | # You can override this with Configure -Dcc=gcc
|
|---|
| 16 | # (if you ever get a gcc ported to BS2000 ;-).
|
|---|
| 17 | case "$cc" in
|
|---|
| 18 | '') cc='c89' ;;
|
|---|
| 19 | esac
|
|---|
| 20 |
|
|---|
| 21 | # C-Flags:
|
|---|
| 22 | # -DPOSIX_BC
|
|---|
| 23 | # -DUSE_PURE_BISON
|
|---|
| 24 | # -D_XOPEN_SOURCE_EXTENDED alters system headers.
|
|---|
| 25 | # Prepend your favorites with Configure -Dccflags=your_favorites
|
|---|
| 26 | ccflags="$ccflags -Kc_names_unlimited,enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -DYYMAXDEPTH=65000 -DYYINITDEPTH=1000 -D_XOPEN_SOURCE_EXTENDED"
|
|---|
| 27 |
|
|---|
| 28 | # Now, what kind of BS2000 system are we running on?
|
|---|
| 29 | echo
|
|---|
| 30 | if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then
|
|---|
| 31 | echo "You are running a BS2000 machine with Sunrise CPUs."
|
|---|
| 32 | echo "Let's hope you have the matching RISC compiler as well."
|
|---|
| 33 | ccflags="-K risc_4000 $ccflags"
|
|---|
|
|---|