tweaks to Tally code for gcc