aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-11-27 15:36:24 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-11-27 15:36:24 +0000
commit475c267f7a9d48a3bc24d39c9a365ce3b06d5f16 (patch)
treeb4b3cf63e86e012917e8cc2f32151469a46fbd26 /gcc
parentec8e621da9820b3bb8d316a29195da93c926e8c1 (diff)
downloadgcc-475c267f7a9d48a3bc24d39c9a365ce3b06d5f16.zip
gcc-475c267f7a9d48a3bc24d39c9a365ce3b06d5f16.tar.gz
gcc-475c267f7a9d48a3bc24d39c9a365ce3b06d5f16.tar.bz2
collect2.c: Check HAVE_DUP2 instead of NO_DUP2.
* collect2.c: Check HAVE_DUP2 instead of NO_DUP2. (dup2): Make static and add prototype. * m68k/plexus.h: Don't define NO_DUP2. * configure.in (AC_CHECK_FUNCS): Add dup2. * config.in, configure: Regenerate. From-SVN: r47379
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/collect2.c7
-rw-r--r--gcc/config.in12
-rw-r--r--gcc/config/m68k/plexus.h1
-rwxr-xr-xgcc/configure4
-rw-r--r--gcc/configure.in2
6 files changed, 21 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5d9e6a0..499a72f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2001-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * collect2.c: Check HAVE_DUP2 instead of NO_DUP2.
+ (dup2): Make static and add prototype.
+ * m68k/plexus.h: Don't define NO_DUP2.
+ * configure.in (AC_CHECK_FUNCS): Add dup2.
+ * config.in, configure: Regenerate.
+
* ia64/aix.h (REG_SIZE): Don't #undef.
* sparc.h (REG_SIZE): Delete.
* flow.c (mark_used_regs): Don't use REG_SIZE.
diff --git a/gcc/collect2.c b/gcc/collect2.c
index a5d5472..f527b94 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -309,8 +309,9 @@ static int ignore_library PARAMS ((const char *));
#endif
static char *extract_string PARAMS ((const char **));
-#ifdef NO_DUP2
-int
+#ifndef HAVE_DUP2
+static int dup2 PARAMS ((int, int));
+static int
dup2 (oldfd, newfd)
int oldfd;
int newfd;
@@ -329,7 +330,7 @@ dup2 (oldfd, newfd)
return fd;
}
-#endif
+#endif /* ! HAVE_DUP2 */
/* Delete tempfiles and exit function. */
diff --git a/gcc/config.in b/gcc/config.in
index e3fde00..06cdf45 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1,4 +1,4 @@
-/* config.in. Generated automatically from configure.in by autoheader 2.13. */
+/* config.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
#undef C_ALLOCA
@@ -114,6 +114,9 @@
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
+/* Define if you have the dup2 function. */
+#undef HAVE_DUP2
+
/* Define if you have the feof_unlocked function. */
#undef HAVE_FEOF_UNLOCKED
@@ -566,15 +569,16 @@
and preserves file table indices exactly as given. */
#undef HAVE_AS_DWARF2_DEBUG_LINE
-/* Define 0/1 to force the choice for exception handling model. */
-#undef CONFIG_SJLJ_EXCEPTIONS
-
/* Define if your assembler supports the --gdwarf2 option. */
#undef HAVE_AS_GDWARF2_DEBUG_FLAG
/* Define if your assembler supports the --gstabs option. */
#undef HAVE_AS_GSTABS_DEBUG_FLAG
+/* Define 0/1 to force the choice for exception handling model. */
+#undef CONFIG_SJLJ_EXCEPTIONS
+
+
/* Bison unconditionally undefines `const' if neither `__STDC__' nor
__cplusplus are defined. That's a problem since we use `const' in
the GCC headers, and the resulting bison code is therefore type
diff --git a/gcc/config/m68k/plexus.h b/gcc/config/m68k/plexus.h
index 0ad980b..35c8e1a 100644
--- a/gcc/config/m68k/plexus.h
+++ b/gcc/config/m68k/plexus.h
@@ -102,6 +102,5 @@ Boston, MA 02111-1307, USA. */
/***********************************************************************/
#define NM_FLAGS ""
-#define NO_DUP2
#define SIZE_TYPE "int"
diff --git a/gcc/configure b/gcc/configure
index 7d2ae9d..0c8cca9 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -2078,7 +2078,7 @@ EOF
fi
# Find some useful tools
-for ac_prog in gawk mawk nawk awk
+for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -3397,7 +3397,7 @@ EOF
fi
-for ac_func in strtoul bsearch popen times clock \
+for ac_func in strtoul bsearch popen times clock dup2 \
strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
diff --git a/gcc/configure.in b/gcc/configure.in
index fb022ff..3ccd686 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -578,7 +578,7 @@ fi
dnl Disabled until we have a complete test for buggy enum bitfields.
dnl gcc_AC_C_ENUM_BF_UNSIGNED
-AC_CHECK_FUNCS(strtoul bsearch popen times clock \
+AC_CHECK_FUNCS(strtoul bsearch popen times clock dup2 \
strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \