[nhc-bugs] Fixing "OS allocated a heap in high memory"

Donald Bruce Stewart dons at cse.unsw.edu.au
Sat Oct 22 07:11:51 EDT 2005


Also, there's some gnu-isms here that add an unnecessary build
dependency. Thanks to Marc Espie for this patch.

Cheers,
   Don

--- script/tprofprel.orig	Sun Mar 13 11:56:03 2005
+++ script/tprofprel	Sun Mar 13 11:56:38 2005
@@ -7,20 +7,8 @@ case $# in
   1) exit 1;;
 esac
 
-case $BASH in
-  "") if ( bash --version -e >/dev/null 2>&1 )
-      then exec bash $0 "$@"
-      fi ;;
-  *) ;;
-esac
+increment() { echo $1 + 1 | bc; }
 
-
-# Nasty compatibility stuff between /bin/sh/ and bash for arithmetic.
-if sh --version 2>/dev/null | grep -i gnu >/dev/null
-then increment() { ( let x=$1+1; echo $x; ); }
-else increment() { echo $1 + 1 | bc; }
-fi
-
 BUILTIN='Builtin' #Runtime Module added to beginning
 MODNAMES=''
 nummods=0
@@ -100,7 +88,7 @@ then
     echo '  char *strc;'
     echo '  int i = strlen(str)+1;'
     echo '  if(0==(strc = (char *)malloc(i))) {'
-    echo '    fprintf(stderr,"No space to duplicate \"%s\"\n",str);'
+    echo '    fprintf(stderr,"No space to duplicate \"%s\"\\n",str);'
     echo '    exit(-1);'
     echo '  }'
     echo '  strcpy(strc,str);'



More information about the Nhc-bugs mailing list