]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
collect2.c: Check HAVE_DUP2 instead of NO_DUP2.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 27 Nov 2001 15:36:24 +0000 (15:36 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 27 Nov 2001 15:36:24 +0000 (15:36 +0000)
* 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

gcc/ChangeLog
gcc/collect2.c
gcc/config.in
gcc/config/m68k/plexus.h
gcc/configure
gcc/configure.in

index 5d9e6a0e05f648ecdaeef328ae98ecf209274b9c..499a72f2ef42a6b2da9d80675a4c814c4c9b3cff 100644 (file)
@@ -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.
index a5d5472fca3d6529728d9fc89f9f1f09efc748a3..f527b94b7cb70497d430df807db2e9f30be19dce 100644 (file)
@@ -309,8 +309,9 @@ static int ignore_library   PARAMS ((const char *));
 #endif
 static char *extract_string    PARAMS ((const char **));
 \f
-#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 */
 \f
 /* Delete tempfiles and exit function.  */
 
index e3fde00baeb96c87b9a75a6c3604d0dc2664be11..06cdf45ace74b1d3ecbd2b5a08eea2616e4311ba 100644 (file)
@@ -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
 /* 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
 
    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
index 0ad980b15e10eb2422b59e97a9bd7b79b6159f9c..35c8e1a15d7315e11c524b276510b6d5edd362dc 100644 (file)
@@ -102,6 +102,5 @@ Boston, MA 02111-1307, USA.  */
 /***********************************************************************/
 
 #define NM_FLAGS ""
-#define NO_DUP2
 
 #define SIZE_TYPE "int"
index 7d2ae9de10f6e011a8bc7fa13c178edac11c46ef..0c8cca93a8c7a83727730eaf7ed2630c7ab8ce1b 100755 (executable)
@@ -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 \
index fb022ff0293cf48dcb9bade3767a4dea56e29adc..3ccd686d594f0cc120b32cce9171e9423313638a 100644 (file)
@@ -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 \