From 8bfa71e53665712869a999485e24290e1d2fd4b0 Mon Sep 17 00:00:00 2001 From: NicJA Date: Fri, 28 Apr 2017 23:23:23 +0000 Subject: [PATCH] add stub for posixc getc_unlocked function needed by git. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@54615 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- compiler/posixc/getc_unlocked.c | 49 +++++++++++++++++++++++++++++ compiler/posixc/include/aros/posixc/stdio.h | 2 +- compiler/posixc/mmakefile.src | 1 + compiler/posixc/posixc.conf | 4 +-- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 compiler/posixc/getc_unlocked.c diff --git a/compiler/posixc/getc_unlocked.c b/compiler/posixc/getc_unlocked.c new file mode 100644 index 0000000000..e9bb24fa9e --- /dev/null +++ b/compiler/posixc/getc_unlocked.c @@ -0,0 +1,49 @@ +/* + Copyright © 2017, The AROS Development Team. All rights reserved. + $Id$ +*/ + +#include +#include +#include +#include +#include +#include "__fdesc.h" +#include "__stdio.h" + +#define DEBUG 0 +#include + +/***************************************************************************** + + NAME */ +#include + + int getc_unlocked ( + +/* SYNOPSIS */ + FILE * stream) + +/* FUNCTION + + INPUTS + stream - Read from this stream + + RESULT + The character read or EOF on end of file or error. + + NOTES + + EXAMPLE + + BUGS + + SEE ALSO + getc(), fputc(), putc() + + INTERNALS + +******************************************************************************/ +{ + return getc(stream); +} diff --git a/compiler/posixc/include/aros/posixc/stdio.h b/compiler/posixc/include/aros/posixc/stdio.h index cf08fda6a2..c8f660707a 100644 --- a/compiler/posixc/include/aros/posixc/stdio.h +++ b/compiler/posixc/include/aros/posixc/stdio.h @@ -30,7 +30,7 @@ int fseeko(FILE *stream, off_t offset, int whence); off_t ftello(FILE *stream); /* NOTIMPL int ftrylockfile(FILE *); */ void funlockfile(FILE *); -/* NOTIMPL int getc_unlocked(FILE *); */ +int getc_unlocked(FILE *); /* NOTIMPL int getchar_unlocked(void); */ /* NOTIMPL ssize_t getdelim(char **restrict, size_t *restrict, int, FILE *restrict); */ /* NOTIMPL ssize_t getline(char **restrict, size_t *restrict, FILE *restrict); */ diff --git a/compiler/posixc/mmakefile.src b/compiler/posixc/mmakefile.src index 6e5bc223a3..279ca2a8bd 100644 --- a/compiler/posixc/mmakefile.src +++ b/compiler/posixc/mmakefile.src @@ -76,6 +76,7 @@ POSIXC := \ ftruncate \ funlockfile \ fwrite \ + getc_unlocked \ getchar \ getcwd \ getegid \ diff --git a/compiler/posixc/posixc.conf b/compiler/posixc/posixc.conf index 0693379ca6..0777c1af8f 100644 --- a/compiler/posixc/posixc.conf +++ b/compiler/posixc/posixc.conf @@ -548,8 +548,8 @@ void funlockfile(FILE *) size_t fwrite(const void *restrict, size_t, size_t, FILE *restrict) # getc alias from fgetc int getchar(void) -.skip 4 -#int getc_unlocked(FILE *) +int getc_unlocked(FILE *) +.skip 3 #int getchar_unlocked(void) #ssize_t getdelim(char **restrict, size_t *restrict, int, FILE *restrict) #ssize_t getline(char **restrict, size_t *restrict, FILE *restrict) -- 2.11.4.GIT