Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-10-05 20:52:43 +0400
committerChristopher Faylor <me@cgf.cx>2001-10-05 20:52:43 +0400
commit547d07cae88222ad22f512b9fb9b4ab779194f93 (patch)
tree94ba07312166289cae8709682add7592be173629 /winsup/testsuite
parent19639f41391c71c705b20cbb8fb10657432ac54b (diff)
* winsup.api/nullgetcwd.c: New file. Check that NULL first argument to getcwd
works.
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/ChangeLog5
-rw-r--r--winsup/testsuite/winsup.api/nullgetcwd.c16
2 files changed, 21 insertions, 0 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index 54ebc5c5d..1d39325c4 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -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.
diff --git a/winsup/testsuite/winsup.api/nullgetcwd.c b/winsup/testsuite/winsup.api/nullgetcwd.c
new file mode 100644
index 000000000..f7d873261
--- /dev/null
+++ b/winsup/testsuite/winsup.api/nullgetcwd.c
@@ -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);
+}
+