The dirname function has variants named _dirname32 and _dirname64 for use with 32-bit and 64-bit pointer sizes, respectively.