delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/08/30/19:34:40

Date: Sun, 31 Aug 2003 00:43:31 +0100
From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Sender: rich AT phekda DOT freeserve DOT co DOT uk
To: djgpp-workers AT delorie DOT com
X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
Subject: getcwd docs: describe extensions to POSIX, revision 2 [PATCH]
Message-Id: <E19tFEh-0000Td-00@phekda.freeserve.co.uk>
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019