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:
parent
7f26f85e75
commit
834a722029
|
@ -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, ...);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include <stub/pclose.c>
|
||||
#include <stub/popen.c>
|
||||
#include <string/rindex.c>
|
||||
#include <stub/rewind.c>
|
||||
#include <stdio/rewind.c> // for gcc-4.6.4; could be stubbed
|
||||
#include <stub/setbuf.c>
|
||||
#include <stub/system.c>
|
||||
#include <string/strerror.c>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#include <stub/pclose.c>
|
||||
#include <stub/popen.c>
|
||||
#include <string/rindex.c>
|
||||
#include <stub/rewind.c>
|
||||
#include <stdio/rewind.c> // for gcc-4.6.4; could be stubbed
|
||||
#include <stub/setbuf.c>
|
||||
#include <stub/system.c>
|
||||
#include <string/strerror.c>
|
||||
|
|
|
@ -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,15 +18,10 @@
|
|||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libmes.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