PPC fixes & clean-up patch by (Romain Dolbeau <dolbeau at irisa dot fr>)