Note that there are very few excuses for byte-order-dependent code. Reading data from files *isn't* one of them (since the read overhead swamps what conversion overhead there might be -- and usually, if there is conversion overhead, that's a gcc optimization bug, not a high level programming issue.)