diff options
| author | muffin <none@none> | 2005-10-20 11:47:44 -0700 |
|---|---|---|
| committer | muffin <none@none> | 2005-10-20 11:47:44 -0700 |
| commit | 5d54f3d8999eac1762fe0a8c7177d20f1f201fae (patch) | |
| tree | 65c7761c305dbd97609e64517f5781b433efa980 /usr/src/lib/libbc/libc/stdio/sys5/printf.c | |
| parent | 1b42782e10f177b2bd092559506a96dbbefefa54 (diff) | |
| download | illumos-joyent-5d54f3d8999eac1762fe0a8c7177d20f1f201fae.tar.gz | |
6309237 gcc and libbc don't get along
Diffstat (limited to 'usr/src/lib/libbc/libc/stdio/sys5/printf.c')
| -rw-r--r-- | usr/src/lib/libbc/libc/stdio/sys5/printf.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/usr/src/lib/libbc/libc/stdio/sys5/printf.c b/usr/src/lib/libbc/libc/stdio/sys5/printf.c index 0a320e4d86..87319f3283 100644 --- a/usr/src/lib/libbc/libc/stdio/sys5/printf.c +++ b/usr/src/lib/libbc/libc/stdio/sys5/printf.c @@ -20,31 +20,27 @@ * CDDL HEADER END */ /* - * Copyright 1986 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1984 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" /* from S5R2 1.5 */ +#pragma ident "%Z%%M% %I% %E% SMI" /*LINTLIBRARY*/ #include <stdio.h> -#include <varargs.h> +#include <stdarg.h> extern int _doprnt(); -/*VARARGS1*/ int -printf(format, va_alist) -char *format; -va_dcl +printf(char *format, ...) { - register int count; + int count; va_list ap; - va_start(ap); if (!(stdout->_flag & _IOWRT)) { /* if no write flag */ if (stdout->_flag & _IORW) { @@ -52,10 +48,11 @@ va_dcl stdout->_flag |= _IOWRT; } else { /* else error */ - return EOF; + return (EOF); } } + va_start(ap, format); count = _doprnt(format, ap, stdout); va_end(ap); - return(ferror(stdout)? EOF: count); + return (ferror(stdout)? EOF: count); } |
