summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-19 01:20:34 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-19 01:20:34 +0000
commitb88c06b5d7e46d1db8f85fd29fee3a13da956ac5 (patch)
tree1e592d6524a057c57b0bac43a51c932c226f3786 /gcc
parent70e053dd2a8ed7da332aa8a538c123c6aab29503 (diff)
downloadgcc-b88c06b5d7e46d1db8f85fd29fee3a13da956ac5.tar.gz
* collect2.c (dup2): Delete.
* configure.ac: Don't check for dup2. * config.in, configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/collect2.c20
-rw-r--r--gcc/config.in6
-rwxr-xr-xgcc/configure3
-rw-r--r--gcc/configure.ac2
5 files changed, 9 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 65af73ff27b..a706bb2d949 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * collect2.c (dup2): Delete.
+ * configure.ac: Don't check for dup2.
+
+ * config.in, configure: Regenerate.
+
2005-08-18 J"orn Rennecke <joern.rennecke@st.com>
* sh.c (sh_gimplify_va_arg_expr): Loop to substitute a RECORD_TYPE
diff --git a/gcc/collect2.c b/gcc/collect2.c
index a813e51e019..f4cc46aad50 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -271,26 +271,6 @@ static char *resolve_lib_name (const char *);
#endif
static char *extract_string (const char **);
-#ifndef HAVE_DUP2
-static int
-dup2 (int oldfd, int newfd)
-{
- int fdtmp[256];
- int fdx = 0;
- int fd;
-
- if (oldfd == newfd)
- return oldfd;
- close (newfd);
- while ((fd = dup (oldfd)) != newfd && fd >= 0) /* good enough for low fd's */
- fdtmp[fdx++] = fd;
- while (fdx > 0)
- close (fdtmp[--fdx]);
-
- return fd;
-}
-#endif /* ! HAVE_DUP2 */
-
/* Delete tempfiles and exit function. */
void
diff --git a/gcc/config.in b/gcc/config.in
index f533c1c205e..fa39a356efc 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -611,12 +611,6 @@
#endif
-/* Define to 1 if you have the `dup2' function. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_DUP2
-#endif
-
-
/* Define to 1 if you have the <fcntl.h> header file. */
#ifndef USED_FOR_TARGET
#undef HAVE_FCNTL_H
diff --git a/gcc/configure b/gcc/configure
index dd25a7de6ed..d9697b0f139 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -9116,8 +9116,7 @@ fi
-
-for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
+for ac_func in times clock kill getrlimit setrlimit atoll atoq \
sysconf strsignal getrusage nl_langinfo scandir alphasort \
gettimeofday mbstowcs wcswidth mmap mincore setlocale \
clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3cda92ccca6..16268b6e8df 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -999,7 +999,7 @@ define(gcc_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
putchar_unlocked putc_unlocked)
-AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \
+AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \
sysconf strsignal getrusage nl_langinfo scandir alphasort \
gettimeofday mbstowcs wcswidth mmap mincore setlocale \
gcc_UNLOCKED_FUNCS)