* winsup.api/nullgetcwd.c: New file. Check that NULL first argument to getcwd

works.
This commit is contained in:
Christopher Faylor 2001-10-05 16:52:43 +00:00
parent 19639f4139
commit 547d07cae8
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Fri Oct 5 11:15:55 2001 Christopher Faylor <cgf@cygnus.com>
* winsup.api/nullgetcwd.c: New file. Check that NULL first argument to
getcwd works.
Thu Oct 4 22:47:51 2001 Christopher Faylor <cgf@cygnus.com>
* winsup.api/systemcall.c (main): Change some messages for clarity.

View File

@ -0,0 +1,16 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int
main (int argc, char *argv)
{
char *cwd = getcwd (NULL, 256);
if (cwd == NULL)
{
fprintf (stderr, "%s: getcwd returns NULL\n", argv[0]);
exit (1);
}
exit (0);
}