mirror of git://sourceware.org/git/glibc.git
manual: Improve documentation of get_current_dir_name. [BZ #6889]
This is a minor rewording to clarify the behaviour of get_current_dir_name. Additionally, the @vindex is moved above the @deftypefun so that following links give a better result with regard to context. [BZ #6889] * manual/filesys.texi (get_current_dir_name): Clarify behaviour.
This commit is contained in:
parent
f8d7958289
commit
7d15ef84f5
|
@ -1,3 +1,8 @@
|
||||||
|
2018-02-19 Rical Jasan <ricaljasan@pacific.net>
|
||||||
|
|
||||||
|
[BZ #6889]
|
||||||
|
* manual/filesys.texi (get_current_dir_name): Clarify behaviour.
|
||||||
|
|
||||||
2018-02-18 Aurelien Jarno <aurelien@aurel32.net>
|
2018-02-18 Aurelien Jarno <aurelien@aurel32.net>
|
||||||
|
|
||||||
[BZ #22818]
|
[BZ #22818]
|
||||||
|
|
|
@ -147,19 +147,20 @@ necessarily enough space to contain the directory name. That is why
|
||||||
this function is deprecated.
|
this function is deprecated.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
|
@vindex PWD
|
||||||
@deftypefun {char *} get_current_dir_name (void)
|
@deftypefun {char *} get_current_dir_name (void)
|
||||||
@standards{GNU, unistd.h}
|
@standards{GNU, unistd.h}
|
||||||
@safety{@prelim{}@mtsafe{@mtsenv{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{} @acsfd{}}}
|
@safety{@prelim{}@mtsafe{@mtsenv{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{} @acsfd{}}}
|
||||||
@c Besides getcwd, which this function calls as a fallback, it calls
|
@c Besides getcwd, which this function calls as a fallback, it calls
|
||||||
@c getenv, with the potential thread-safety issues that brings about.
|
@c getenv, with the potential thread-safety issues that brings about.
|
||||||
@vindex PWD
|
The @code{get_current_dir_name} function is basically equivalent to
|
||||||
This @code{get_current_dir_name} function is basically equivalent to
|
@w{@code{getcwd (NULL, 0)}}, except the value of the @env{PWD}
|
||||||
@w{@code{getcwd (NULL, 0)}}. The only difference is that the value of
|
environment variable is first examined, and if it does in fact
|
||||||
the @code{PWD} variable is returned if this value is correct. This is a
|
correspond to the current directory, that value is returned. This is
|
||||||
subtle difference which is visible if the path described by the
|
a subtle difference which is visible if the path described by the
|
||||||
@code{PWD} value is using one or more symbol links in which case the
|
value in @env{PWD} is using one or more symbolic links, in which case
|
||||||
value returned by @code{getcwd} can resolve the symbol links and
|
the value returned by @code{getcwd} would resolve the symbolic links
|
||||||
therefore yield a different result.
|
and therefore yield a different result.
|
||||||
|
|
||||||
This function is a GNU extension.
|
This function is a GNU extension.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
Loading…
Reference in New Issue