Up to 40,000 civil service jobs face the axe