CVS patchset: 2678
CVS date: 1999/01/08 03:10:12
return 0;
}
+
+char * currentDirectory(void) {
+ int currDirLen;
+ char * currDir;
+
+ currDirLen = 50;
+ currDir = malloc(currDirLen);
+ while (!getcwd(currDir, currDirLen) && errno == ERANGE) {
+ currDirLen += 50;
+ currDir = realloc(currDir, currDirLen);
+ }
+
+ return currDir;
+}
char * gidToGname(gid_t gid);
int makeTempFile(const char * prefix, /*@out@*/const char ** fnptr, /*@out@*/FD_t * fdptr);
+char * currentDirectory(void); /* result needs to be freed */
#endif /* H_MISC */