lib: Support gcc-4.6.4: Implement rewind.
* lib/stdio/rewind.c: Move from ../stub. Implement. * include/stdio.h (rewind): Declare. * build-aux/configure-lib.sh (libc_gnu_SOURCES): Update include. * lib/stub/rewind.c: Remove.
This commit is contained in:
parent
2395703971
commit
23abd8e2b7
|
@ -338,6 +338,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
|
||||
|
@ -384,7 +385,6 @@ lib/stub/pclose.c
|
|||
lib/stub/popen.c
|
||||
lib/stub/pow.c
|
||||
lib/stub/rand.c
|
||||
lib/stub/rewind.c
|
||||
lib/stub/setbuf.c
|
||||
lib/stub/setgrent.c
|
||||
lib/stub/setlocale.c
|
||||
|
|
|
@ -76,6 +76,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 ungetc (int c, FILE * stream);
|
||||
long ftell (FILE * stream);
|
||||
|
|
|
@ -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);
|
||||
}
|
Loading…
Reference in New Issue