X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2F_doprnt.c;h=ca97bc8c5d43ffb3f43f7087204d5bd9f97876c4;hb=eb3c48e9b415e7a56dda6a160f31fe4994c43e13;hp=a91e27f4127b8e01ed9e97bb51195ab7f509d690;hpb=24acd898d2937c3316d4c72543cfee29cee667c6;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/_doprnt.c b/libiberty/_doprnt.c index a91e27f412..ca97bc8c5d 100644 --- a/libiberty/_doprnt.c +++ b/libiberty/_doprnt.c @@ -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 -#ifdef ANSI_PROTOTYPES #include -#else -#include -#endif #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STDLIB_H +#include +#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));