Modified for 64-bit GNU/Linux compatibility.