| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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 <yzone AT mail DOT raidway DOT ne DOT jp> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | getcwd() problem |
| MIME-Version: | 1.0 |
| X-Mailer: | Becky! ver. 2.00.07 |
Hello.
I found a problem in the getcwd() function in recent snapshot.
>$ cat getcwd.c
>#include <stdio.h>
>#include <string.h>
>#include <unistd.h>
>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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |