1 |
/* Duplicate an open file descriptor to a specified file descriptor. |
/* Duplicate an open file descriptor to a specified file descriptor. |
2 |
Copyright (C) 1999, 2004 Free Software Foundation, Inc. |
Copyright (C) 1999, 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
22 |
#endif |
#endif |
23 |
|
|
24 |
#include <errno.h> |
#include <errno.h> |
|
|
|
25 |
#include <fcntl.h> |
#include <fcntl.h> |
26 |
|
#include <unistd.h> |
|
#if HAVE_UNISTD_H |
|
|
# include <unistd.h> |
|
|
#endif |
|
27 |
|
|
28 |
#ifndef F_DUPFD |
#ifndef F_DUPFD |
29 |
static int |
static int |