From: Doug Gwyn (VLD/VMB) <gwyn at brl-vld> getcwd(3c) is the standard UNIX C library function for getting the pathname of the current working directory. However, you will not find this on pre-System V UNIXes. If you have a license you could just obtain a copy of the source and add it to your C library.