diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2008-12-11 17:27:56 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2008-12-11 17:27:56 +0000 |
commit | 7dd0c330975c6a1452d829471ba68543d5e8ab5c (patch) | |
tree | d0c618c8f3752ff33357d44d3ce17b74a561d2c5 /newlib/libc/stdio | |
parent | 2549caeff19e3bfbf6405884071bfd1193ae62a5 (diff) | |
download | newlib-7dd0c330975c6a1452d829471ba68543d5e8ab5c.zip newlib-7dd0c330975c6a1452d829471ba68543d5e8ab5c.tar.gz newlib-7dd0c330975c6a1452d829471ba68543d5e8ab5c.tar.bz2 |
2008-12-11 Craig Howland <howland@LGSInnovations.com>
* libc/include/sys/lock.h: Add void cast to avoid "statement has no
effect" warnings from gcc.
* libc/include/sys/stdio.h: Ditto.
* libc/include/sys/time.h: Correct gettimeofday() prototype.
* libc/stdlib/__exp10.c: Add #include "std.h" for function prototype.
* libc/stdlib/__ten_mu.c: Ditto.
* libc/stdlib/std.h: Correct __exp10's ANSI prototype.
* libc/stdlib/ldtoa.c: Change eiisinf definition to ANSI form. (Are
already others in file without _ansi method, so did not bother.)
* libc/stdlib/system.c: Use _ansi forms for function prototypes and
definitions.
* libc/time/mktime.c: Ditto.
* libc/misc/__dprintf.c: Ditto.
* libc/include/stdio.h: Add function prototypes for _fgetc_r,
_fgetpos_r, _fsetpos_r, _freopen_r, _rewind_r, freopen64, _freopen64_r,
_funopen_r, and _fopencookie_r.
* libc/include/reent.h: Add function prototype for _stat64_r, align
_execve_r prototype with POSIX definition for execve.
* libc/reent/execr.c: Align function prototype with POSIX definition.
* libc/stdio/asniprintf.c: Add #include "local.h".
* libc/stdio/vasniprintf.c: Ditto.
* libc/stdio/fread.c: Remove unused variable newcount.
* libc/stdio/local.h: Add function prototype for __sccl.
* libc/stdio/open_memstream.c: Remove unused variable flags.
* libc/stdio/vfscanf.c: Proper prototyping for ccfn, remove prototype
for __sccl since now in local.h.
* libc/string/memcpy.c: Add #include <string.h> (for real and for
traditional synopsis), remove extraneous stddef.h and limits.h.
* libc/syscalls/sysclose.c: Add #include <unistd.h>.
* libc/syscalls/sysfork.c: Ditto.
* libc/syscalls/sysgetpid.c: Ditto.
* libc/syscalls/sysexecve.c: Add #include <unistd.h>, align function
prototype with POSIX definition.
* libc/syscalls/sysfstat.c: Add #include <sys/stat.h>.
* libc/syscalls/sysgettod.c: Correct sys/times.h to sys/time.h.
* libc/syscalls/syskill.c: Add #include <signal.h>.
* libc/syscalls/syslink.c: Add #include <unistd.h>, fix prototype.
* libc/syscalls/sysunlink.c: Ditto.
* libc/syscalls/sysstat.c: Add #include <sys/stat.h>, fix prototype.
* libc/syscalls/syswait.c: Add #include <sys/wait.h>, fix prototype.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r-- | newlib/libc/stdio/asniprintf.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdio/fread.c | 2 | ||||
-rw-r--r-- | newlib/libc/stdio/local.h | 1 | ||||
-rw-r--r-- | newlib/libc/stdio/open_memstream.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdio/vasniprintf.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdio/vfscanf.c | 11 |
6 files changed, 9 insertions, 8 deletions
diff --git a/newlib/libc/stdio/asniprintf.c b/newlib/libc/stdio/asniprintf.c index d4ff901..16ccfde 100644 --- a/newlib/libc/stdio/asniprintf.c +++ b/newlib/libc/stdio/asniprintf.c @@ -11,6 +11,7 @@ #include <stdarg.h> #include <limits.h> #include <errno.h> +#include "local.h" char * _DEFUN(_asniprintf_r, (ptr, buf, lenp, fmt), diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c index 15b48bb..8919554 100644 --- a/newlib/libc/stdio/fread.c +++ b/newlib/libc/stdio/fread.c @@ -87,7 +87,7 @@ _DEFUN(crlf_r, (ptr, fp, buf, count, eof), size_t count _AND int eof) { - int newcount = 0, r; + int r; char *s, *d, *e; if (count == 0) diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index 8b1516f..29e7cc6 100644 --- a/newlib/libc/stdio/local.h +++ b/newlib/libc/stdio/local.h @@ -33,6 +33,7 @@ #endif +extern u_char *_EXFUN(__sccl, (char *, u_char *fmt)); extern int _EXFUN(__svfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list)); extern int _EXFUN(__ssvfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list)); extern int _EXFUN(__svfiscanf_r,(struct _reent *,FILE *, _CONST char *,va_list)); diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c index 6a0680f..27ff5be 100644 --- a/newlib/libc/stdio/open_memstream.c +++ b/newlib/libc/stdio/open_memstream.c @@ -254,7 +254,6 @@ _DEFUN(_open_memstream_r, (ptr, buf, size), { FILE *fp; memstream *c; - int flags; if (!buf || !size) { diff --git a/newlib/libc/stdio/vasniprintf.c b/newlib/libc/stdio/vasniprintf.c index bf9b7c5..56db45e 100644 --- a/newlib/libc/stdio/vasniprintf.c +++ b/newlib/libc/stdio/vasniprintf.c @@ -11,6 +11,7 @@ #include <stdarg.h> #include <limits.h> #include <errno.h> +#include "local.h" char * _DEFUN(_vasniprintf_r, (ptr, buf, lenp, fmt, ap), diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index cad5098..98c3db6 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -250,8 +250,6 @@ static void * get_arg (int, va_list *, int *, void **); typedef unsigned long long u_long_long; #endif -/*static*/ u_char *__sccl (); - /* * vfscanf */ @@ -452,7 +450,8 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), size_t mbslen; /* length of converted multibyte sequence */ mbstate_t state; /* value to keep track of multibyte state */ - u_long (*ccfn) () = 0; /* conversion function (strtol/strtoul) */ + #define CCFN_PARAMS _PARAMS((struct _reent *, const char *, char **, int)) + u_long (*ccfn)CCFN_PARAMS=0; /* conversion function (strtol/strtoul) */ char ccltab[256]; /* character class table for %[...] */ char buf[BUF]; /* buffer for numeric conversions */ char *lptr; /* literal pointer */ @@ -658,13 +657,13 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), /* FALLTHROUGH */ case 'd': c = CT_INT; - ccfn = (u_long (*)())_strtol_r; + ccfn = (u_long (*)CCFN_PARAMS)_strtol_r; base = 10; break; case 'i': c = CT_INT; - ccfn = (u_long (*)())_strtol_r; + ccfn = (u_long (*)CCFN_PARAMS)_strtol_r; base = 0; break; @@ -786,7 +785,7 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), if (isupper (c)) flags |= LONG; c = CT_INT; - ccfn = (u_long (*)())_strtol_r; + ccfn = (u_long (*)CCFN_PARAMS)_strtol_r; base = 10; break; } |