Get rid of VG_(getcwd) and replace it with a pair of functions,
VG_(record_startup_wd) which records the working directory at startup,
and VG_(get_startup_wd) which later tells you what value was recorded.
This works because all uses of VG_(getcwd) serve only to record the
directory at process start anyway.  The motivation is that AIX does
not support sys_getcwd directly, so it's easier for the launcher to
ship in the required value using an environment variable.  On Linux
sys_getcwd is used as before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6764 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/pub_tool_libcfile.h b/include/pub_tool_libcfile.h
index 7d394cb..d51b361 100644
--- a/include/pub_tool_libcfile.h
+++ b/include/pub_tool_libcfile.h
@@ -56,6 +56,10 @@
 extern Int    VG_(readlink)( Char* path, Char* buf, UInt bufsize );
 extern Int    VG_(getdents)( UInt fd, struct vki_dirent *dirp, UInt count );
 
+/* Copy the working directory at startup into buf[0 .. size-1], or return
+   False if buf is too small. */
+extern Bool VG_(get_startup_wd) ( Char* buf, SizeT size );
+
 #endif   // __PUB_TOOL_LIBCFILE_H
 
 /*--------------------------------------------------------------------*/