Mail Archives: djgpp-workers/2003/08/30/19:34:40
Hello.
Here's revision 2 of my patch to describe extensions to POSIX
in our implementation of getcwd. @port-note should have been
before @portability. That's now fixed.
If no-one has any comments, I'll commit this next weekend.
Bye, Rich =]
Index: src/libc/posix/unistd/getcwd.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/unistd/getcwd.txh,v
retrieving revision 1.3
diff -p -u -3 -r1.3 getcwd.txh
--- src/libc/posix/unistd/getcwd.txh 29 Jan 2003 12:51:41 -0000 1.3
+++ src/libc/posix/unistd/getcwd.txh 30 Aug 2003 23:32:40 -0000
@@ -11,9 +11,14 @@ char *getcwd(char *buffer, int max);
@subheading Description
Get the current directory. The return value includes the drive
-specifier. If @var{buffer} is @code{NULL}, @code{getcwd} allocates
-memory with @code{malloc}. This call fails if more than @var{max}
-characters are required to specify the current directory.
+specifier.
+
+If @var{buffer} is @code{NULL}, @code{getcwd} allocates
+a buffer of size @var{max} with @code{malloc}. This is an extension
+of the POSIX standard, which is compatible with the behaviour on Linux.
+
+This call fails if more than @var{max} characters are required
+to specify the current directory.
@subheading Return Value
@@ -21,6 +26,8 @@ The buffer, either @var{buffer} or a new
@code{NULL} on error.
@subheading Portability
+
+@port-note posix The behaviour when @var{buffer} is @code{NULL} is unspecified for POSIX.
@portability !ansi, posix
- Raw text -