int rc moved up so it is not accidently lost in ifdefs