Polyhedral geometry for linear diophantine systems