projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Documentation about Minix.
[gnulib.git]
/
tests
/
test-cloexec.c
diff --git
a/tests/test-cloexec.c
b/tests/test-cloexec.c
index
a29d1be
..
374de30
100644
(file)
--- a/
tests/test-cloexec.c
+++ b/
tests/test-cloexec.c
@@
-1,5
+1,5
@@
/* Test duplicating non-inheritable file descriptors.
/* Test duplicating non-inheritable file descriptors.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009
-2011
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
@@
-22,8
+22,6
@@
#include <errno.h>
#include <fcntl.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@@
-33,18
+31,7
@@
#endif
#include "binary-io.h"
#endif
#include "binary-io.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Return non-zero if FD is open and inheritable across exec/spawn. */
static int
/* Return non-zero if FD is open and inheritable across exec/spawn. */
static int
@@
-69,7
+56,8
@@
is_inheritable (int fd)
}
#if !O_BINARY
}
#if !O_BINARY
-# define setmode(f,m) 0
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
#endif
/* Return non-zero if FD is open in the given MODE, which is either
#endif
/* Return non-zero if FD is open in the given MODE, which is either