source:
trunk/gcc/libiberty/getpwd.c@
3566
| Last change on this file since 3566 was 46, checked in by , 23 years ago | |
|---|---|
|
|
| File size: 2.6 KB | |
| Line | |
|---|---|
| 1 | /* getpwd.c - get the working directory */ |
| 2 | |
| 3 | /* |
| 4 | |
| 5 | @deftypefn Supplemental char* getpwd (void) |
| 6 | |
| 7 | Returns the current working directory. This implementation caches the |
| 8 | result on the assumption that the process will not call @code{chdir} |
| 9 | between calls to @code{getpwd}. |
| 10 | |
| 11 | @end deftypefn |
| 12 | |
| 13 | */ |
| 14 | |
| 15 | #ifdef HAVE_CONFIG_H |
| 16 | #include "config.h" |
| 17 | #endif |
| 18 | |
| 19 | #include <sys/types.h> |
| 20 | |
| 21 | #include <errno.h> |
| 22 | #ifndef errno |
| 23 | extern int errno; |
| 24 | #endif |
| 25 | |
