projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NEWS.stable: log cherry-pick [93b28fe]->[e7f1d9f] ioctl: Move autoconf macro to a...
[gnulib.git]
/
tests
/
test-dup-safer.c
diff --git
a/tests/test-dup-safer.c
b/tests/test-dup-safer.c
index
24cc9e5
..
28f1317
100644
(file)
--- a/
tests/test-dup-safer.c
+++ b/
tests/test-dup-safer.c
@@
-1,5
+1,5
@@
/* Test that dup_safer leaves standard fds alone.
/* Test that dup_safer leaves standard fds alone.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009
, 2010
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-24,8
+24,6
@@
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
#include "binary-io.h"
#include "cloexec.h"
#include "binary-io.h"
#include "cloexec.h"
@@
-49,19
+47,10
@@
static int zero (void) { return 0; }
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
/* Return true if FD is open. */
static bool
/* Return true if FD is open. */
static bool