1. 26 Dec, 2009 1 commit
    • Eric Blake's avatar
      tests: use macros.h in more places · 9a345436
      Eric Blake authored
      Make the ASSERT macro a bit more reusable.
      
      * tests/macros.h (ASSERT): Depend on ASSERT_STREAM.
      (ASSERT_STREAM): Provide default of stderr.
      * tests/test-dirent-safer.c: Include macros.h, using alternate
      stream for assertions.
      * tests/test-dup-safer.c: Likewise.
      * tests/test-freopen-safer.c: Likewise.
      * tests/test-getopt.c: Likewise.
      * tests/test-openat-safer.c: Likewise.
      * tests/test-pipe.c: Likewise.
      * tests/test-popen-safer.c: Likewise.
      * modules/dirent-safer-tests (Files): Include macros.h.
      * modules/unistd-safer-tests (Files): Likewise.
      * modules/freopen-safer-tests (Files): Likewise.
      * modules/getopt-posix-tests (Files): Likewise.
      * modules/openat-safer-tests (Files): Likewise.
      * modules/pipe-tests (Files): Likewise.
      Signed-off-by: 's avatarEric Blake <ebb9@byu.net>
      9a345436
  2. 06 Nov, 2009 1 commit
    • Eric Blake's avatar
      freopen-safer: new module · 004f708a
      Eric Blake authored
      * modules/freopen-safer: New module.
      * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): New macro.
      * lib/freopen-safer.c (freopen_safer): New file.
      * lib/stdio-safer.h (freopen_safer): New declaration.
      * lib/stdio--.h (freopen): New override.
      * MODULES.html.sh (File stream based Input/Output): Mention it.
      * doc/posix-functions/freopen.texi (freopen): Mention pitfalls and
      freopen-safer module.
      * doc/posix-functions/stderr.texi (stderr): Likewise.
      * doc/posix-functions/stdin.texi (stdin): Likewise.
      * doc/posix-functions/stdout.texi (stdout): Likewise.
      * modules/freopen-safer-tests: New test.
      * tests/test-reopen-safer.c: New file.
      Signed-off-by: 's avatarEric Blake <ebb9@byu.net>
      004f708a