Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Fri, 5 Oct 2001 21:13:31 +0900 (JST) Message-Id: <200110051213.VAA12158@mail.raidway.ne.jp> From: Yasushi Higuchi To: Subject: getcwd() problem MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.00.07 Hello. I found a problem in the getcwd() function in recent snapshot. >$ cat getcwd.c >#include >#include >#include >int >main(void) >{ > char *cwd = getcwd(NULL, 256); > if (cwd == NULL) > fprintf(stderr, "null\n"); > else { > fprintf(stderr, "[%s]\n", cwd); > free(cwd); > } > return 0; >} == Cygwin 1.3.3 >$ ./getcwd >[/home/work/cygwin] == 20011005 snapshot >$ ./getcwd >null I think that a former movement is right. Reference: FreeBSD manpages >STANDARDS >The getcwd() function conforms to ISO 9899: 1990 (``ISO C''). The ability >to specify a NULL pointer and have getcwd() allocate memory as necessary >is an extension. -- Yasushi HIGUCHI -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/