From e6a3e0451a21fc1b5f248f5f2bcbbacf5e905d68 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 10 Dec 2010 05:35:53 -0500 Subject: Test for access() needing . --- test/access.c | 20 ++++++++++++++++++++ test/regress.chk | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/access.c (limited to 'test') diff --git a/test/access.c b/test/access.c new file mode 100644 index 0000000..7307fd5 --- /dev/null +++ b/test/access.c @@ -0,0 +1,20 @@ +/* access() requires */ + +/* + * Items: access( + * Requires: + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include + +main(int arg, char **argv) +{ + /* + * Note: use of a symbolic constant like F_OK *will* + * cause the compile to fail and the requrement + * for to be tetected. + */ + (void)access("/dev/null", 0); +} diff --git a/test/regress.chk b/test/regress.chk index 9d17e27..8135ba7 100644 --- a/test/regress.chk +++ b/test/regress.chk @@ -12,11 +12,16 @@ deheader: test/a64l.c includes deheader: test/a64l.c has requires from a64l\s*\( deheader: test/a64l.c has requires from l64a\s*\( deheader: test/abs.c includes +deheader: test/access.c has requires from access\s*\( +deheader: test/access.c has requires from access\s*\( +deheader: test/access.c includes +deheader: test/access.c has requires from access\s*\( deheader: test/abort.c includes deheader: test/string.c without succeeded. deheader: remove from test/string.c deheader: test/abs.c without succeeded. deheader: remove from test/abs.c +deheader: in test/access.c, retaining required '#include \n' deheader: in test/a64l.c, retaining required '#include \n' deheader: test/abort.c without succeeded. deheader: remove from test/abort.c @@ -26,4 +31,4 @@ deheader: remove from test/duplicate.c deheader: remove from test/duplicate.c deheader: in test/umask.c, retaining required '#include \n' deheader: in test/umask.c, retaining required '#include \n' -deheader: saw 7 files, 8 includes, 5 removed +deheader: saw 8 files, 9 includes, 5 removed -- cgit v1.2.3-70-g09d2