From 7b9ca64fc490d5db04a1f3c329780f0371120839 Mon Sep 17 00:00:00 2001 From: verhaegs Date: Sun, 5 Feb 2012 17:56:52 +0000 Subject: [PATCH] compiler/clib: Made definition of struct sFILE private to arosc.library It is defined now in __stdio.h Include this file where needed, don't include it where not needed. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@43882 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- compiler/clib/__stdio.h | 13 +++++++++++++ compiler/clib/clearerr.c | 4 +++- compiler/clib/fchmod.c | 1 - compiler/clib/feof.c | 2 ++ compiler/clib/ferror.c | 4 +++- compiler/clib/fgetc.c | 2 +- compiler/clib/fgets.c | 1 + compiler/clib/fileno.c | 3 ++- compiler/clib/fputc.c | 1 + compiler/clib/fputs.c | 1 + compiler/clib/include/stdio.h | 7 ++----- compiler/clib/popen.c | 3 +-- compiler/clib/read.c | 1 - compiler/clib/setvbuf.c | 3 ++- compiler/clib/ungetc.c | 1 + compiler/clib/vfprintf.c | 1 + compiler/clib/vfscanf.c | 1 + compiler/clib/write.c | 1 - 18 files changed, 35 insertions(+), 15 deletions(-) diff --git a/compiler/clib/__stdio.h b/compiler/clib/__stdio.h index d76f7386fe..29276b8a7c 100644 --- a/compiler/clib/__stdio.h +++ b/compiler/clib/__stdio.h @@ -13,6 +13,19 @@ #include #include +struct __sFILE +{ + int fd; + int flags; +}; + +#define _STDIO_EOF 0x0001L +#define _STDIO_ERROR 0x0002L +#define _STDIO_WRITE 0x0004L +#define _STDIO_READ 0x0008L +#define _STDIO_RDWR _STDIO_WRITE | _STDIO_READ +#define _STDIO_APPEND 0x0010L + typedef struct { struct MinNode Node; diff --git a/compiler/clib/clearerr.c b/compiler/clib/clearerr.c index 83e1ea68f5..6e4a361d9f 100644 --- a/compiler/clib/clearerr.c +++ b/compiler/clib/clearerr.c @@ -1,10 +1,12 @@ /* - Copyright © 1995-2003, The AROS Development Team. All rights reserved. + Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ ANSI C function clearerr(). */ +#include "__stdio.h" + /***************************************************************************** NAME */ diff --git a/compiler/clib/fchmod.c b/compiler/clib/fchmod.c index f7b8126bb2..05f7d0dbfa 100644 --- a/compiler/clib/fchmod.c +++ b/compiler/clib/fchmod.c @@ -13,7 +13,6 @@ #include #include -#include "__stdio.h" #include "__fdesc.h" #include "__upath.h" diff --git a/compiler/clib/feof.c b/compiler/clib/feof.c index cc8e16a3a3..1d4b344501 100644 --- a/compiler/clib/feof.c +++ b/compiler/clib/feof.c @@ -5,6 +5,8 @@ ANSI C function feof(). */ +#include "__stdio.h" + /***************************************************************************** NAME */ diff --git a/compiler/clib/ferror.c b/compiler/clib/ferror.c index d19deb547a..12c13f01af 100644 --- a/compiler/clib/ferror.c +++ b/compiler/clib/ferror.c @@ -1,10 +1,12 @@ /* - Copyright © 1995-2001, The AROS Development Team. All rights reserved. + Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ ANSI C function ferror(). */ +#include "__stdio.h" + /***************************************************************************** NAME */ diff --git a/compiler/clib/fgetc.c b/compiler/clib/fgetc.c index a31b2cfac8..a7d8429413 100644 --- a/compiler/clib/fgetc.c +++ b/compiler/clib/fgetc.c @@ -11,7 +11,7 @@ #include #include #include "__fdesc.h" - +#include "__stdio.h" /***************************************************************************** diff --git a/compiler/clib/fgets.c b/compiler/clib/fgets.c index 8235aeee4a..db9552fd6d 100644 --- a/compiler/clib/fgets.c +++ b/compiler/clib/fgets.c @@ -11,6 +11,7 @@ #include #include #include "__fdesc.h" +#include "__stdio.h" /***************************************************************************** diff --git a/compiler/clib/fileno.c b/compiler/clib/fileno.c index 218699a4d8..9e34bf6292 100644 --- a/compiler/clib/fileno.c +++ b/compiler/clib/fileno.c @@ -1,11 +1,12 @@ /* - Copyright © 1995-2003, The AROS Development Team. All rights reserved. + Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ ANSI C function fileno(). */ #include +#include "__stdio.h" /***************************************************************************** diff --git a/compiler/clib/fputc.c b/compiler/clib/fputc.c index b34220ed00..9562de53a3 100644 --- a/compiler/clib/fputc.c +++ b/compiler/clib/fputc.c @@ -11,6 +11,7 @@ #include #include #include "__fdesc.h" +#include "__stdio.h" /***************************************************************************** diff --git a/compiler/clib/fputs.c b/compiler/clib/fputs.c index 0baa1c2ecc..64158789d5 100644 --- a/compiler/clib/fputs.c +++ b/compiler/clib/fputs.c @@ -8,6 +8,7 @@ #include #include #include "__fdesc.h" +#include "__stdio.h" /***************************************************************************** diff --git a/compiler/clib/include/stdio.h b/compiler/clib/include/stdio.h index dd8b6c9774..82d741fd11 100644 --- a/compiler/clib/include/stdio.h +++ b/compiler/clib/include/stdio.h @@ -49,12 +49,9 @@ typedef off_t fpos_t; #ifndef __typedef_FILE # define __typedef_FILE + struct __sFILE; /* I need a named struct for FILE, so that I can use it in wchar.h> */ - typedef struct __sFILE - { - int fd; - int flags; - } FILE; + typedef struct __sFILE FILE; # define _STDIO_EOF 0x0001L # define _STDIO_ERROR 0x0002L diff --git a/compiler/clib/popen.c b/compiler/clib/popen.c index d3fe738156..744bce9f27 100644 --- a/compiler/clib/popen.c +++ b/compiler/clib/popen.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2003, The AROS Development Team. All rights reserved. + Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ ANSI C function popen(). @@ -10,7 +10,6 @@ #include #include -#include "__stdio.h" #include "__fdesc.h" #include diff --git a/compiler/clib/read.c b/compiler/clib/read.c index 8782f92874..81c44f3d9d 100644 --- a/compiler/clib/read.c +++ b/compiler/clib/read.c @@ -10,7 +10,6 @@ #include #include #include -#include "__stdio.h" #include "__fdesc.h" /***************************************************************************** diff --git a/compiler/clib/setvbuf.c b/compiler/clib/setvbuf.c index 3408429f9c..f44d2b7c00 100644 --- a/compiler/clib/setvbuf.c +++ b/compiler/clib/setvbuf.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2011, The AROS Development Team. All rights reserved. + Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ ANSI C function setvbuf(). @@ -9,6 +9,7 @@ #include #include #include "__fdesc.h" +#include "__stdio.h" /***************************************************************************** diff --git a/compiler/clib/ungetc.c b/compiler/clib/ungetc.c index 48083a9363..8bc5c08246 100644 --- a/compiler/clib/ungetc.c +++ b/compiler/clib/ungetc.c @@ -11,6 +11,7 @@ #include #include #include "__fdesc.h" +#include "__stdio.h" /***************************************************************************** diff --git a/compiler/clib/vfprintf.c b/compiler/clib/vfprintf.c index 13f1ad3f73..cfc696c854 100644 --- a/compiler/clib/vfprintf.c +++ b/compiler/clib/vfprintf.c @@ -10,6 +10,7 @@ #include #include #include "__fdesc.h" +#include "__stdio.h" static int __putc(int c, void *fh); diff --git a/compiler/clib/vfscanf.c b/compiler/clib/vfscanf.c index 1db9fa1d40..cb26d4412c 100644 --- a/compiler/clib/vfscanf.c +++ b/compiler/clib/vfscanf.c @@ -10,6 +10,7 @@ #include #include #include "__fdesc.h" +#include "__stdio.h" #include /* diff --git a/compiler/clib/write.c b/compiler/clib/write.c index 5768e8010c..9170339089 100644 --- a/compiler/clib/write.c +++ b/compiler/clib/write.c @@ -10,7 +10,6 @@ #include #include #include -#include "__stdio.h" #include "__fdesc.h" /***************************************************************************** -- 2.11.4.GIT