Patches provided by Joel Baker in PR 22366, verified by myself.
in common.c into separate files - this slighly cuts down size of pac(1) not that it's really significant, but every bit counts ....