.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
-.\" License.
+.\" %%%LICENSE_END
+.\"
.\" Modified Wed Jul 21 22:35:42 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 18 Mar 1996 by Martin Schulze (joey@infodrom.north.de):
.\" Corrected description of getwd().
.\"
.TH GETCWD 3 2010-09-20 "GNU" "Linux Programmer's Manual"
.SH NAME
-getcwd, getwd, get_current_dir_name \- Get current working directory
+getcwd, getwd, get_current_dir_name \- get current working directory
.SH SYNOPSIS
.nf
.B #include <unistd.h>
For portability and security reasons, use of
.BR getwd ()
is deprecated.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
On success, these functions return a pointer to a string containing
the pathname of the current working directory.
In the case
and
.BR getwd ()
this is the same value as
-.IR buf.
+.IR buf .
On failure, these functions return NULL, and
.I errno
.I size
argument is zero and
.I buf
-is not a null pointer.
+is not a NULL pointer.
.TP
EINVAL
.BR getwd ():
argument is less than the length of the absolute pathname of the
working directory, including the terminating null byte.
You need to allocate a bigger array and try again.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
.BR getcwd ()
conforms to POSIX.1-2001.
Note however that POSIX.1-2001 leaves the behavior of
.BR fchdir (2)
to return is usually a faster and more reliable alternative when sufficiently
many file descriptors are available, especially on platforms other than Linux.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR chdir (2),
.BR fchdir (2),
.BR open (2),