mescc: Mes C Library: Support gcc-4.6.4: Implement rewind.

* lib/stdio/rewind.c: Move from ../stub.  Implement.
* include/stdio.h (rewind): Declare.
* lib/libc+gnu.c: Update include.
* lib/libg.c: Update include.
* lib/stub/rewind.c: Remove.
This commit is contained in:
Jan Nieuwenhuizen 2019-02-08 13:56:25 +01:00
parent 46b708c13c
commit 64f20e41c3
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
3 changed files with 7 additions and 11 deletions

View File

@ -248,6 +248,7 @@ lib/stdio/fileno.c
lib/stdio/freopen.c
lib/stdio/fscanf.c
lib/stdio/perror.c
lib/stdio/rewind.c
lib/stdio/vfscanf.c
lib/stdlib/__exit.c
lib/stdlib/abort.c

View File

@ -79,6 +79,7 @@ int putc (int c, FILE * stream);
int putchar (int c);
int puts (char const *s);
int remove (char const *file_name);
void rewind (FILE * stream);
int setvbuf (FILE * stream, char *buf, int mode, size_t size);
int snprintf (char *str, size_t size, char const *format, ...);
int sprintf (char *str, char const *format, ...);

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -18,16 +18,10 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include <mes/lib.h>
#include <errno.h>
#include <stdio.h>
int
rewind (int x)
void
rewind (FILE * stream)
{
static int stub = 0;
if (__mes_debug () && !stub)
eputs ("rewind stub\n");
stub = 1;
errno = 0;
return 0;
fseek (stream, 0, SEEK_SET);
}