.\" Modified Mon Dec 11 13:32:51 MET 2000 by aeb
.\" Modified Thu Apr 22 03:49:15 CEST 2002 by Roger Luethi <rl@hellgate.ch>
.\"
-.TH GETCWD 3 2009-03-31 "GNU" "Linux Programmer's Manual"
+.TH GETCWD 3 2010-09-20 "GNU" "Linux Programmer's Manual"
.SH NAME
getcwd, getwd, get_current_dir_name \- Get current working directory
.SH SYNOPSIS
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
-.in
.sp
-.BR getcwd ():
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
-.br
+.in
.BR get_current_dir_name ():
+.RS
_GNU_SOURCE
+.RE
+.sp
+.BR getwd ():
+.ad l
+.RS 4
+.PD 0
+.TP 4
+Since glibc 2.12:
+.nf
+_BSD_SOURCE ||
+ (_XOPEN_SOURCE\ >=\ 500 ||
+ _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) &&
+ !(_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700)
+.TP 4
+.fi
+Before glibc 2.12:
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
+_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+.PD
+.RE
+.ad b
.SH DESCRIPTION
These functions return a null-terminated string containing an
absolute pathname that is the current working directory of