OSDN Git Service

* gcc.target/i386/sse-5.c (dg-options): Add -mno-sse.
[pf3gnuchains/gcc-fork.git] / libiberty / _doprnt.c
index a91e27f..ca97bc8 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a version of _doprnt in terms of fprintf.
-   Copyright (C) 1998, 1999, 2000, 2001   Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002   Free Software Foundation, Inc.
    Contributed by Kaveh Ghazi  (ghazi@caip.rutgers.edu)  3/29/98
 
 This program is free software; you can redistribute it and/or modify it
@@ -14,24 +14,27 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include "config.h"
 #include "ansidecl.h"
 #include "safe-ctype.h"
 
 #include <stdio.h>
-#ifdef ANSI_PROTOTYPES
 #include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 
 #undef _doprnt
 
+#ifdef HAVE__DOPRNT
+#define TEST
+#endif
+
 #ifdef TEST /* Make sure to use the internal one.  */
 #define _doprnt my_doprnt
 #endif
@@ -72,10 +75,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
       } while (0)
 
 int
-_doprnt (format, ap, stream)
-  const char * format;
-  va_list ap;
-  FILE * stream;
+_doprnt (const char *format, va_list ap, FILE *stream)
 {
   const char * ptr = format;
   char specifier[128];
@@ -216,10 +216,10 @@ _doprnt (format, ap, stream)
     fflush(stdin); \
 } while (0)
 
-static int checkit PARAMS ((const char * format, ...)) ATTRIBUTE_PRINTF_1;
+static int checkit (const char * format, ...) ATTRIBUTE_PRINTF_1;
 
 static int
-checkit VPARAMS ((const char* format, ...))
+checkit (const char* format, ...)
 {
   int result;
   VA_OPEN (args, format);
@@ -232,7 +232,7 @@ checkit VPARAMS ((const char* format, ...))
 }
 
 int
-main ()
+main (void)
 {
   RESULT(checkit ("<%d>\n", 0x12345678));
   RESULT(printf ("<%d>\n", 0x12345678));