This patch fixes endian problems with get_netmask(). I don't know if this is the cleanest solution, but it makes 'ipcalc -n' work on both an i386 system and a ppc system.
Last patch have changed for "ipcalc" applet with usage new get_ulflags() function.