projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix version number
[gnulib.git]
/
tests
/
test-dup3.c
diff --git
a/tests/test-dup3.c
b/tests/test-dup3.c
index
41fc16d
..
ed3a88f
100644
(file)
--- a/
tests/test-dup3.c
+++ b/
tests/test-dup3.c
@@
-1,5
+1,5
@@
/* Test duplicating file descriptors.
/* Test duplicating 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
@@
-21,11
+21,12
@@
#include <unistd.h>
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (dup3, int, (int, int, int));
+
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
@@
-34,18
+35,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 true if FD is open. */
static bool
/* Return true if FD is open. */
static bool
@@
-85,7
+75,7
@@
main ()
{
int use_cloexec;
{
int use_cloexec;
-#if
defined
O_CLOEXEC
+#if O_CLOEXEC
for (use_cloexec = 0; use_cloexec <= 1; use_cloexec++)
#else
use_cloexec = 0;
for (use_cloexec = 0; use_cloexec <= 1; use_cloexec++)
#else
use_cloexec = 0;
@@
-97,7
+87,7
@@
main ()
char buffer[1];
o_flags = 0;
char buffer[1];
o_flags = 0;
-#if
defined
O_CLOEXEC
+#if O_CLOEXEC
if (use_cloexec)
o_flags |= O_CLOEXEC;
#endif
if (use_cloexec)
o_flags |= O_CLOEXEC;
#endif