The getcwd function has variants named _getcwd32 and _getcwd64 for use with 32-bit and 64-bit pointer sizes, respectively.